diff --git a/android/app/build.gradle b/android/app/build.gradle index acbfb99..f9bd3b7 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -32,7 +32,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 33 + compileSdkVersion 34 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -49,8 +49,8 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "be.unov.mymuseum.fortsaintheribert" - minSdkVersion 20 + applicationId "be.unov.myinfomate.mdlf" // Update for mdlf and other clients -- "be.unov.mymuseum.fortsaintheribert" + minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 717b7a2..9649d30 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="be.unov.myinfomate.mdlf"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 18694cd..86bcf42 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="be.unov.myinfomate.mdlf"> @@ -17,8 +17,9 @@ --> + diff --git a/android/app/src/main/kotlin/be/unov/myvisit/mymuseum_visitapp/MainActivity.kt b/android/app/src/main/kotlin/be/unov/myvisit/mymuseum_visitapp/MainActivity.kt index 5aa8e5e..df07978 100644 --- a/android/app/src/main/kotlin/be/unov/myvisit/mymuseum_visitapp/MainActivity.kt +++ b/android/app/src/main/kotlin/be/unov/myvisit/mymuseum_visitapp/MainActivity.kt @@ -1,4 +1,4 @@ -package be.unov.myvisit.mymuseum_visitapp +package be.unov.myinfomate.mdlf import io.flutter.embedding.android.FlutterActivity diff --git a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png index 879dd14..534bf33 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-hdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png index 6d914ba..6993e47 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-mdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png index 41f5fa5..8f83d5d 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png index 3b27f3d..b7509c5 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png index d0a44e8..a3d2761 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png and b/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png differ diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 717b7a2..9649d30 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="be.unov.myinfomate.mdlf"> diff --git a/android/build.gradle b/android/build.gradle index 713d7f6..674e96f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.7.10' + ext.kotlin_version = '1.9.0' repositories { google() mavenCentral() diff --git a/assets/icon/icon.png b/assets/icon/icon.png index 5996e8a..39dcd0f 100644 Binary files a/assets/icon/icon.png and b/assets/icon/icon.png differ diff --git a/assets/icon/icon_fort.png b/assets/icon/icon_fort.png new file mode 100644 index 0000000..5996e8a Binary files /dev/null and b/assets/icon/icon_fort.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index bffcec3..6207868 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index eb28e2e..f85fbf4 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 9120ad6..6fe4919 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index bfb5b7e..7af37cc 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index cd4df2c..943a88e 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index adfe0a2..c40802a 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 2006a97..6ea5641 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 9120ad6..6fe4919 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index 945d51a..2a46c2c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index 108db63..e9d60fb 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png index 47470af..b193f09 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png index 9236db0..3087258 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png index c682421..fe1a58a 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png index edab804..ab35929 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index 108db63..e9d60fb 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 452d39d..8a6b281 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png index 879dd14..534bf33 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png index 3b27f3d..b7509c5 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index a539b0a..71bf6f7 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 9a53dd0..d409a58 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index d1a1d24..ff1fc74 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/lib/Components/BuilderImageSlider.dart b/lib/Components/BuilderImageSlider.dart index 82e1983..0224aa6 100644 --- a/lib/Components/BuilderImageSlider.dart +++ b/lib/Components/BuilderImageSlider.dart @@ -11,14 +11,14 @@ class BuilderImageSlider extends StatelessWidget { {Key? key, required this.appContext, required this.currentIndex, - required this.imagesDTO, + required this.contentsDTO, required this.size, required this.i} ) : super(key: key); final AppContext appContext; final int currentIndex; - final List imagesDTO; + final List contentsDTO; final Size size; final ResourceModel i; @@ -28,7 +28,7 @@ class BuilderImageSlider extends StatelessWidget { builder: (BuildContext context) {*/ return InkWell( onTap: () { - showImagePopup(imagesDTO[currentIndex-1]!, i, appContext, context, size); + showImagePopup(contentsDTO[currentIndex-1]!, i, appContext, context, size); }, child: Container( //color: Colors.red, diff --git a/lib/Components/Carousel/carousel_controller.dart b/lib/Components/Carousel/carousel_controller.dart new file mode 100644 index 0000000..8fa3c04 --- /dev/null +++ b/lib/Components/Carousel/carousel_controller.dart @@ -0,0 +1,149 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; + +import 'carousel_options.dart'; +import 'carousel_state.dart'; +import 'utils.dart'; + +abstract class CarouselController { + bool get ready; + + Future get onReady; + + Future nextPage({Duration? duration, Curve? curve}); + + Future previousPage({Duration? duration, Curve? curve}); + + void jumpToPage(int page); + + Future animateToPage(int page, {Duration? duration, Curve? curve}); + + void startAutoPlay(); + + void stopAutoPlay(); + + factory CarouselController() => CarouselControllerImpl(); +} + +class CarouselControllerImpl implements CarouselController { + final Completer _readyCompleter = Completer(); + + CarouselState? _state; + + set state(CarouselState? state) { + _state = state; + if (!_readyCompleter.isCompleted) { + _readyCompleter.complete(); + } + } + + void _setModeController() => + _state!.changeMode(CarouselPageChangedReason.controller); + + @override + bool get ready => _state != null; + + @override + Future get onReady => _readyCompleter.future; + + /// Animates the controlled [CarouselSlider] to the next page. + /// + /// The animation lasts for the given duration and follows the given curve. + /// The returned [Future] resolves when the animation completes. + Future nextPage( + {Duration? duration = const Duration(milliseconds: 300), + Curve? curve = Curves.linear}) async { + final bool isNeedResetTimer = _state!.options.pauseAutoPlayOnManualNavigate; + if (isNeedResetTimer) { + _state!.onResetTimer(); + } + _setModeController(); + await _state!.pageController!.nextPage(duration: duration!, curve: curve!); + if (isNeedResetTimer) { + _state!.onResumeTimer(); + } + } + + /// Animates the controlled [CarouselSlider] to the previous page. + /// + /// The animation lasts for the given duration and follows the given curve. + /// The returned [Future] resolves when the animation completes. + Future previousPage( + {Duration? duration = const Duration(milliseconds: 300), + Curve? curve = Curves.linear}) async { + final bool isNeedResetTimer = _state!.options.pauseAutoPlayOnManualNavigate; + if (isNeedResetTimer) { + _state!.onResetTimer(); + } + _setModeController(); + await _state!.pageController! + .previousPage(duration: duration!, curve: curve!); + if (isNeedResetTimer) { + _state!.onResumeTimer(); + } + } + + /// Changes which page is displayed in the controlled [CarouselSlider]. + /// + /// Jumps the page position from its current value to the given value, + /// without animation, and without checking if the new value is in range. + void jumpToPage(int page) { + final index = getRealIndex(_state!.pageController!.page!.toInt(), + _state!.realPage - _state!.initialPage, _state!.itemCount); + + _setModeController(); + final int pageToJump = _state!.pageController!.page!.toInt() + page - index; + return _state!.pageController!.jumpToPage(pageToJump); + } + + /// Animates the controlled [CarouselSlider] from the current page to the given page. + /// + /// The animation lasts for the given duration and follows the given curve. + /// The returned [Future] resolves when the animation completes. + Future animateToPage(int page, + {Duration? duration = const Duration(milliseconds: 300), + Curve? curve = Curves.linear}) async { + final bool isNeedResetTimer = _state!.options.pauseAutoPlayOnManualNavigate; + if (isNeedResetTimer) { + _state!.onResetTimer(); + } + final index = getRealIndex(_state!.pageController!.page!.toInt(), + _state!.realPage - _state!.initialPage, _state!.itemCount); + int smallestMovement = page - index; + if (_state!.options.enableInfiniteScroll && + _state!.itemCount != null && + _state!.options.animateToClosest) { + if ((page - index).abs() > (page + _state!.itemCount! - index).abs()) { + smallestMovement = page + _state!.itemCount! - index; + } else if ((page - index).abs() > + (page - _state!.itemCount! - index).abs()) { + smallestMovement = page - _state!.itemCount! - index; + } + } + _setModeController(); + await _state!.pageController!.animateToPage( + _state!.pageController!.page!.toInt() + smallestMovement, + duration: duration!, + curve: curve!); + if (isNeedResetTimer) { + _state!.onResumeTimer(); + } + } + + /// Starts the controlled [CarouselSlider] autoplay. + /// + /// The carousel will only autoPlay if the [autoPlay] parameter + /// in [CarouselOptions] is true. + void startAutoPlay() { + _state!.onResumeTimer(); + } + + /// Stops the controlled [CarouselSlider] from autoplaying. + /// + /// This is a more on-demand way of doing this. Use the [autoPlay] + /// parameter in [CarouselOptions] to specify the autoPlay behaviour of the carousel. + void stopAutoPlay() { + _state!.onResetTimer(); + } +} \ No newline at end of file diff --git a/lib/Components/Carousel/carousel_options.dart b/lib/Components/Carousel/carousel_options.dart new file mode 100644 index 0000000..77ae333 --- /dev/null +++ b/lib/Components/Carousel/carousel_options.dart @@ -0,0 +1,223 @@ +import 'package:flutter/material.dart'; + +enum CarouselPageChangedReason { timed, manual, controller } + +enum CenterPageEnlargeStrategy { scale, height, zoom } + +class CarouselOptions { + /// Set carousel height and overrides any existing [aspectRatio]. + final double? height; + + /// Aspect ratio is used if no height have been declared. + /// + /// Defaults to 16:9 aspect ratio. + final double aspectRatio; + + /// The fraction of the viewport that each page should occupy. + /// + /// Defaults to 0.8, which means each page fills 80% of the carousel. + final double viewportFraction; + + /// The initial page to show when first creating the [CarouselSlider]. + /// + /// Defaults to 0. + final int initialPage; + + ///Determines if carousel should loop infinitely or be limited to item length. + /// + ///Defaults to true, i.e. infinite loop. + final bool enableInfiniteScroll; + + ///Determines if carousel should loop to the closest occurence of requested page. + /// + ///Defaults to true. + final bool animateToClosest; + + /// Reverse the order of items if set to true. + /// + /// Defaults to false. + final bool reverse; + + /// Enables auto play, sliding one page at a time. + /// + /// Use [autoPlayInterval] to determent the frequency of slides. + /// Defaults to false. + final bool autoPlay; + + /// Sets Duration to determent the frequency of slides when + /// + /// [autoPlay] is set to true. + /// Defaults to 4 seconds. + final Duration autoPlayInterval; + + /// The animation duration between two transitioning pages while in auto playback. + /// + /// Defaults to 800 ms. + final Duration autoPlayAnimationDuration; + + /// Determines the animation curve physics. + /// + /// Defaults to [Curves.fastOutSlowIn]. + final Curve autoPlayCurve; + + /// Determines if current page should be larger than the side images, + /// creating a feeling of depth in the carousel. + /// + /// Defaults to false. + final bool? enlargeCenterPage; + + /// The axis along which the page view scrolls. + /// + /// Defaults to [Axis.horizontal]. + final Axis scrollDirection; + + /// Called whenever the page in the center of the viewport changes. + final Function(int index, CarouselPageChangedReason reason)? onPageChanged; + + /// Called whenever the carousel is scrolled + final ValueChanged? onScrolled; + + /// How the carousel should respond to user input. + /// + /// For example, determines how the items continues to animate after the + /// user stops dragging the page view. + /// + /// The physics are modified to snap to page boundaries using + /// [PageScrollPhysics] prior to being used. + /// + /// Defaults to matching platform conventions. + final ScrollPhysics? scrollPhysics; + + /// Set to false to disable page snapping, useful for custom scroll behavior. + /// + /// Default to `true`. + final bool pageSnapping; + + /// If `true`, the auto play function will be paused when user is interacting with + /// the carousel, and will be resumed when user finish interacting. + /// Default to `true`. + final bool pauseAutoPlayOnTouch; + + /// If `true`, the auto play function will be paused when user is calling + /// pageController's `nextPage` or `previousPage` or `animateToPage` method. + /// And after the animation complete, the auto play will be resumed. + /// Default to `true`. + final bool pauseAutoPlayOnManualNavigate; + + /// If `enableInfiniteScroll` is `false`, and `autoPlay` is `true`, this option + /// decide the carousel should go to the first item when it reach the last item or not. + /// If set to `true`, the auto play will be paused when it reach the last item. + /// If set to `false`, the auto play function will animate to the first item when it was + /// in the last item. + final bool pauseAutoPlayInFiniteScroll; + + /// Pass a `PageStoragekey` if you want to keep the pageview's position when it was recreated. + final PageStorageKey? pageViewKey; + + /// Use [enlargeStrategy] to determine which method to enlarge the center page. + final CenterPageEnlargeStrategy enlargeStrategy; + + /// How much the pages next to the center page will be scaled down. + /// If `enlargeCenterPage` is false, this property has no effect. + final double enlargeFactor; + + /// Whether or not to disable the `Center` widget for each slide. + final bool disableCenter; + + /// Whether to add padding to both ends of the list. + /// If this is set to true and [viewportFraction] < 1.0, padding will be added such that the first and last child slivers will be in the center of the viewport when scrolled all the way to the start or end, respectively. + /// If [viewportFraction] >= 1.0, this property has no effect. + /// This property defaults to true and must not be null. + final bool padEnds; + + /// Exposed clipBehavior of PageView + final Clip clipBehavior; + + CarouselOptions({ + this.height, + this.aspectRatio = 16 / 9, + this.viewportFraction = 0.8, + this.initialPage = 0, + this.enableInfiniteScroll = true, + this.animateToClosest = true, + this.reverse = false, + this.autoPlay = false, + this.autoPlayInterval = const Duration(seconds: 4), + this.autoPlayAnimationDuration = const Duration(milliseconds: 800), + this.autoPlayCurve = Curves.fastOutSlowIn, + this.enlargeCenterPage = false, + this.onPageChanged, + this.onScrolled, + this.scrollPhysics, + this.pageSnapping = true, + this.scrollDirection = Axis.horizontal, + this.pauseAutoPlayOnTouch = true, + this.pauseAutoPlayOnManualNavigate = true, + this.pauseAutoPlayInFiniteScroll = false, + this.pageViewKey, + this.enlargeStrategy = CenterPageEnlargeStrategy.scale, + this.enlargeFactor = 0.3, + this.disableCenter = false, + this.padEnds = true, + this.clipBehavior = Clip.hardEdge, + }); + + ///Generate new [CarouselOptions] based on old ones. + + CarouselOptions copyWith( + {double? height, + double? aspectRatio, + double? viewportFraction, + int? initialPage, + bool? enableInfiniteScroll, + bool? reverse, + bool? autoPlay, + Duration? autoPlayInterval, + Duration? autoPlayAnimationDuration, + Curve? autoPlayCurve, + bool? enlargeCenterPage, + Function(int index, CarouselPageChangedReason reason)? onPageChanged, + ValueChanged? onScrolled, + ScrollPhysics? scrollPhysics, + bool? pageSnapping, + Axis? scrollDirection, + bool? pauseAutoPlayOnTouch, + bool? pauseAutoPlayOnManualNavigate, + bool? pauseAutoPlayInFiniteScroll, + PageStorageKey? pageViewKey, + CenterPageEnlargeStrategy? enlargeStrategy, + double? enlargeFactor, + bool? disableCenter, + Clip? clipBehavior, + bool? padEnds}) => + CarouselOptions( + height: height ?? this.height, + aspectRatio: aspectRatio ?? this.aspectRatio, + viewportFraction: viewportFraction ?? this.viewportFraction, + initialPage: initialPage ?? this.initialPage, + enableInfiniteScroll: enableInfiniteScroll ?? this.enableInfiniteScroll, + reverse: reverse ?? this.reverse, + autoPlay: autoPlay ?? this.autoPlay, + autoPlayInterval: autoPlayInterval ?? this.autoPlayInterval, + autoPlayAnimationDuration: + autoPlayAnimationDuration ?? this.autoPlayAnimationDuration, + autoPlayCurve: autoPlayCurve ?? this.autoPlayCurve, + enlargeCenterPage: enlargeCenterPage ?? this.enlargeCenterPage, + onPageChanged: onPageChanged ?? this.onPageChanged, + onScrolled: onScrolled ?? this.onScrolled, + scrollPhysics: scrollPhysics ?? this.scrollPhysics, + pageSnapping: pageSnapping ?? this.pageSnapping, + scrollDirection: scrollDirection ?? this.scrollDirection, + pauseAutoPlayOnTouch: pauseAutoPlayOnTouch ?? this.pauseAutoPlayOnTouch, + pauseAutoPlayOnManualNavigate: + pauseAutoPlayOnManualNavigate ?? this.pauseAutoPlayOnManualNavigate, + pauseAutoPlayInFiniteScroll: + pauseAutoPlayInFiniteScroll ?? this.pauseAutoPlayInFiniteScroll, + pageViewKey: pageViewKey ?? this.pageViewKey, + enlargeStrategy: enlargeStrategy ?? this.enlargeStrategy, + enlargeFactor: enlargeFactor ?? this.enlargeFactor, + disableCenter: disableCenter ?? this.disableCenter, + clipBehavior: clipBehavior ?? this.clipBehavior, + padEnds: padEnds ?? this.padEnds, + ); +} \ No newline at end of file diff --git a/lib/Components/Carousel/carousel_slider.dart b/lib/Components/Carousel/carousel_slider.dart new file mode 100644 index 0000000..6a5f8b4 --- /dev/null +++ b/lib/Components/Carousel/carousel_slider.dart @@ -0,0 +1,396 @@ +import 'dart:async'; + +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; + +import 'carousel_controller.dart' as cs; +import 'carousel_options.dart'; +import 'carousel_state.dart'; +import 'utils.dart'; + +export 'carousel_controller.dart'; +export 'carousel_options.dart'; + +typedef Widget ExtendedIndexedWidgetBuilder( + BuildContext context, int index, int realIndex); + +class CarouselSlider extends StatefulWidget { + /// [CarouselOptions] to create a [CarouselState] with + final CarouselOptions options; + + final bool? disableGesture; + + /// The widgets to be shown in the carousel of default constructor + final List? items; + + /// The widget item builder that will be used to build item on demand + /// The third argument is the PageView's real index, can be used to cooperate + /// with Hero. + final ExtendedIndexedWidgetBuilder? itemBuilder; + + /// A [MapController], used to control the map. + final cs.CarouselControllerImpl _carouselController; + + final int? itemCount; + + CarouselSlider( + {required this.items, + required this.options, + this.disableGesture, + cs.CarouselController? carouselController, + Key? key}) + : itemBuilder = null, + itemCount = items != null ? items.length : 0, + _carouselController = carouselController != null + ? carouselController as cs.CarouselControllerImpl + : cs.CarouselController() as cs.CarouselControllerImpl, + super(key: key); + + /// The on demand item builder constructor + CarouselSlider.builder( + {required this.itemCount, + required this.itemBuilder, + required this.options, + this.disableGesture, + cs.CarouselController? carouselController, + Key? key}) + : items = null, + _carouselController = carouselController != null + ? carouselController as cs.CarouselControllerImpl + : cs.CarouselController() as cs.CarouselControllerImpl, + super(key: key); + + @override + CarouselSliderState createState() => CarouselSliderState(_carouselController); +} + +class CarouselSliderState extends State + with TickerProviderStateMixin { + final cs.CarouselControllerImpl carouselController; + Timer? timer; + + CarouselOptions get options => widget.options; + + CarouselState? carouselState; + + PageController? pageController; + + /// mode is related to why the page is being changed + CarouselPageChangedReason mode = CarouselPageChangedReason.controller; + + CarouselSliderState(this.carouselController); + + void changeMode(CarouselPageChangedReason _mode) { + mode = _mode; + } + + @override + void didUpdateWidget(CarouselSlider oldWidget) { + carouselState!.options = options; + carouselState!.itemCount = widget.itemCount; + + // pageController needs to be re-initialized to respond to state changes + pageController = PageController( + viewportFraction: options.viewportFraction, + initialPage: carouselState!.realPage, + ); + carouselState!.pageController = pageController; + + // handle autoplay when state changes + handleAutoPlay(); + + super.didUpdateWidget(oldWidget); + } + + @override + void initState() { + super.initState(); + carouselState = + CarouselState(this.options, clearTimer, resumeTimer, this.changeMode); + + carouselState!.itemCount = widget.itemCount; + carouselController.state = carouselState; + carouselState!.initialPage = widget.options.initialPage; + carouselState!.realPage = options.enableInfiniteScroll + ? carouselState!.realPage + carouselState!.initialPage + : carouselState!.initialPage; + handleAutoPlay(); + + pageController = PageController( + viewportFraction: options.viewportFraction, + initialPage: carouselState!.realPage, + ); + + carouselState!.pageController = pageController; + } + + Timer? getTimer() { + return widget.options.autoPlay + ? Timer.periodic(widget.options.autoPlayInterval, (_) { + if (!mounted) { + clearTimer(); + return; + } + + final route = ModalRoute.of(context); + if (route?.isCurrent == false) { + return; + } + + CarouselPageChangedReason previousReason = mode; + changeMode(CarouselPageChangedReason.timed); + int nextPage = carouselState!.pageController!.page!.round() + 1; + int itemCount = widget.itemCount ?? widget.items!.length; + + if (nextPage >= itemCount && + widget.options.enableInfiniteScroll == false) { + if (widget.options.pauseAutoPlayInFiniteScroll) { + clearTimer(); + return; + } + nextPage = 0; + } + + carouselState!.pageController! + .animateToPage(nextPage, + duration: widget.options.autoPlayAnimationDuration, + curve: widget.options.autoPlayCurve) + .then((_) => changeMode(previousReason)); + }) + : null; + } + + void clearTimer() { + if (timer != null) { + timer?.cancel(); + timer = null; + } + } + + void resumeTimer() { + if (timer == null) { + timer = getTimer(); + } + } + + void handleAutoPlay() { + bool autoPlayEnabled = widget.options.autoPlay; + + if (autoPlayEnabled && timer != null) return; + + clearTimer(); + if (autoPlayEnabled) { + resumeTimer(); + } + } + + Widget getGestureWrapper(Widget child) { + Widget wrapper; + if (widget.options.height != null) { + wrapper = Container(height: widget.options.height, child: child); + } else { + wrapper = + AspectRatio(aspectRatio: widget.options.aspectRatio, child: child); + } + + if (true == widget.disableGesture) { + return NotificationListener( + onNotification: (Notification notification) { + if (widget.options.onScrolled != null && + notification is ScrollUpdateNotification) { + widget.options.onScrolled!(carouselState!.pageController!.page); + } + return false; + }, + child: wrapper, + ); + } + + return RawGestureDetector( + behavior: HitTestBehavior.opaque, + gestures: { + _MultipleGestureRecognizer: + GestureRecognizerFactoryWithHandlers<_MultipleGestureRecognizer>( + () => _MultipleGestureRecognizer(), + (_MultipleGestureRecognizer instance) { + instance.onStart = (_) { + onStart(); + }; + instance.onDown = (_) { + onPanDown(); + }; + instance.onEnd = (_) { + onPanUp(); + }; + instance.onCancel = () { + onPanUp(); + }; + }), + }, + child: NotificationListener( + onNotification: (Notification notification) { + if (widget.options.onScrolled != null && + notification is ScrollUpdateNotification) { + widget.options.onScrolled!(carouselState!.pageController!.page); + } + return false; + }, + child: wrapper, + ), + ); + } + + Widget getCenterWrapper(Widget child) { + if (widget.options.disableCenter) { + return Container( + child: child, + ); + } + return Center(child: child); + } + + Widget getEnlargeWrapper(Widget? child, + {double? width, + double? height, + double? scale, + required double itemOffset}) { + if (widget.options.enlargeStrategy == CenterPageEnlargeStrategy.height) { + return SizedBox(child: child, width: width, height: height); + } + if (widget.options.enlargeStrategy == CenterPageEnlargeStrategy.zoom) { + late Alignment alignment; + final bool horizontal = options.scrollDirection == Axis.horizontal; + if (itemOffset > 0) { + alignment = horizontal ? Alignment.centerRight : Alignment.bottomCenter; + } else { + alignment = horizontal ? Alignment.centerLeft : Alignment.topCenter; + } + return Transform.scale(child: child, scale: scale!, alignment: alignment); + } + return Transform.scale( + scale: scale!, + child: Container(child: child, width: width, height: height)); + } + + void onStart() { + changeMode(CarouselPageChangedReason.manual); + } + + void onPanDown() { + if (widget.options.pauseAutoPlayOnTouch) { + clearTimer(); + } + + changeMode(CarouselPageChangedReason.manual); + } + + void onPanUp() { + if (widget.options.pauseAutoPlayOnTouch) { + resumeTimer(); + } + } + + @override + void dispose() { + super.dispose(); + clearTimer(); + } + + @override + Widget build(BuildContext context) { + return getGestureWrapper(PageView.builder( + padEnds: widget.options.padEnds, + scrollBehavior: ScrollConfiguration.of(context).copyWith( + scrollbars: false, + overscroll: false, + dragDevices: { + PointerDeviceKind.touch, + PointerDeviceKind.mouse, + }, + ), + clipBehavior: widget.options.clipBehavior, + physics: widget.options.scrollPhysics, + scrollDirection: widget.options.scrollDirection, + pageSnapping: widget.options.pageSnapping, + controller: carouselState!.pageController, + reverse: widget.options.reverse, + itemCount: widget.options.enableInfiniteScroll ? null : widget.itemCount, + key: widget.options.pageViewKey, + onPageChanged: (int index) { + int currentPage = getRealIndex(index + carouselState!.initialPage, + carouselState!.realPage, widget.itemCount); + if (widget.options.onPageChanged != null) { + widget.options.onPageChanged!(currentPage, mode); + } + }, + itemBuilder: (BuildContext context, int idx) { + final int index = getRealIndex(idx + carouselState!.initialPage, + carouselState!.realPage, widget.itemCount); + + return AnimatedBuilder( + animation: carouselState!.pageController!, + child: (widget.items != null) + ? (widget.items!.length > 0 ? widget.items![index] : Container()) + : widget.itemBuilder!(context, index, idx), + builder: (BuildContext context, child) { + double distortionValue = 1.0; + // if `enlargeCenterPage` is true, we must calculate the carousel item's height + // to display the visual effect + double itemOffset = 0; + if (widget.options.enlargeCenterPage != null && + widget.options.enlargeCenterPage == true) { + // pageController.page can only be accessed after the first build, + // so in the first build we calculate the itemoffset manually + var position = carouselState?.pageController?.position; + if (position != null && + position.hasPixels && + position.hasContentDimensions) { + var _page = carouselState?.pageController?.page; + if (_page != null) { + itemOffset = _page - idx; + } + } else { + BuildContext storageContext = carouselState! + .pageController!.position.context.storageContext; + final double? previousSavedPosition = + PageStorage.of(storageContext)?.readState(storageContext) + as double?; + if (previousSavedPosition != null) { + itemOffset = previousSavedPosition - idx.toDouble(); + } else { + itemOffset = + carouselState!.realPage.toDouble() - idx.toDouble(); + } + } + + final double enlargeFactor = + options.enlargeFactor.clamp(0.0, 1.0); + final num distortionRatio = + (1 - (itemOffset.abs() * enlargeFactor)).clamp(0.0, 1.0); + distortionValue = + Curves.easeOut.transform(distortionRatio as double); + } + + final double height = widget.options.height ?? + MediaQuery.of(context).size.width * + (1 / widget.options.aspectRatio); + + if (widget.options.scrollDirection == Axis.horizontal) { + return getCenterWrapper(getEnlargeWrapper(child, + height: distortionValue * height, + scale: distortionValue, + itemOffset: itemOffset)); + } else { + return getCenterWrapper(getEnlargeWrapper(child, + width: distortionValue * MediaQuery.of(context).size.width, + scale: distortionValue, + itemOffset: itemOffset)); + } + }, + ); + }, + )); + } +} + +class _MultipleGestureRecognizer extends PanGestureRecognizer {} diff --git a/lib/Components/Carousel/carousel_state.dart b/lib/Components/Carousel/carousel_state.dart new file mode 100644 index 0000000..63ac533 --- /dev/null +++ b/lib/Components/Carousel/carousel_state.dart @@ -0,0 +1,43 @@ + +import 'package:flutter/material.dart'; + +import 'carousel_options.dart'; + +class CarouselState { + /// The [CarouselOptions] to create this state + CarouselOptions options; + + /// [pageController] is created using the properties passed to the constructor + /// and can be used to control the [PageView] it is passed to. + PageController? pageController; + + /// The actual index of the [PageView]. + /// + /// This value can be ignored unless you know the carousel will be scrolled + /// backwards more then 10000 pages. + /// Defaults to 10000 to simulate infinite backwards scrolling. + int realPage = 10000; + + /// The initial index of the [PageView] on [CarouselSlider] init. + /// + int initialPage = 0; + + /// The widgets count that should be shown at carousel + int? itemCount; + + /// Will be called when using pageController to go to next page or + /// previous page. It will clear the autoPlay timer. + /// Internal use only + Function onResetTimer; + + /// Will be called when using pageController to go to next page or + /// previous page. It will restart the autoPlay timer. + /// Internal use only + Function onResumeTimer; + + /// The callback to set the Reason Carousel changed + Function(CarouselPageChangedReason) changeMode; + + CarouselState( + this.options, this.onResetTimer, this.onResumeTimer, this.changeMode); +} \ No newline at end of file diff --git a/lib/Components/Carousel/utils.dart b/lib/Components/Carousel/utils.dart new file mode 100644 index 0000000..4f9ede3 --- /dev/null +++ b/lib/Components/Carousel/utils.dart @@ -0,0 +1,23 @@ +/// Converts an index of a set size to the corresponding index of a collection of another size +/// as if they were circular. +/// +/// Takes a [position] from collection Foo, a [base] from where Foo's index originated +/// and the [length] of a second collection Baa, for which the correlating index is sought. +/// +/// For example; We have a Carousel of 10000(simulating infinity) but only 6 images. +/// We need to repeat the images to give the illusion of a never ending stream. +/// By calling _getRealIndex with position and base we get an offset. +/// This offset modulo our length, 6, will return a number between 0 and 5, which represent the image +/// to be placed in the given position. +int getRealIndex(int position, int base, int? length) { + final int offset = position - base; + return remainder(offset, length); +} + +/// Returns the remainder of the modulo operation [input] % [source], and adjust it for +/// negative values. +int remainder(int input, int? source) { + if (source == 0) return 0; + final int result = input % source!; + return result < 0 ? source + result : result; +} \ No newline at end of file diff --git a/lib/Components/CustomAppBar.dart b/lib/Components/CustomAppBar.dart index 13f6378..7aa5f30 100644 --- a/lib/Components/CustomAppBar.dart +++ b/lib/Components/CustomAppBar.dart @@ -5,6 +5,7 @@ import 'package:mymuseum_visitapp/Components/LanguageSelection.dart'; import 'package:mymuseum_visitapp/Models/visitContext.dart'; import 'package:mymuseum_visitapp/Screens/Home/home.dart'; import 'package:mymuseum_visitapp/app_context.dart'; +import 'package:mymuseum_visitapp/constants.dart'; import 'package:provider/provider.dart'; class CustomAppBar extends StatefulWidget implements PreferredSizeWidget { @@ -30,6 +31,7 @@ class _CustomAppBarState extends State { //final notchInset = MediaQuery.of(context).padding; return AppBar( + shadowColor: kMainColor1, title: InkWell( onLongPress: () { @@ -43,11 +45,11 @@ class _CustomAppBarState extends State { ), context: context ); }, - child: HtmlWidget(widget.title), + child: HtmlWidget(widget.title, textStyle: TextStyle(color: Colors.white),), ), centerTitle: true, leading: widget.isHomeButton ? IconButton( - icon: const Icon(Icons.home), + icon: const Icon(Icons.home, color: Colors.white), onPressed: () { // Set new State setState(() { @@ -95,9 +97,8 @@ class _CustomAppBarState extends State { Color(0xFF7633B8), Color(0xFF6528B6), Color(0xFF6025B6)*/ - Color(0xFF306bac), - Color(0xFF308aae), - Color(0xFF309cb0), + kMainColor1, + kMainColor2, ], ), ), diff --git a/lib/Components/Loading.dart b/lib/Components/Loading.dart index 9303dce..9875ca0 100644 --- a/lib/Components/Loading.dart +++ b/lib/Components/Loading.dart @@ -41,7 +41,7 @@ class _LoadingState extends State with TickerProviderStateMixin { return Center( child: RotationTransition( turns: Tween(begin: 0.0, end: 3.0).animate(_controller), - child: Icon(Icons.museum_outlined, color: kBlue2, size: size.height*0.05), + child: Icon(Icons.museum_outlined, color: kMainColor2, size: size.height*0.05), ), ); } diff --git a/lib/Components/ScannerBouton.dart b/lib/Components/ScannerBouton.dart index 8a6f158..af65621 100644 --- a/lib/Components/ScannerBouton.dart +++ b/lib/Components/ScannerBouton.dart @@ -23,17 +23,16 @@ class _ScannerBoutonState extends State { @override Widget build(BuildContext context) { - return Container( - height: 85.0, - width: 85.0, - child: FittedBox( - child: FloatingActionButton( - heroTag: "scanner", - onPressed: _onItemTapped, - tooltip: 'Scanner', - backgroundColor: kBlue1, - child: const Icon(Icons.qr_code_scanner), + return InkWell( + onTap: _onItemTapped, + child: Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: kMainColor1, ), + height: 85.0, + width: 85.0, + child: const Icon(Icons.qr_code_scanner, color: Colors.white, size: 40), ), ); } diff --git a/lib/Components/ScannerDialog.dart b/lib/Components/ScannerDialog.dart index 049b94c..78ae5f4 100644 --- a/lib/Components/ScannerDialog.dart +++ b/lib/Components/ScannerDialog.dart @@ -60,7 +60,7 @@ class _ScannerDialogState extends State { height: 45, decoration: BoxDecoration( shape: BoxShape.rectangle, - color: kBlue1, + color: kMainColor1, borderRadius: BorderRadius.circular(20.0), ), margin: const EdgeInsets.all(8), @@ -85,7 +85,7 @@ class _ScannerDialogState extends State { height: 45, decoration: BoxDecoration( shape: BoxShape.rectangle, - color: kBlue1, + color: kMainColor1, borderRadius: BorderRadius.circular(20.0), ), margin: const EdgeInsets.all(8), @@ -120,7 +120,7 @@ class _ScannerDialogState extends State { key: qrKey, onQRViewCreated: _onQRViewCreated, overlay: QrScannerOverlayShape( - borderColor: kBlue1, + borderColor: kMainColor1, borderRadius: 10, borderLength: 25, borderWidth: 5, @@ -140,30 +140,52 @@ class _ScannerDialogState extends State { controller.scannedDataStream.listen((scanData) { setState(() { result = scanData; + var code = result == null ? "" : result!.code.toString(); if(result!.format == BarcodeFormat.qrcode) { controller.pauseCamera(); + + RegExp regExp = RegExp(r'^(?:https:\/\/web\.myinfomate\.be\/([^\/]+)\/([^\/]+)\/([^\/]+)|([^\/]+))$'); + var match = regExp.firstMatch(code); + String? instanceId; + String? configurationId; + String? sectionId; + + if (match != null) { + instanceId = match.group(1); + configurationId = match.group(2); + sectionId = match.group(3) ?? match.group(4); + + print('InstanceId: $instanceId'); + print('ConfigurationId: $configurationId'); + print('SectionId: $sectionId'); + } else { + print('L\'URL ne correspond pas au format attendu.'); + } + + //print("QR CODE FOUND"); /*ScaffoldMessenger.of(context).showSnackBar( SnackBar(content: Text('QR CODE FOUND - ${code.toString()}')), );*/ VisitAppContext visitAppContext = widget.appContext!.getContext(); - if(!visitAppContext.sectionIds!.contains(code)) { + + if(!visitAppContext.sectionIds!.contains(sectionId) || sectionId == null) { ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(TranslationHelper.getFromLocale('invalidQRCode', widget.appContext!.getContext())), backgroundColor: kBlue2), + SnackBar(content: Text(TranslationHelper.getFromLocale('invalidQRCode', widget.appContext!.getContext())), backgroundColor: kMainColor2), ); Navigator.of(context).pop(); } else { - SectionDTO section = visitAppContext.currentSections!.firstWhere((cs) => cs!.id == code)!; + SectionDTO section = visitAppContext.currentSections!.firstWhere((cs) => cs!.id == sectionId)!; switch(section.type) { case SectionType.Article: Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) { - return ArticlePage(visitAppContextIn: visitAppContext, articleId: code); + return ArticlePage(visitAppContextIn: visitAppContext, articleId: section.id!); }, ), ); @@ -173,7 +195,7 @@ class _ScannerDialogState extends State { context, MaterialPageRoute( builder: (context) { - return QuizzPage(visitAppContextIn: visitAppContext, sectionId: code); + return QuizzPage(visitAppContextIn: visitAppContext, sectionId: section.id!); }, ), ); diff --git a/lib/Components/ShowImagePopup.dart b/lib/Components/ShowImagePopup.dart index 19c538b..34b8c00 100644 --- a/lib/Components/ShowImagePopup.dart +++ b/lib/Components/ShowImagePopup.dart @@ -10,7 +10,7 @@ import 'package:mymuseum_visitapp/app_context.dart'; import 'package:mymuseum_visitapp/constants.dart'; import 'package:photo_view/photo_view.dart'; -void showImagePopup(ImageDTO imageDTO, ResourceModel resourceModel, AppContext appContext, BuildContext context, Size size) { +void showImagePopup(ContentDTO contentDTO, ResourceModel resourceModel, AppContext appContext, BuildContext context, Size size) { showDialog( builder: (BuildContext context) => AlertDialog( shape: const RoundedRectangleBorder( @@ -19,11 +19,11 @@ void showImagePopup(ImageDTO imageDTO, ResourceModel resourceModel, AppContext a content: SingleChildScrollView( child: Column( children: [ - if(TranslationHelper.get(imageDTO.title, appContext.getContext()).isNotEmpty) + if(TranslationHelper.get(contentDTO.title, appContext.getContext()).isNotEmpty) Padding( padding: const EdgeInsets.only(top: 8.0, left:8.0, right: 8.0), child: HtmlWidget( - TranslationHelper.get(imageDTO.title, appContext.getContext()), + TranslationHelper.get(contentDTO.title, appContext.getContext()), textStyle: const TextStyle(fontSize: kArticleContentSize, fontWeight: FontWeight.w400)), ), SizedBox( diff --git a/lib/Components/SliderImages.dart b/lib/Components/SliderImages.dart index f820ca1..d96603f 100644 --- a/lib/Components/SliderImages.dart +++ b/lib/Components/SliderImages.dart @@ -1,5 +1,5 @@ import 'dart:convert'; -import 'package:carousel_slider/carousel_slider.dart'; +import 'package:mymuseum_visitapp/Components/Carousel/carousel_slider.dart' as cs; import 'package:flutter/material.dart'; import 'package:manager_api/api.dart'; import 'package:mymuseum_visitapp/Components/ShowImagePopup.dart'; @@ -11,9 +11,9 @@ import 'package:provider/provider.dart'; class SliderImagesWidget extends StatefulWidget { final List resources; - final List imagesDTO; + final List contentsDTO; final double height; - SliderImagesWidget({required this.resources, required this.height, required this.imagesDTO}); + SliderImagesWidget({required this.resources, required this.height, required this.contentsDTO}); @override _SliderImagesWidget createState() => _SliderImagesWidget(); @@ -21,12 +21,12 @@ class SliderImagesWidget extends StatefulWidget { class _SliderImagesWidget extends State { List resourcesInWidget = []; - late CarouselController? sliderController; + late cs.CarouselController? sliderController; final ValueNotifier currentIndex = ValueNotifier(1); @override void initState() { - sliderController = CarouselController(); + sliderController = cs.CarouselController(); resourcesInWidget = widget.resources; super.initState(); } @@ -52,10 +52,10 @@ class _SliderImagesWidget extends State { mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ if(resourcesInWidget.isNotEmpty) - CarouselSlider( + cs.CarouselSlider( carouselController: sliderController, - options: CarouselOptions( - onPageChanged: (int index, CarouselPageChangedReason reason) { + options: cs.CarouselOptions( + onPageChanged: (int index, cs.CarouselPageChangedReason reason) { //setState(() { //print("SET STATE"); currentIndex.value = index + 1; @@ -73,7 +73,7 @@ class _SliderImagesWidget extends State { padding: const EdgeInsets.only(top: 5.0), child: InkWell( onTap: () { - showImagePopup(widget.imagesDTO[currentIndex.value-1]!, i!, appContext, context, size); + showImagePopup(widget.contentsDTO[currentIndex.value-1]!, i!, appContext, context, size); }, child: ClipRRect( borderRadius: BorderRadius.circular(15.0), @@ -88,7 +88,7 @@ class _SliderImagesWidget extends State { } return Center( child: CircularProgressIndicator( - color: kBlue1, + color: kMainColor1, value: loadingProgress.expectedTotalBytes != null ? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes! @@ -126,7 +126,7 @@ class _SliderImagesWidget extends State { child: const Icon( Icons.chevron_right, size: 45, - color: kBlue2, + color: kMainColor2, ), ) ), @@ -143,7 +143,7 @@ class _SliderImagesWidget extends State { child: const Icon( Icons.chevron_left, size: 45, - color: kBlue2, + color: kMainColor2, ), ) ), @@ -159,7 +159,7 @@ class _SliderImagesWidget extends State { builder: (context, value, _) { return Text( currentIndex.value.toString()+'/'+resourcesInWidget.length.toString(), - style: const TextStyle(fontSize: kArticleContentSize, fontWeight: FontWeight.w500, color: kBlue2), + style: const TextStyle(fontSize: kArticleContentSize, fontWeight: FontWeight.w500, color: kMainColor2), ); }, ) diff --git a/lib/Components/loading_common.dart b/lib/Components/loading_common.dart new file mode 100644 index 0000000..96396a9 --- /dev/null +++ b/lib/Components/loading_common.dart @@ -0,0 +1,110 @@ +import 'dart:io'; + +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:manager_api/api.dart'; +import 'package:mymuseum_visitapp/Models/visitContext.dart'; +import 'package:mymuseum_visitapp/app_context.dart'; +import 'package:mymuseum_visitapp/constants.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:provider/provider.dart'; + +class LoadingCommon extends StatefulWidget { + const LoadingCommon({Key? key}) : super(key: key); + + @override + State createState() => _LoadingCommonState(); +} + +class _LoadingCommonState extends State with TickerProviderStateMixin { + AnimationController? _controller; + + @override + void initState() { + _controller = AnimationController( + duration: const Duration(milliseconds: 5000), + vsync: this, + )..repeat(); + super.initState(); + } + + @override + void dispose() { + _controller!.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + final appContext = Provider.of(context); + VisitAppContext visitAppContext = appContext.getContext(); + + Size size = MediaQuery.of(context).size; + _controller!.forward(from: 0.0); + _controller!.addListener(() { + if (_controller!.isCompleted) { + _controller!.reverse(); + } + if(_controller!.isDismissed){ + _controller!.forward(); + } + }); + + var primaryColor = visitAppContext.configuration != null ? visitAppContext.configuration!.primaryColor != null ? new Color(int.parse(visitAppContext.configuration!.primaryColor!.split('(0x')[1].split(')')[0], radix: 16)) : kMainColor1 : kMainColor1; + return Center( + child: SizedBox( + height: size.height * 0.1, + child: RotationTransition( + turns: Tween(begin: 0.0, end: 3.0).animate(_controller!), + child: visitAppContext.configuration != null && visitAppContext.configuration!.loaderImageUrl != null ? + //Image.network(tabletAppContext.configuration!.loaderImageUrl!) + // TODO Replace by CustomCacheResource.. + FutureBuilder( + future: _checkIfLocalResourceExists(visitAppContext, visitAppContext.configuration!.loaderImageId!), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + // Loader ou indicateur de chargement pendant la vérification + return const CircularProgressIndicator(); + } else if (snapshot.hasError || snapshot.data == null) { + // Si la ressource locale n'existe pas ou s'il y a une erreur + print("not a local loader succck"); + return CachedNetworkImage( + imageUrl: visitAppContext.configuration!.loaderImageUrl!, + progressIndicatorBuilder: (context, url, downloadProgress) => CircularProgressIndicator(value: downloadProgress.progress, color: primaryColor), + errorWidget: (context, url, error) => const Icon(Icons.error), + ); + } else { + print("Its a local loaaader yeah"); + return Image.file( + snapshot.data!, + ); + } + }, + ) + : Icon(Icons.museum_outlined, color: kMainColor2, size: size.height*0.1), + ), + ), + ); + } +} + +Future _checkIfLocalResourceExists(VisitAppContext visitAppContext, String resourceId) async { + try { + Directory? appDocumentsDirectory = Platform.isIOS ? await getApplicationDocumentsDirectory() : await getDownloadsDirectory(); + String localPath = appDocumentsDirectory!.path; + Directory configurationDirectory = Directory('$localPath/${visitAppContext.configuration!.id}'); + List fileList = configurationDirectory.listSync(); + + if(fileList.any((fileL) => fileL.uri.pathSegments.last.contains(resourceId))) { + File file = File(fileList.firstWhere((fileL) => fileL.uri.pathSegments.last.contains(resourceId)).path); + return file; + } + } catch(e) { + print("ERROR _checkIfLocalResourceExists CachedCustomResource"); + print(e); + } + + return null; +} + + diff --git a/lib/Helpers/translationHelper.dart b/lib/Helpers/translationHelper.dart index 53fe129..7d3baf2 100644 --- a/lib/Helpers/translationHelper.dart +++ b/lib/Helpers/translationHelper.dart @@ -12,6 +12,14 @@ class TranslationHelper { } } + static String getWithResource(List? translationAndResourceDTO, VisitAppContext visitAppContext) { + try { + return translationAndResourceDTO!.where((element) => element.language == visitAppContext.language).first.value!; + } catch (_) { + return ""; + } + } + static String getFromLocale(String valueToGet, VisitAppContext visitAppContext) { try { return translations.where((element) => element.language == visitAppContext.language).first.data![valueToGet]!; diff --git a/lib/Models/ResponseSubDTO.dart b/lib/Models/ResponseSubDTO.dart index 4f92d59..2c7fce0 100644 --- a/lib/Models/ResponseSubDTO.dart +++ b/lib/Models/ResponseSubDTO.dart @@ -1,7 +1,7 @@ import 'package:manager_api/api.dart'; class ResponseSubDTO { - List? label; + List? label; bool? isGood; int? order; @@ -25,14 +25,14 @@ class ResponseSubDTO { } class QuestionSubDTO { - List? label; + List? label; List? responsesSubDTO; int? chosen; String? resourceId; - String? source_; + String? resourceUrl; int? order; - QuestionSubDTO({this.label, this.responsesSubDTO, this.chosen, this.resourceId, this.source_, this.order}); + QuestionSubDTO({this.label, this.responsesSubDTO, this.chosen, this.resourceId, this.resourceUrl, this.order}); List fromJSON(List questionsDTO) { List questionSubDTO = []; @@ -42,8 +42,8 @@ class QuestionSubDTO { chosen: null, label: questionDTO.label, responsesSubDTO: ResponseSubDTO().fromJSON(questionDTO.responses!), - resourceId: questionDTO.resourceId, - source_: questionDTO.source_, + resourceId: questionDTO.imageBackgroundResourceId, + resourceUrl: questionDTO.imageBackgroundResourceUrl, order: questionDTO.order, )); } diff --git a/lib/Models/visitContext.dart b/lib/Models/visitContext.dart index 6647824..07239fd 100644 --- a/lib/Models/visitContext.dart +++ b/lib/Models/visitContext.dart @@ -7,7 +7,9 @@ import 'package:mymuseum_visitapp/Models/resourceModel.dart'; class VisitAppContext with ChangeNotifier{ String? id = ""; String? language = ""; - String? instanceId = "63514fd67ed8c735aaa4b8f1"; // Fort de Saint-Héribert instance id : 633ee379d9405f32f166f047 // 63514fd67ed8c735aaa4b8f1 Mymuseum test + String? instanceId = "63514fd67ed8c735aaa4b8f2"; // 63514fd67ed8c735aaa4b8f2 MyInfoMate test instance -- Fort de Saint-Héribert Mymuseum instance id : 633ee379d9405f32f166f047 // 63514fd67ed8c735aaa4b8f1 Mymuseum test + + List? configurations; ConfigurationDTO? configuration; List? sectionIds; // Use to valid QR code found diff --git a/lib/Screens/Article/article_page.dart b/lib/Screens/Article/article_page.dart index a2bebbd..dfbd322 100644 --- a/lib/Screens/Article/article_page.dart +++ b/lib/Screens/Article/article_page.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:manager_api/api.dart'; import 'package:mymuseum_visitapp/Components/CustomAppBar.dart'; -import 'package:mymuseum_visitapp/Components/Loading.dart'; +import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Components/SliderImages.dart'; import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; @@ -115,7 +115,7 @@ class _ArticlePageState extends State { ); } } else { - return const Loading(); + return const LoadingCommon(); } } ), @@ -124,7 +124,7 @@ class _ArticlePageState extends State { builder: (context, AsyncSnapshot snapshot) { return Padding( padding: EdgeInsets.only(right: 0, top: 0), //size.height*0.1 - child: audioResourceModel != null ? AudioPlayerFloatingContainer(audioBytes: audiobytes, isAuto: articleDTO!.isReadAudioAuto!) : null, + child: audioResourceModel != null && audioResourceModel!.source != null ? AudioPlayerFloatingContainer(file: null, audioBytes: null, resourceURl: audioResourceModel!.source!, isAuto: articleDTO!.isReadAudioAuto!) : null, ); } ), @@ -142,7 +142,7 @@ class _ArticlePageState extends State { child: Container( decoration: BoxDecoration( border: Border.all( - color: kBlue2, + color: kMainColor2, width: 0.5, ), color: Colors.white, @@ -153,7 +153,7 @@ class _ArticlePageState extends State { child: SliderImagesWidget( resources: resourcesModel, height: size.height * 0.29, - imagesDTO: articleDTO!.images!, + contentsDTO: articleDTO!.contents!, ) ) ) @@ -167,7 +167,7 @@ class _ArticlePageState extends State { child: Container( decoration: BoxDecoration( border: Border.all( - color: kBlue2, + color: kMainColor2, width: 0.5, ), color: Colors.white, @@ -178,7 +178,7 @@ class _ArticlePageState extends State { child: SliderImagesWidget( resources: resourcesModel, height: size.height * 0.29, - imagesDTO: articleDTO!.images!, + contentsDTO: articleDTO!.contents!, ) ) ) @@ -198,7 +198,7 @@ class _ArticlePageState extends State { child: Container( decoration: BoxDecoration( border: Border.all( - color: kBlue2, + color: kMainColor2, width: 0.5, ), color: Colors.white, @@ -231,7 +231,7 @@ class _ArticlePageState extends State { child: Container( decoration: BoxDecoration( border: Border.all( - color: kBlue2, + color: kMainColor2, width: 0.5, ), color: Colors.white, @@ -328,9 +328,12 @@ class _ArticlePageState extends State { } else { + + ResourceDTO? resourceDTO = await client.resourceApi!.resourceGetDetail(audioIdArticle.first.value!); // ONLINE ResourceModel? resourceAudioOnline = await ApiService.downloadAudio(client, audioIdArticle.first.value!); if(resourceAudioOnline != null) { + resourceAudioOnline.source = resourceDTO!.url; audioResourceModel = resourceAudioOnline; Uint8List base64String = base64Decode(resourceAudioOnline.data!); audiobytes = base64String; @@ -341,8 +344,8 @@ class _ArticlePageState extends State { } } - if(articleDTO!.images!.isNotEmpty && !isAudio) { - for (var image in articleDTO!.images!) { + if(articleDTO!.contents!.isNotEmpty && !isAudio) { + for (var image in articleDTO!.contents!) { if(image.resourceId != null) { if(isConfigOffline) { @@ -360,7 +363,7 @@ class _ArticlePageState extends State { // Not needed as it's in display logic //ResourceModel? resourceImageOnline = await ApiService.downloadImage(client, image); //if(resourceImageOnline != null) { - resourcesModel.add(ResourceModel(id: image.resourceId, source: image.source_, type: ResourceType.Image)); + resourcesModel.add(ResourceModel(id: image.resourceId, source: image.resourceUrl, type: ResourceType.Image)); /*} else { print("EMPTY resourcesModel online - audio"); }*/ diff --git a/lib/Screens/Article/audio_player_floating.dart b/lib/Screens/Article/audio_player_floating.dart index 1a5b8e8..d1898a0 100644 --- a/lib/Screens/Article/audio_player_floating.dart +++ b/lib/Screens/Article/audio_player_floating.dart @@ -1,19 +1,21 @@ +import 'dart:io'; import 'dart:typed_data'; - -//import 'package:audioplayers/audioplayers.dart'; import 'package:flutter/material.dart'; -import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; +import 'package:mymuseum_visitapp/Models/visitContext.dart'; import 'package:mymuseum_visitapp/app_context.dart'; import 'package:mymuseum_visitapp/constants.dart'; import 'package:provider/provider.dart'; import 'package:just_audio/just_audio.dart'; +import 'package:just_audio_cache/just_audio_cache.dart'; class AudioPlayerFloatingContainer extends StatefulWidget { - const AudioPlayerFloatingContainer({Key? key, required this.audioBytes, required this.isAuto}) : super(key: key); + const AudioPlayerFloatingContainer({Key? key, required this.file, required this.audioBytes, required this.resourceURl, required this.isAuto}) : super(key: key); - final Uint8List audioBytes; + final File? file; + final Uint8List? audioBytes; + final String resourceURl; final bool isAuto; @override @@ -22,7 +24,7 @@ class AudioPlayerFloatingContainer extends StatefulWidget { class _AudioPlayerFloatingContainerState extends State { AudioPlayer player = AudioPlayer(); - late Uint8List audiobytes; + Uint8List? audiobytes = null; bool isplaying = false; bool audioplayed = false; int currentpos = 0; @@ -32,20 +34,27 @@ class _AudioPlayerFloatingContainerState extends State fileToUint8List(File file) async { + List bytes = await file.readAsBytes(); + return Uint8List.fromList(bytes); + } + @override Widget build(BuildContext context) { final appContext = Provider.of(context); - + VisitAppContext visitAppContext = appContext.getContext(); return FloatingActionButton( - backgroundColor: kBlue1.withOpacity(0.7), + backgroundColor: kMainColor1, onPressed: () async { - print("TODO"); if(!isplaying && !audioplayed){ //player.play(BytesSource(audiobytes)); - await player.setAudioSource(LoadedSource(audiobytes)); + //await player.setUrl(widget.resourceURl); player.play(); setState(() { isplaying = true; diff --git a/lib/Screens/Home/configurations_list.dart b/lib/Screens/Home/configurations_list.dart index 63dbfc0..a98f75a 100644 --- a/lib/Screens/Home/configurations_list.dart +++ b/lib/Screens/Home/configurations_list.dart @@ -5,7 +5,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:manager_api/api.dart'; import 'package:mymuseum_visitapp/Components/LanguageSelection.dart'; -import 'package:mymuseum_visitapp/Components/Loading.dart'; +import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; import 'package:mymuseum_visitapp/Models/visitContext.dart'; import 'package:mymuseum_visitapp/Screens/Visit/visit.dart'; @@ -66,7 +66,7 @@ class _ConfigurationsListState extends State { SnackBar( content: Text(TranslationHelper.getFromLocale( "languageNotSupported", appContext.getContext())), - backgroundColor: kBlue2), + backgroundColor: kMainColor2), ); } else { // Update context @@ -88,7 +88,7 @@ class _ConfigurationsListState extends State { SnackBar( content: Text(TranslationHelper.getFromLocale( "visitDownloadWarning", appContext.getContext())), - backgroundColor: kBlue2), + backgroundColor: kMainColor2), ); } else { // Online mode @@ -98,7 +98,7 @@ class _ConfigurationsListState extends State { SnackBar( content: Text(TranslationHelper.getFromLocale( "languageNotSupported", appContext.getContext())), - backgroundColor: kBlue2), + backgroundColor: kMainColor2), ); } else { visitAppContext.configuration = configurations[index]; @@ -161,7 +161,7 @@ class _ConfigurationsListState extends State { return Center( child: CircularProgressIndicator( - color: kBlue1, + color: kMainColor1, value: loadingProgress .expectedTotalBytes != null @@ -184,7 +184,7 @@ class _ConfigurationsListState extends State { return Center( child: SizedBox( height: size.height * 0.15, - child: const Loading())); + child: const LoadingCommon())); } }), ), @@ -220,7 +220,7 @@ class _ConfigurationsListState extends State { height: 45, decoration: BoxDecoration( shape: BoxShape.rectangle, - color: kBlue1, + color: kMainColor1, borderRadius: BorderRadius.circular(20.0), ), margin: const EdgeInsets.all(8), @@ -361,12 +361,12 @@ boxDecoration(ConfigurationDTO configuration, bool isSelected) { shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(20.0), border: Border.all( - color: kBlue0.withOpacity(0.35), + color: kMainColor0.withOpacity(0.35), width: 0.2, ), boxShadow: [ BoxShadow( - color: kBlue0.withOpacity(0.35), + color: kBackgroundGrey.withOpacity(0.35), //spreadRadius: 0.15, blurRadius: 27, offset: const Offset(0, 15), // changes position of shadow diff --git a/lib/Screens/Home/home.dart b/lib/Screens/Home/home.dart index 95f9be3..293e014 100644 --- a/lib/Screens/Home/home.dart +++ b/lib/Screens/Home/home.dart @@ -6,7 +6,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/services.dart'; import 'package:manager_api/api.dart'; import 'package:mymuseum_visitapp/Components/CustomAppBar.dart'; -import 'package:mymuseum_visitapp/Components/Loading.dart'; +import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; import 'package:mymuseum_visitapp/Helpers/modelsHelper.dart'; import 'package:mymuseum_visitapp/Helpers/networkCheck.dart'; @@ -78,7 +78,7 @@ class _HomePageState extends State with WidgetsBindingObserver { return Center( child: Container( height: size.height * 0.15, - child: Loading() + child: LoadingCommon() ) ); } @@ -126,7 +126,7 @@ class _HomePageState extends State with WidgetsBindingObserver { if(!isOnline) { ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(TranslationHelper.getFromLocale("noInternet", appContext.getContext())), backgroundColor: kBlue2), + SnackBar(content: Text(TranslationHelper.getFromLocale("noInternet", appContext.getContext())), backgroundColor: kMainColor2), ); // GET ALL SECTIONIDS FOR ALL CONFIGURATION (OFFLINE) diff --git a/lib/Screens/Quizz/questions_list.dart b/lib/Screens/Quizz/questions_list.dart index 6b0fca2..987fe95 100644 --- a/lib/Screens/Quizz/questions_list.dart +++ b/lib/Screens/Quizz/questions_list.dart @@ -1,4 +1,4 @@ -import 'package:carousel_slider/carousel_slider.dart'; +import 'package:mymuseum_visitapp/Components/Carousel/carousel_slider.dart' as cs; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; @@ -23,7 +23,7 @@ class QuestionsListWidget extends StatefulWidget { class _QuestionsListWidget extends State { List _questionsSubDTO = []; - CarouselController? sliderController; + cs.CarouselController? sliderController; int currentIndex = 1; bool kIsWeb = false; @@ -31,7 +31,7 @@ class _QuestionsListWidget extends State { @override void initState() { super.initState(); - sliderController = CarouselController(); + sliderController = cs.CarouselController(); _questionsSubDTO = widget.questionsSubDTO!; } @@ -69,10 +69,10 @@ class _QuestionsListWidget extends State { mainAxisAlignment: MainAxisAlignment.start, children: [ if(_questionsSubDTO.isNotEmpty) - CarouselSlider( + cs.CarouselSlider( carouselController: sliderController, - options: CarouselOptions( - onPageChanged: (int index, CarouselPageChangedReason reason) { + options: cs.CarouselOptions( + onPageChanged: (int index, cs.CarouselPageChangedReason reason) { setState(() { currentIndex = index + 1; }); @@ -95,11 +95,11 @@ class _QuestionsListWidget extends State { //color: Colors.orange, //kBackgroundLight shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(20.0), - image: i.source_ != null ? DecorationImage( + image: i.resourceUrl != null ? DecorationImage( fit: BoxFit.cover, opacity: 0.35, image: NetworkImage( - i.source_!, + i.resourceUrl!, ), ): null, boxShadow: const [ @@ -143,7 +143,7 @@ class _QuestionsListWidget extends State { child: Padding( padding: const EdgeInsets.all(2.5), child: HtmlWidget( - TranslationHelper.get(i.label, appContext.getContext() as VisitAppContext), + TranslationHelper.getWithResource(i.label, appContext.getContext() as VisitAppContext), //textAlign: TextAlign.center, customStylesBuilder: (element) { return {'text-align': 'center'}; @@ -211,14 +211,14 @@ class _QuestionsListWidget extends State { child: Container( alignment: Alignment.center, child: HtmlWidget( - TranslationHelper.get(i.responsesSubDTO![index].label, appContext.getContext() as VisitAppContext), + TranslationHelper.getWithResource(i.responsesSubDTO![index].label, appContext.getContext() as VisitAppContext), //textAlign: TextAlign.center, customStylesBuilder: (element) { return {'text-align': 'center'}; }, textStyle: TextStyle(fontSize: kDescriptionSize, color: i.chosen == index ? Colors.white : Colors.black)), decoration: BoxDecoration( - color: !widget.isShowResponse ? i.chosen == index ? kTestSecondColor : kBackgroundLight : i.responsesSubDTO![index].isGood! ? kGreen : i.chosen == index ? kTextRed : kBackgroundLight, + color: !widget.isShowResponse ? i.chosen == index ? kMainColor1 : kBackgroundLight : i.responsesSubDTO![index].isGood! ? kGreen : i.chosen == index ? kTextRed : kBackgroundLight, shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(10.0), boxShadow: const [ diff --git a/lib/Screens/Quizz/quizz_page.dart b/lib/Screens/Quizz/quizz_page.dart index 82af330..f88a1f3 100644 --- a/lib/Screens/Quizz/quizz_page.dart +++ b/lib/Screens/Quizz/quizz_page.dart @@ -2,12 +2,13 @@ import 'dart:convert'; import 'dart:developer'; import 'dart:typed_data'; -import 'package:carousel_slider/carousel_slider.dart'; +import 'package:mymuseum_visitapp/Components/Carousel/carousel_slider.dart' as cs; //import 'package:confetti/confetti.dart'; import 'package:flutter/material.dart'; import 'package:manager_api/api.dart'; import 'package:mymuseum_visitapp/Components/CustomAppBar.dart'; import 'package:mymuseum_visitapp/Components/Loading.dart'; +import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Components/rounded_button.dart'; import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; @@ -105,7 +106,7 @@ class _QuizzPageState extends State { } } log("goodResponses =" + goodResponses.toString()); - QuizzDTOBadLevel levelToShow = QuizzDTOBadLevel(); + LevelDTO levelToShow = LevelDTO(); var test = goodResponses/quizzDTO!.questions!.length; if((0 == test || test < 0.25) && quizzDTO!.badLevel != null) { @@ -139,7 +140,7 @@ class _QuizzPageState extends State { kMainColor, kSecondColor, kConfigurationColor, - kTestSecondColor + kMainColor1 //Colors.pink, //Colors.orange, //Colors.purple @@ -151,8 +152,8 @@ class _QuizzPageState extends State { if (orientation == Orientation.portrait) Column( children: [ - if (!showResponses && levelToShow.source_ != null) - resultImage(size, levelToShow, orientation), + if (!showResponses && levelToShow.label!.firstWhere((label) => label.language == visitAppContext!.language).resourceUrl != null) // TODO SUPPORT OTHER THAN IMAGES + resultImage(visitAppContext!, size, levelToShow, orientation), if(!showResponses) // TEXT BOX WITH MAIN SCORE Text('$goodResponses/${quizzDTO!.questions!.length}', textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? (showResponses ? 60 : 100) : 75, color: kBackgroundSecondGrey)), @@ -167,8 +168,8 @@ class _QuizzPageState extends State { if(!showResponses) // TEXT BOX WITH MAIN SCORE Text('$goodResponses/${quizzDTO!.questions!.length}', textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? (showResponses ? 60 : 100) : 75, color: kBackgroundSecondGrey)), - if (!showResponses && levelToShow.source_ != null) - resultImage(size, levelToShow, orientation), + if (!showResponses && levelToShow.label!.firstWhere((label) => label.language == visitAppContext!.language).resourceUrl != null) + resultImage(visitAppContext!, size, levelToShow, orientation), ], ), @@ -216,7 +217,7 @@ class _QuizzPageState extends State { ); } } else { - return const Loading(); + return const LoadingCommon(); } } ); @@ -284,8 +285,8 @@ class _QuizzPageState extends State { if(isConfigOffline) { // OFFLINE - if(question.resourceId != null) { - List> ressourceQuizz = await DatabaseHelper.instance.queryWithColumnId(DatabaseTableType.resources, question.resourceId!); + if(question.imageBackgroundResourceId != null) { + List> ressourceQuizz = await DatabaseHelper.instance.queryWithColumnId(DatabaseTableType.resources, question.imageBackgroundResourceId!); if(ressourceQuizz.isNotEmpty) { resourcesModel.add(DatabaseHelper.instance.getResourceFromDB(ressourceQuizz.first)); } else { @@ -296,8 +297,8 @@ class _QuizzPageState extends State { else { // ONLINE - if(question.resourceId != null) { - resourcesModel.add(ResourceModel(id: question.resourceId, source: question.source_, type: ResourceType.Image)); + if(question.imageBackgroundResourceId != null) { + resourcesModel.add(ResourceModel(id: question.imageBackgroundResourceId, source: question.imageBackgroundResourceUrl, type: ResourceType.Image)); } } } @@ -317,7 +318,7 @@ class _QuizzPageState extends State { } } - resultImage(Size size, QuizzDTOBadLevel levelToShow, Orientation orientation) { + resultImage(VisitAppContext visitAppContext, Size size, LevelDTO levelToShow, Orientation orientation) { return Container( //height: size.height * 0.2, //width: size.width * 0.25, @@ -327,11 +328,11 @@ class _QuizzPageState extends State { ), alignment: Alignment.center, decoration: BoxDecoration( - image: levelToShow.source_ != null ? DecorationImage( + image: levelToShow.label!.where((label) => label.language == visitAppContext.language).isNotEmpty ? DecorationImage( fit: BoxFit.contain, opacity: 0.85, image: NetworkImage( - levelToShow.source_!, + levelToShow.label!.firstWhere((label) => label.language == visitAppContext.language).resourceUrl!, ), ): null, borderRadius: const BorderRadius.all( Radius.circular(50.0)), @@ -346,7 +347,7 @@ class _QuizzPageState extends State { color: const Color(0xff7c94b6), image: DecorationImage( image: NetworkImage( - levelToShow.source_!, + levelToShow.label!.firstWhere((label) => label.language == visitAppContext.language).resourceUrl!, // TODO REDUNDANCY here?? ), fit: BoxFit.cover, ), @@ -360,7 +361,7 @@ class _QuizzPageState extends State { ); } - resultText(Size size, QuizzDTOBadLevel levelToShow, AppContext appContext) { + resultText(Size size, LevelDTO levelToShow, AppContext appContext) { return Padding( padding: const EdgeInsets.only(bottom: 10), child: Container( @@ -385,7 +386,7 @@ class _QuizzPageState extends State { child: SingleChildScrollView( child: Padding( padding: const EdgeInsets.all(15.0), - child: Text(TranslationHelper.get(levelToShow.label, appContext.getContext() as VisitAppContext), textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kDescriptionSize : kDescriptionSize)), + child: Text(TranslationHelper.getWithResource(levelToShow.label, appContext.getContext() as VisitAppContext), textAlign: TextAlign.center, style: TextStyle(fontSize: kIsWeb ? kDescriptionSize : kDescriptionSize)), ), ), ), diff --git a/lib/Screens/Visit/beaconArticleFound.dart b/lib/Screens/Visit/beaconArticleFound.dart index c1846be..beb6a29 100644 --- a/lib/Screens/Visit/beaconArticleFound.dart +++ b/lib/Screens/Visit/beaconArticleFound.dart @@ -80,7 +80,7 @@ class _BeaconArticleFoundState extends State { } return Center( child: CircularProgressIndicator( - color: kBlue1, + color: kMainColor1, value: loadingProgress.expectedTotalBytes != null ? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes! diff --git a/lib/Screens/Visit/components/body.dart b/lib/Screens/Visit/components/body.dart index 40a3560..77f2ffa 100644 --- a/lib/Screens/Visit/components/body.dart +++ b/lib/Screens/Visit/components/body.dart @@ -1,7 +1,7 @@ import 'package:diacritic/diacritic.dart'; import 'package:flutter/material.dart'; import 'package:manager_api/api.dart'; -import 'package:mymuseum_visitapp/Components/Loading.dart'; +import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Components/SearchBox.dart'; import 'package:mymuseum_visitapp/Components/SearchNumberBox.dart'; import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; @@ -139,7 +139,7 @@ class _BodyState extends State { return Center( child: Container( height: size.height * 0.15, - child: Loading() + child: LoadingCommon() ) ); } diff --git a/lib/Screens/Visit/components/section_card.dart b/lib/Screens/Visit/components/section_card.dart index 5fca7fa..0bc7c04 100644 --- a/lib/Screens/Visit/components/section_card.dart +++ b/lib/Screens/Visit/components/section_card.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:manager_api/api.dart'; -import 'package:mymuseum_visitapp/Components/Loading.dart'; +import 'package:mymuseum_visitapp/Components/loading_common.dart'; import 'package:mymuseum_visitapp/Helpers/DatabaseHelper.dart'; import 'package:mymuseum_visitapp/Helpers/translationHelper.dart'; import 'package:mymuseum_visitapp/Models/articleRead.dart'; @@ -55,14 +55,14 @@ class SectionCard extends StatelessWidget { height: 136, decoration: BoxDecoration( borderRadius: BorderRadius.circular(22), - color: itemIndex.isEven ? kBlue0 : kBlue1, + color: itemIndex.isEven ? kMainColor0 : kMainColor1, ), child: Container( margin: const EdgeInsets.only(right: 10), decoration: BoxDecoration( color: visitAppContext.readSections.any((element) => element.id == sectionDTO.id) ? kBackgroundGrey : Colors.white, border: Border.all( - color: kBlue2, + color: kMainColor2, width: 0.2, ), borderRadius: BorderRadius.circular(22), @@ -102,7 +102,7 @@ class SectionCard extends StatelessWidget { } return Center( child: CircularProgressIndicator( - color: kBlue1, + color: kMainColor1, value: loadingProgress.expectedTotalBytes != null ? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes! @@ -118,7 +118,7 @@ class SectionCard extends StatelessWidget { return Center( child: SizedBox( height: size.height * 0.15, - child: const Loading() + child: const LoadingCommon() ) ); } @@ -155,7 +155,7 @@ class SectionCard extends StatelessWidget { vertical: kDefaultPadding / 4, // 5 top and bottom ), decoration: const BoxDecoration( - color: kBlue2, + color: kMainColor2, borderRadius: BorderRadius.only( bottomLeft: Radius.circular(22), topRight: Radius.circular(22), diff --git a/lib/Screens/Visit/visit.dart b/lib/Screens/Visit/visit.dart index 95f3f96..449fc66 100644 --- a/lib/Screens/Visit/visit.dart +++ b/lib/Screens/Visit/visit.dart @@ -502,7 +502,7 @@ class _VisitPageState extends State with WidgetsBindingObserver { } }, tooltip: 'Beacon', - backgroundColor: visitAppContext.isScanningBeacons ? kBlue1 : Colors.grey, + backgroundColor: visitAppContext.isScanningBeacons ? kMainColor1 : Colors.grey, child: const Icon(Icons.my_location), ), ), diff --git a/lib/Services/apiService.dart b/lib/Services/apiService.dart index ed70eee..e759288 100644 --- a/lib/Services/apiService.dart +++ b/lib/Services/apiService.dart @@ -21,7 +21,7 @@ class ApiService { if(configurations.isNotEmpty) { for(var configuration in configurations) { if(configuration.imageId != null) { - await downloadAndPushLocalImage(client, ImageDTO(source_: configuration.imageSource, resourceId: configuration.imageId)); + await downloadAndPushLocalImage(client, ContentDTO(resourceUrl: configuration.imageSource, resourceId: configuration.imageId)); } } } @@ -71,17 +71,17 @@ class ApiService { } } - static Future downloadAndPushLocalImage(Client client, ImageDTO imageDTO) async { + static Future downloadAndPushLocalImage(Client client, ContentDTO contentDTO) async { try { // Test if already here or not.. - List> resourceTest = await DatabaseHelper.instance.queryWithColumnId(DatabaseTableType.resources, imageDTO.resourceId!); + List> resourceTest = await DatabaseHelper.instance.queryWithColumnId(DatabaseTableType.resources, contentDTO.resourceId!); if(resourceTest.isNotEmpty) { return true; } else { bool isOnline = await hasNetwork(); if(isOnline) { - ResourceModel? resourceModel = await downloadImage(client, imageDTO); + ResourceModel? resourceModel = await downloadImage(client, contentDTO); if(resourceModel != null) { await DatabaseHelper.instance.insert(DatabaseTableType.resources, resourceModel.toMap()); } @@ -97,16 +97,16 @@ class ApiService { } } - static Future downloadImage(Client client, ImageDTO imageDTO) async { - var source = imageDTO.source_; + static Future downloadImage(Client client, ContentDTO contentDTO) async { + var source = contentDTO.resourceUrl; //print("SOURCE getAndDownloadImage"); - if(imageDTO.source_ != null) { - if(imageDTO.source_!.contains("localhost:5000")){ + if(contentDTO.resourceUrl != null) { + if(contentDTO.resourceUrl!.contains("localhost:5000")){ print("Contains localhost:5000"); - source = imageDTO.source_!.replaceAll("http://localhost:5000", client.apiApi!.basePath); + source = contentDTO.resourceUrl!.replaceAll("http://localhost:5000", client.apiApi!.basePath); } } else { - source = "https://api.mymuseum.be/api/Resource/"+imageDTO.resourceId!; // TODO UPDATE ROUTE + source = "https://api.mymuseum.be/api/Resource/"+contentDTO.resourceId!; // TODO UPDATE ROUTE } HttpClient client2 = HttpClient(); @@ -117,7 +117,7 @@ class ApiService { await for(dynamic d in response) { _downloadData.addAll(d); } //print("AFTER"); final base64Str = base64.encode(_downloadData); - ResourceModel resourceModel = ResourceModel(id: imageDTO.resourceId, source: imageDTO.source_, data: base64Str, type: ResourceType.Image); + ResourceModel resourceModel = ResourceModel(id: contentDTO.resourceId, source: contentDTO.resourceUrl, data: base64Str, type: ResourceType.Image); return resourceModel; } @@ -149,7 +149,7 @@ class ApiService { } static Future downloadAudio(Client client, String audioId) async { - var url = "https://api.mymuseum.be/api/Resource/"+audioId; // TO TEST TODO UPDATE ROUTE + var url = "https://api.myinfomate.be/api/Resource/"+audioId; // TO TEST TODO UPDATE ROUTE HttpClient client2 = HttpClient(); var _downloadData = []; final HttpClientRequest request = await client2.getUrl(Uri.parse(url)); @@ -181,7 +181,7 @@ class ApiService { try { bool isOnline = await hasNetwork(); if(isOnline) { - ExportConfigurationDTO? exportConfiguration = await client.configurationApi!.configurationExport(configurationId, language: language); + ExportConfigurationDTO? exportConfiguration = await client.configurationApi!.configurationExport(configurationId, language); return exportConfiguration; } else { diff --git a/lib/Services/downloadConfiguration.dart b/lib/Services/downloadConfiguration.dart index 6bdcd48..6dc3122 100644 --- a/lib/Services/downloadConfiguration.dart +++ b/lib/Services/downloadConfiguration.dart @@ -56,7 +56,7 @@ class DownloadConfiguration { var imageData = exportConfigurationDTO.resources!.where((element) => element.id == configuration.imageId); if(imageData.isNotEmpty) { - ResourceModel resourceModel = ResourceModel(id: imageData.first.id, source: configuration.imageSource, data: imageData.first.data, type: imageData.first.type); + ResourceModel resourceModel = ResourceModel(id: imageData.first.id, source: configuration.imageSource, /*data: imageData.first.data,*/ type: imageData.first.type); try { await DatabaseHelper.instance.insert(DatabaseTableType.resources, resourceModel.toMap()); } catch (e) { @@ -88,7 +88,8 @@ class DownloadConfiguration { usedImageOrAudioIds.add(section.imageId!); var imageData = exportConfigurationDTO.resources!.where((element) => element.id == section.imageId); if(imageData.isNotEmpty) { - ResourceModel resourceModel = ResourceModel(id: imageData.first.id, source: section.imageSource, data: imageData.first.data, type: imageData.first.type); + // TODO get all resources from API + store it in download directory of the app + ResourceModel resourceModel = ResourceModel(id: imageData.first.id, source: section.imageSource, /*data: imageData.first.data,*/ type: imageData.first.type); try { await DatabaseHelper.instance.insert(DatabaseTableType.resources, resourceModel.toMap()); } catch (e) { @@ -101,11 +102,12 @@ class DownloadConfiguration { ArticleDTO? articleDTO = ArticleDTO.fromJson(jsonDecode(section.data!)); if(articleDTO != null) { - for(var image in articleDTO.images!) { + for(var image in articleDTO.contents!) { usedImageOrAudioIds.add(image.resourceId!); var imageData = exportConfigurationDTO.resources!.where((element) => element.id == image.resourceId); if(imageData.isNotEmpty) { - ResourceModel resourceModel = ResourceModel(id: imageData.first.id, source: image.source_, data: imageData.first.data, type: imageData.first.type); + // TODO get all resources from API + store it in download directory of the app + ResourceModel resourceModel = ResourceModel(id: imageData.first.id, source: image.resourceUrl, /*data: imageData.first.data,*/ type: imageData.first.type); try { await DatabaseHelper.instance.insert(DatabaseTableType.resources, resourceModel.toMap()); } catch (e) { @@ -146,7 +148,8 @@ class DownloadConfiguration { Future> importAudio(VisitAppContext visitAppContext, ExportConfigurationDTO exportConfigurationDTO, String audioId, List audiosNotWorking) async { var audioData = exportConfigurationDTO.resources!.where((element) => element.id == audioId); if(audioData.isNotEmpty) { - ResourceModel resourceModel = ResourceModel(id: audioData.first.id, source: "", data: audioData.first.data, type: audioData.first.type); + // TODO get all resources from API + store it in download directory of the app + ResourceModel resourceModel = ResourceModel(id: audioData.first.id, source: "", /*data: audioData.first.data,*/ type: audioData.first.type); try { await DatabaseHelper.instance.insert(DatabaseTableType.resources, resourceModel.toMap()); return audiosNotWorking; diff --git a/lib/api/swagger.yaml b/lib/api/swagger.yaml index 9c7c43a..c6fe041 100644 --- a/lib/api/swagger.yaml +++ b/lib/api/swagger.yaml @@ -5,7 +5,7 @@ info: description: API Manager Service version: Version Alpha servers: - - url: https://api.mymuseum.be + - url: https://api.myinfomate.be paths: /api/Configuration: get: @@ -112,6 +112,39 @@ paths: type: string security: - bearer: [] + /api/Configuration/byPin: + get: + tags: + - Configuration + operationId: Configuration_GetConfigurationsByPinCode + parameters: + - name: pinCode + in: query + schema: + type: integer + format: int32 + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/ConfigurationDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string /api/Configuration/{id}: get: tags: @@ -670,6 +703,37 @@ paths: type: string security: - bearer: [] + /api/Instance/byPin: + get: + tags: + - Instance + operationId: Instance_GetInstanceByPinCode + parameters: + - name: pinCode + in: query + schema: + type: integer + format: int32 + x-position: 1 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/InstanceDTO' + '404': + description: '' + content: + application/json: + schema: + type: string + '500': + description: '' + content: + application/json: + schema: + type: string /api/Resource: get: tags: @@ -1399,6 +1463,48 @@ paths: $ref: '#/components/schemas/ArticleDTO' security: - bearer: [] + /api/Section/PdfDTO: + get: + tags: + - Section + operationId: Section_GetPdfDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PdfDTO' + security: + - bearer: [] + /api/Section/PuzzleDTO: + get: + tags: + - Section + operationId: Section_GetPuzzleDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/PuzzleDTO' + security: + - bearer: [] + /api/Section/AgendaDTO: + get: + tags: + - Section + operationId: Section_GetAgendaDTO + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/AgendaDTO' + security: + - bearer: [] /api/User: get: tags: @@ -1699,6 +1805,28 @@ components: nullable: true items: type: string + loaderImageId: + type: string + nullable: true + loaderImageUrl: + type: string + nullable: true + weatherCity: + type: string + nullable: true + weatherUpdatedDate: + type: string + format: date-time + nullable: true + weatherResult: + type: string + nullable: true + isWeather: + type: boolean + isDate: + type: boolean + isHour: + type: boolean TranslationDTO: type: object additionalProperties: false @@ -1770,6 +1898,7 @@ components: order: type: integer format: int32 + nullable: true instanceId: type: string nullable: true @@ -1799,6 +1928,9 @@ components: 4 = Menu 5 = Quizz 6 = Article + 7 = PDF + 8 = Puzzle + 9 = Agenda x-enumNames: - Map - Slider @@ -1807,6 +1939,9 @@ components: - Menu - Quizz - Article + - PDF + - Puzzle + - Agenda enum: - 0 - 1 @@ -1815,6 +1950,9 @@ components: - 4 - 5 - 6 + - 7 + - 8 + - 9 ResourceDTO: type: object additionalProperties: false @@ -1827,7 +1965,7 @@ components: label: type: string nullable: true - data: + url: type: string nullable: true dateCreation: @@ -1844,18 +1982,27 @@ components: 2 = ImageUrl 3 = VideoUrl 4 = Audio + 5 = PDF + 6 = JSON + 7 = JSONUrl x-enumNames: - Image - Video - ImageUrl - VideoUrl - Audio + - PDF + - JSON + - JSONUrl enum: - 0 - 1 - 2 - 3 - 4 + - 5 + - 6 + - 7 DeviceDTO: type: object additionalProperties: false @@ -1923,6 +2070,10 @@ components: dateCreation: type: string format: date-time + pinCode: + type: integer + format: int32 + nullable: true InstanceDTO: type: object additionalProperties: false @@ -1936,6 +2087,10 @@ components: dateCreation: type: string format: date-time + pinCode: + type: integer + format: int32 + nullable: true MapDTO: type: object additionalProperties: false @@ -1944,7 +2099,17 @@ components: type: integer format: int32 mapType: - $ref: '#/components/schemas/MapTypeApp' + nullable: true + oneOf: + - $ref: '#/components/schemas/MapTypeApp' + mapTypeMapbox: + nullable: true + oneOf: + - $ref: '#/components/schemas/MapTypeMapBox' + mapProvider: + nullable: true + oneOf: + - $ref: '#/components/schemas/MapProvider' points: type: array nullable: true @@ -1956,6 +2121,11 @@ components: iconSource: type: string nullable: true + categories: + type: array + nullable: true + items: + $ref: '#/components/schemas/CategorieDTO' MapTypeApp: type: integer description: |- @@ -1976,6 +2146,43 @@ components: - 2 - 3 - 4 + MapTypeMapBox: + type: integer + description: |- + 0 = standard + 1 = streets + 2 = outdoors + 3 = light + 4 = dark + 5 = satellite + 6 = satellite_streets + x-enumNames: + - standard + - streets + - outdoors + - light + - dark + - satellite + - satellite_streets + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + MapProvider: + type: integer + description: |- + 0 = Google + 1 = MapBox + x-enumNames: + - Google + - MapBox + enum: + - 0 + - 1 GeoPointDTO: type: object additionalProperties: false @@ -1983,6 +2190,7 @@ components: id: type: integer format: int32 + nullable: true title: type: array nullable: true @@ -1993,37 +2201,68 @@ components: nullable: true items: $ref: '#/components/schemas/TranslationDTO' - images: + contents: type: array nullable: true items: - $ref: '#/components/schemas/ImageGeoPoint' + $ref: '#/components/schemas/ContentGeoPoint' + categorie: + nullable: true + oneOf: + - $ref: '#/components/schemas/CategorieDTO' latitude: type: string nullable: true longitude: type: string nullable: true - ImageGeoPoint: + ContentGeoPoint: type: object additionalProperties: false properties: - imageResourceId: + resourceId: type: string nullable: true - imageSource: + resourceType: + $ref: '#/components/schemas/ResourceType' + resourceUrl: type: string nullable: true + resourceName: + type: string + nullable: true + CategorieDTO: + type: object + additionalProperties: false + properties: + label: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationDTO' + icon: + type: string + nullable: true + iconResourceId: + type: string + nullable: true + iconUrl: + type: string + nullable: true + order: + type: integer + format: int32 + nullable: true SliderDTO: type: object additionalProperties: false properties: - images: + contents: type: array nullable: true items: - $ref: '#/components/schemas/ImageDTO' - ImageDTO: + $ref: '#/components/schemas/ContentDTO' + ContentDTO: type: object additionalProperties: false properties: @@ -2040,12 +2279,14 @@ components: resourceId: type: string nullable: true - source: + resourceUrl: type: string nullable: true order: type: integer format: int32 + resourceType: + $ref: '#/components/schemas/ResourceType' VideoDTO: type: object additionalProperties: false @@ -2110,21 +2351,45 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/TranslationDTO' + $ref: '#/components/schemas/TranslationAndResourceDTO' responses: type: array nullable: true items: $ref: '#/components/schemas/ResponseDTO' - resourceId: + imageBackgroundResourceId: type: string nullable: true - source: + imageBackgroundResourceType: + nullable: true + oneOf: + - $ref: '#/components/schemas/ResourceType' + imageBackgroundResourceUrl: type: string nullable: true order: type: integer format: int32 + TranslationAndResourceDTO: + type: object + additionalProperties: false + properties: + language: + type: string + nullable: true + value: + type: string + nullable: true + resourceId: + type: string + nullable: true + resourceType: + nullable: true + oneOf: + - $ref: '#/components/schemas/ResourceType' + resourceUrl: + type: string + nullable: true ResponseDTO: type: object additionalProperties: false @@ -2133,7 +2398,7 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/TranslationDTO' + $ref: '#/components/schemas/TranslationAndResourceDTO' isGood: type: boolean order: @@ -2147,13 +2412,7 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/TranslationDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true + $ref: '#/components/schemas/TranslationAndResourceDTO' ArticleDTO: type: object additionalProperties: false @@ -2172,11 +2431,70 @@ components: $ref: '#/components/schemas/TranslationDTO' isReadAudioAuto: type: boolean - images: + contents: type: array nullable: true items: - $ref: '#/components/schemas/ImageDTO' + $ref: '#/components/schemas/ContentDTO' + PdfDTO: + type: object + additionalProperties: false + properties: + pdfs: + type: array + nullable: true + items: + $ref: '#/components/schemas/PDFFileDTO' + PDFFileDTO: + type: object + additionalProperties: false + properties: + pdfFilesAndTitles: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationAndResourceDTO' + order: + type: integer + format: int32 + nullable: true + PuzzleDTO: + type: object + additionalProperties: false + properties: + messageDebut: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationAndResourceDTO' + messageFin: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationAndResourceDTO' + image: + nullable: true + oneOf: + - $ref: '#/components/schemas/ContentDTO' + rows: + type: integer + format: int32 + cols: + type: integer + format: int32 + AgendaDTO: + type: object + additionalProperties: false + properties: + resourceIds: + type: array + nullable: true + items: + $ref: '#/components/schemas/TranslationDTO' + mapProvider: + nullable: true + oneOf: + - $ref: '#/components/schemas/MapProvider' User: type: object additionalProperties: false @@ -2246,6 +2564,10 @@ components: instanceId: type: string nullable: true + pinCode: + type: integer + format: int32 + nullable: true LoginDTO: type: object additionalProperties: false diff --git a/lib/api/swagger.yaml.bak0 b/lib/api/swagger.yaml.bak0 deleted file mode 100644 index efff24d..0000000 --- a/lib/api/swagger.yaml.bak0 +++ /dev/null @@ -1,1959 +0,0 @@ -x-generator: NSwag v13.10.8.0 (NJsonSchema v10.3.11.0 (Newtonsoft.Json v10.0.0.0)) -openapi: 3.0.0 -info: - title: Manager Service - description: API Manager Service - version: Version Alpha -servers: - - url: http://localhost:5000 -paths: - /api/Configuration: - get: - tags: - - Configuration - operationId: Configuration_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ConfigurationDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - post: - tags: - - Configuration - operationId: Configuration_Create - requestBody: - x-name: newConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Configuration - operationId: Configuration_Update - requestBody: - x-name: updatedConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Configuration/{id}: - get: - tags: - - Configuration - operationId: Configuration_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Configuration - operationId: Configuration_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Configuration/{id}/export: - get: - tags: - - Configuration - operationId: Configuration_Export - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Configuration/import: - post: - tags: - - Configuration - operationId: Configuration_Import - requestBody: - x-name: exportConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ExportConfigurationDTO' - required: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device: - get: - tags: - - Device - operationId: Device_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Device - operationId: Device_Create - requestBody: - x-name: newDevice - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - put: - tags: - - Device - operationId: Device_Update - requestBody: - x-name: updatedDevice - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device/{id}/detail: - get: - tags: - - Device - operationId: Device_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Device/mainInfos: - put: - tags: - - Device - operationId: Device_UpdateMainInfos - requestBody: - x-name: deviceIn - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device/{id}: - delete: - tags: - - Device - operationId: Device_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource: - get: - tags: - - Resource - operationId: Resource_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ResourceDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Resource - operationId: Resource_Create - requestBody: - x-name: newResource - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Resource - operationId: Resource_Update - requestBody: - x-name: updatedResource - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource/{id}/detail: - get: - tags: - - Resource - operationId: Resource_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Resource/{id}: - get: - tags: - - Resource - operationId: Resource_Show - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Resource - operationId: Resource_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource/upload: - post: - tags: - - Resource - operationId: Resource_Upload - requestBody: - content: - multipart/form-data: - schema: - properties: - label: - type: string - nullable: true - type: - type: string - nullable: true - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section: - get: - tags: - - Section - operationId: Section_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Section - operationId: Section_Create - requestBody: - x-name: newSection - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Section - operationId: Section_Update - requestBody: - x-name: updatedSection - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/configuration/{id}: - get: - tags: - - Section - operationId: Section_GetFromConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Section - operationId: Section_DeleteAllForConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/{id}/subsections: - get: - tags: - - Section - operationId: Section_GetAllSectionSubSections - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: {} - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/{id}: - get: - tags: - - Section - operationId: Section_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Section - operationId: Section_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/order: - put: - tags: - - Section - operationId: Section_UpdateOrder - requestBody: - x-name: updatedSectionsOrder - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/MapDTO: - get: - tags: - - Section - operationId: Section_GetMapDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/MapDTO' - security: - - bearer: [] - /api/Section/SliderDTO: - get: - tags: - - Section - operationId: Section_GetSliderDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SliderDTO' - security: - - bearer: [] - /api/Section/VideoDTO: - get: - tags: - - Section - operationId: Section_GetVideoDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/VideoDTO' - security: - - bearer: [] - /api/Section/WebDTO: - get: - tags: - - Section - operationId: Section_GetWebDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/WebDTO' - security: - - bearer: [] - /api/Section/MenuDTO: - get: - tags: - - Section - operationId: Section_GetMenuDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/MenuDTO' - security: - - bearer: [] - /api/Section/PlayerMessageDTO: - get: - tags: - - Section - operationId: Section_PlayerMessageDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/PlayerMessageDTO' - security: - - bearer: [] - /api/Section/QuizzDTO: - get: - tags: - - Section - operationId: Section_GetQuizzDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/QuizzDTO' - security: - - bearer: [] - /api/Section/ArticleDTO: - get: - tags: - - Section - operationId: Section_GetArticleDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ArticleDTO' - security: - - bearer: [] - /api/User: - get: - tags: - - User - operationId: User_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - User - operationId: User_CreateUser - requestBody: - x-name: newUser - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - put: - tags: - - User - operationId: User_UpdateUser - requestBody: - x-name: updatedUser - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/User/{id}: - get: - tags: - - User - operationId: User_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - delete: - tags: - - User - operationId: User_DeleteUser - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Authentication/Token: - post: - tags: - - Authentication - operationId: Authentication_AuthenticateWithForm - requestBody: - content: - multipart/form-data: - schema: - properties: - grant_type: - type: string - nullable: true - username: - type: string - nullable: true - password: - type: string - nullable: true - client_id: - type: string - nullable: true - client_secret: - type: string - nullable: true - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Authentication/Authenticate: - post: - tags: - - Authentication - operationId: Authentication_AuthenticateWithJson - requestBody: - x-name: login - content: - application/json: - schema: - $ref: '#/components/schemas/LoginDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string -components: - schemas: - ConfigurationDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - label: - type: string - nullable: true - primaryColor: - type: string - nullable: true - secondaryColor: - type: string - nullable: true - languages: - type: array - nullable: true - items: - type: string - dateCreation: - type: string - format: date-time - isMobile: - type: boolean - isTablet: - type: boolean - isOffline: - type: boolean - ExportConfigurationDTO: - allOf: - - $ref: '#/components/schemas/ConfigurationDTO' - - type: object - additionalProperties: false - properties: - sections: - type: array - nullable: true - items: - $ref: '#/components/schemas/SectionDTO' - resources: - type: array - nullable: true - items: - $ref: '#/components/schemas/ResourceDTO' - SectionDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - label: - type: string - nullable: true - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - imageId: - type: string - nullable: true - imageSource: - type: string - nullable: true - configurationId: - type: string - nullable: true - isSubSection: - type: boolean - parentId: - type: string - nullable: true - type: - $ref: '#/components/schemas/SectionType' - data: - type: string - nullable: true - dateCreation: - type: string - format: date-time - order: - type: integer - format: int32 - TranslationDTO: - type: object - additionalProperties: false - properties: - language: - type: string - nullable: true - value: - type: string - nullable: true - SectionType: - type: integer - description: |- - 0 = Map - 1 = Slider - 2 = Video - 3 = Web - 4 = Menu - 5 = Quizz - 6 = Article - x-enumNames: - - Map - - Slider - - Video - - Web - - Menu - - Quizz - - Article - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - ResourceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - type: - $ref: '#/components/schemas/ResourceType' - label: - type: string - nullable: true - dateCreation: - type: string - format: date-time - data: - type: string - nullable: true - ResourceType: - type: integer - description: |- - 0 = Image - 1 = Video - 2 = ImageUrl - 3 = VideoUrl - x-enumNames: - - Image - - Video - - ImageUrl - - VideoUrl - enum: - - 0 - - 1 - - 2 - - 3 - DeviceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - identifier: - type: string - nullable: true - name: - type: string - nullable: true - ipAddressWLAN: - type: string - nullable: true - ipAddressETH: - type: string - nullable: true - configurationId: - type: string - nullable: true - configuration: - type: string - nullable: true - connected: - type: boolean - dateCreation: - type: string - format: date-time - dateUpdate: - type: string - format: date-time - DeviceDetailDTO: - allOf: - - $ref: '#/components/schemas/DeviceDTO' - - type: object - additionalProperties: false - properties: - connectionLevel: - type: string - nullable: true - lastConnectionLevel: - type: string - format: date-time - batteryLevel: - type: string - nullable: true - lastBatteryLevel: - type: string - format: date-time - MapDTO: - type: object - additionalProperties: false - properties: - zoom: - type: integer - format: int32 - mapType: - $ref: '#/components/schemas/MapTypeApp' - points: - type: array - nullable: true - items: - $ref: '#/components/schemas/GeoPointDTO' - iconResourceId: - type: string - nullable: true - iconSource: - type: string - nullable: true - MapTypeApp: - type: integer - description: |- - 0 = none - 1 = normal - 2 = satellite - 3 = terrain - 4 = hybrid - x-enumNames: - - none - - normal - - satellite - - terrain - - hybrid - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - GeoPointDTO: - type: object - additionalProperties: false - properties: - id: - type: integer - format: int32 - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - images: - type: array - nullable: true - items: - $ref: '#/components/schemas/ImageGeoPoint' - latitude: - type: string - nullable: true - longitude: - type: string - nullable: true - ImageGeoPoint: - type: object - additionalProperties: false - properties: - imageResourceId: - type: string - nullable: true - imageSource: - type: string - nullable: true - SliderDTO: - type: object - additionalProperties: false - properties: - images: - type: array - nullable: true - items: - $ref: '#/components/schemas/ImageDTO' - ImageDTO: - type: object - additionalProperties: false - properties: - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true - order: - type: integer - format: int32 - VideoDTO: - type: object - additionalProperties: false - properties: - source: - type: string - nullable: true - WebDTO: - type: object - additionalProperties: false - properties: - source: - type: string - nullable: true - MenuDTO: - type: object - additionalProperties: false - properties: - sections: - type: array - nullable: true - items: - $ref: '#/components/schemas/SectionDTO' - PlayerMessageDTO: - type: object - additionalProperties: false - properties: - configChanged: - type: boolean - isDeleted: - type: boolean - QuizzDTO: - type: object - additionalProperties: false - properties: - questions: - type: array - nullable: true - items: - $ref: '#/components/schemas/QuestionDTO' - bad_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - medium_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - good_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - great_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - QuestionDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - responses: - type: array - nullable: true - items: - $ref: '#/components/schemas/ResponseDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true - order: - type: integer - format: int32 - ResponseDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - isGood: - type: boolean - order: - type: integer - format: int32 - LevelDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true - ArticleDTO: - type: object - additionalProperties: false - properties: - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - content: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - qrCode: - type: string - nullable: true - isContentTop: - type: boolean - audioId: - type: string - nullable: true - isReadAudioAuto: - type: boolean - images: - type: array - nullable: true - items: - $ref: '#/components/schemas/ImageDTO' - User: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - email: - type: string - nullable: true - password: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - token: - type: string - nullable: true - dateCreation: - type: string - format: date-time - UserDetailDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - email: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - TokenDTO: - type: object - additionalProperties: false - properties: - access_token: - type: string - nullable: true - refresh_token: - type: string - nullable: true - scope: - type: string - nullable: true - token_type: - type: string - nullable: true - expires_in: - type: integer - format: int32 - expiration: - type: string - format: date-time - LoginDTO: - type: object - additionalProperties: false - properties: - email: - type: string - nullable: true - password: - type: string - nullable: true - securitySchemes: - bearer: - type: oauth2 - description: Manager Authentication - flows: - password: - authorizationUrl: /authentication/Token - tokenUrl: /api/authentication/Token - scopes: - Manager-api: Manager WebAPI -security: - - bearer: [] -tags: - - name: Configuration - description: Configuration management - - name: Device - description: Device management - - name: Resource - description: Resource management - - name: Section - description: Section management - - name: User - description: User management - - name: Authentication - description: Authentication management diff --git a/lib/api/swagger.yaml.bak1 b/lib/api/swagger.yaml.bak1 deleted file mode 100644 index e739b39..0000000 --- a/lib/api/swagger.yaml.bak1 +++ /dev/null @@ -1,1949 +0,0 @@ -x-generator: NSwag v13.10.8.0 (NJsonSchema v10.3.11.0 (Newtonsoft.Json v10.0.0.0)) -openapi: 3.0.0 -info: - title: Manager Service - description: API Manager Service - version: Version Alpha -servers: - - url: http://localhost:5000 -paths: - /api/Configuration: - get: - tags: - - Configuration - operationId: Configuration_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ConfigurationDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - post: - tags: - - Configuration - operationId: Configuration_Create - requestBody: - x-name: newConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Configuration - operationId: Configuration_Update - requestBody: - x-name: updatedConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Configuration/{id}: - get: - tags: - - Configuration - operationId: Configuration_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Configuration - operationId: Configuration_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Configuration/{id}/export: - get: - tags: - - Configuration - operationId: Configuration_Export - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Configuration/import: - post: - tags: - - Configuration - operationId: Configuration_Import - requestBody: - x-name: exportConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ExportConfigurationDTO' - required: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device: - get: - tags: - - Device - operationId: Device_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Device - operationId: Device_Create - requestBody: - x-name: newDevice - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - put: - tags: - - Device - operationId: Device_Update - requestBody: - x-name: updatedDevice - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device/{id}/detail: - get: - tags: - - Device - operationId: Device_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Device/mainInfos: - put: - tags: - - Device - operationId: Device_UpdateMainInfos - requestBody: - x-name: deviceIn - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device/{id}: - delete: - tags: - - Device - operationId: Device_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource: - get: - tags: - - Resource - operationId: Resource_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ResourceDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Resource - operationId: Resource_Create - requestBody: - x-name: newResource - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Resource - operationId: Resource_Update - requestBody: - x-name: updatedResource - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource/{id}/detail: - get: - tags: - - Resource - operationId: Resource_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Resource/{id}: - get: - tags: - - Resource - operationId: Resource_Show - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Resource - operationId: Resource_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource/upload: - post: - tags: - - Resource - operationId: Resource_Upload - requestBody: - content: - multipart/form-data: - schema: - properties: - label: - type: string - nullable: true - type: - type: string - nullable: true - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section: - get: - tags: - - Section - operationId: Section_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Section - operationId: Section_Create - requestBody: - x-name: newSection - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Section - operationId: Section_Update - requestBody: - x-name: updatedSection - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/configuration/{id}: - get: - tags: - - Section - operationId: Section_GetFromConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Section - operationId: Section_DeleteAllForConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/{id}/subsections: - get: - tags: - - Section - operationId: Section_GetAllSectionSubSections - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: {} - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/{id}: - get: - tags: - - Section - operationId: Section_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Section - operationId: Section_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/order: - put: - tags: - - Section - operationId: Section_UpdateOrder - requestBody: - x-name: updatedSectionsOrder - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/MapDTO: - get: - tags: - - Section - operationId: Section_GetMapDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/MapDTO' - security: - - bearer: [] - /api/Section/SliderDTO: - get: - tags: - - Section - operationId: Section_GetSliderDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SliderDTO' - security: - - bearer: [] - /api/Section/VideoDTO: - get: - tags: - - Section - operationId: Section_GetVideoDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/VideoDTO' - security: - - bearer: [] - /api/Section/WebDTO: - get: - tags: - - Section - operationId: Section_GetWebDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/WebDTO' - security: - - bearer: [] - /api/Section/MenuDTO: - get: - tags: - - Section - operationId: Section_GetMenuDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/MenuDTO' - security: - - bearer: [] - /api/Section/PlayerMessageDTO: - get: - tags: - - Section - operationId: Section_PlayerMessageDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/PlayerMessageDTO' - security: - - bearer: [] - /api/Section/QuizzDTO: - get: - tags: - - Section - operationId: Section_GetQuizzDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/QuizzDTO' - security: - - bearer: [] - /api/Section/ArticleDTO: - get: - tags: - - Section - operationId: Section_GetArticleDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ArticleDTO' - security: - - bearer: [] - /api/User: - get: - tags: - - User - operationId: User_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - User - operationId: User_CreateUser - requestBody: - x-name: newUser - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - put: - tags: - - User - operationId: User_UpdateUser - requestBody: - x-name: updatedUser - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/User/{id}: - get: - tags: - - User - operationId: User_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - delete: - tags: - - User - operationId: User_DeleteUser - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Authentication/Token: - post: - tags: - - Authentication - operationId: Authentication_AuthenticateWithForm - requestBody: - content: - multipart/form-data: - schema: - properties: - grant_type: - type: string - nullable: true - username: - type: string - nullable: true - password: - type: string - nullable: true - client_id: - type: string - nullable: true - client_secret: - type: string - nullable: true - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Authentication/Authenticate: - post: - tags: - - Authentication - operationId: Authentication_AuthenticateWithJson - requestBody: - x-name: login - content: - application/json: - schema: - $ref: '#/components/schemas/LoginDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string -components: - schemas: - ConfigurationDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - label: - type: string - nullable: true - primaryColor: - type: string - nullable: true - secondaryColor: - type: string - nullable: true - languages: - type: array - nullable: true - items: - type: string - dateCreation: - type: string - format: date-time - isMobile: - type: boolean - isTablet: - type: boolean - isOffline: - type: boolean - ExportConfigurationDTO: - allOf: - - $ref: '#/components/schemas/ConfigurationDTO' - - type: object - additionalProperties: false - properties: - sections: - type: array - nullable: true - items: - $ref: '#/components/schemas/SectionDTO' - resources: - type: array - nullable: true - items: - $ref: '#/components/schemas/ResourceDTO' - SectionDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - label: - type: string - nullable: true - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - imageId: - type: string - nullable: true - imageSource: - type: string - nullable: true - configurationId: - type: string - nullable: true - isSubSection: - type: boolean - parentId: - type: string - nullable: true - type: - $ref: '#/components/schemas/SectionType' - data: - type: string - nullable: true - dateCreation: - type: string - format: date-time - order: - type: integer - format: int32 - TranslationDTO: - type: object - additionalProperties: false - properties: - language: - type: string - nullable: true - value: - type: string - nullable: true - SectionType: - type: integer - description: |- - 0 = Map - 1 = Slider - 2 = Video - 3 = Web - 4 = Menu - 5 = Quizz - 6 = Article - x-enumNames: - - Map - - Slider - - Video - - Web - - Menu - - Quizz - - Article - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - ResourceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - type: - $ref: '#/components/schemas/ResourceType' - label: - type: string - nullable: true - dateCreation: - type: string - format: date-time - data: - type: string - nullable: true - ResourceType: - type: integer - description: |- - 0 = Image - 1 = Video - 2 = ImageUrl - 3 = VideoUrl - x-enumNames: - - Image - - Video - - ImageUrl - - VideoUrl - enum: - - 0 - - 1 - - 2 - - 3 - DeviceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - identifier: - type: string - nullable: true - name: - type: string - nullable: true - ipAddressWLAN: - type: string - nullable: true - ipAddressETH: - type: string - nullable: true - configurationId: - type: string - nullable: true - configuration: - type: string - nullable: true - connected: - type: boolean - dateCreation: - type: string - format: date-time - dateUpdate: - type: string - format: date-time - DeviceDetailDTO: - allOf: - - $ref: '#/components/schemas/DeviceDTO' - - type: object - additionalProperties: false - properties: - connectionLevel: - type: string - nullable: true - lastConnectionLevel: - type: string - format: date-time - batteryLevel: - type: string - nullable: true - lastBatteryLevel: - type: string - format: date-time - MapDTO: - type: object - additionalProperties: false - properties: - zoom: - type: integer - format: int32 - mapType: - $ref: '#/components/schemas/MapTypeApp' - points: - type: array - nullable: true - items: - $ref: '#/components/schemas/GeoPointDTO' - iconResourceId: - type: string - nullable: true - iconSource: - type: string - nullable: true - MapTypeApp: - type: integer - description: |- - 0 = none - 1 = normal - 2 = satellite - 3 = terrain - 4 = hybrid - x-enumNames: - - none - - normal - - satellite - - terrain - - hybrid - enum: - - 0 - - 1 - - 2 - - 3 - - 4 - GeoPointDTO: - type: object - additionalProperties: false - properties: - id: - type: integer - format: int32 - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - images: - type: array - nullable: true - items: - $ref: '#/components/schemas/ImageGeoPoint' - latitude: - type: string - nullable: true - longitude: - type: string - nullable: true - ImageGeoPoint: - type: object - additionalProperties: false - properties: - imageResourceId: - type: string - nullable: true - imageSource: - type: string - nullable: true - SliderDTO: - type: object - additionalProperties: false - properties: - images: - type: array - nullable: true - items: - $ref: '#/components/schemas/ImageDTO' - ImageDTO: - type: object - additionalProperties: false - properties: - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true - order: - type: integer - format: int32 - VideoDTO: - type: object - additionalProperties: false - properties: - source: - type: string - nullable: true - WebDTO: - type: object - additionalProperties: false - properties: - source: - type: string - nullable: true - MenuDTO: - type: object - additionalProperties: false - properties: - sections: - type: array - nullable: true - items: - $ref: '#/components/schemas/SectionDTO' - PlayerMessageDTO: - type: object - additionalProperties: false - properties: - configChanged: - type: boolean - isDeleted: - type: boolean - QuizzDTO: - type: object - additionalProperties: false - properties: - questions: - type: array - nullable: true - items: - $ref: '#/components/schemas/QuestionDTO' - bad_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - medium_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - good_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - great_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - QuestionDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - responses: - type: array - nullable: true - items: - $ref: '#/components/schemas/ResponseDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true - order: - type: integer - format: int32 - ResponseDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - isGood: - type: boolean - order: - type: integer - format: int32 - LevelDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true - ArticleDTO: - type: object - additionalProperties: false - properties: - content: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - qrCode: - type: string - nullable: true - isContentTop: - type: boolean - audioId: - type: string - nullable: true - isReadAudioAuto: - type: boolean - images: - type: array - nullable: true - items: - $ref: '#/components/schemas/ImageDTO' - User: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - email: - type: string - nullable: true - password: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - token: - type: string - nullable: true - dateCreation: - type: string - format: date-time - UserDetailDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - email: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - TokenDTO: - type: object - additionalProperties: false - properties: - access_token: - type: string - nullable: true - refresh_token: - type: string - nullable: true - scope: - type: string - nullable: true - token_type: - type: string - nullable: true - expires_in: - type: integer - format: int32 - expiration: - type: string - format: date-time - LoginDTO: - type: object - additionalProperties: false - properties: - email: - type: string - nullable: true - password: - type: string - nullable: true - securitySchemes: - bearer: - type: oauth2 - description: Manager Authentication - flows: - password: - authorizationUrl: /authentication/Token - tokenUrl: /api/authentication/Token - scopes: - Manager-api: Manager WebAPI -security: - - bearer: [] -tags: - - name: Configuration - description: Configuration management - - name: Device - description: Device management - - name: Resource - description: Resource management - - name: Section - description: Section management - - name: User - description: User management - - name: Authentication - description: Authentication management diff --git a/lib/api/swagger.yaml.bak2 b/lib/api/swagger.yaml.bak2 deleted file mode 100644 index 2dadf26..0000000 --- a/lib/api/swagger.yaml.bak2 +++ /dev/null @@ -1,1944 +0,0 @@ -x-generator: NSwag v13.10.8.0 (NJsonSchema v10.3.11.0 (Newtonsoft.Json v10.0.0.0)) -openapi: 3.0.0 -info: - title: Manager Service - description: API Manager Service - version: Version Alpha -servers: - - url: http://localhost:5000 -paths: - /api/Configuration: - get: - tags: - - Configuration - operationId: Configuration_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ConfigurationDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - post: - tags: - - Configuration - operationId: Configuration_Create - requestBody: - x-name: newConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Configuration - operationId: Configuration_Update - requestBody: - x-name: updatedConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Configuration/{id}: - get: - tags: - - Configuration - operationId: Configuration_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ConfigurationDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Configuration - operationId: Configuration_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Configuration/{id}/export: - get: - tags: - - Configuration - operationId: Configuration_Export - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Configuration/import: - post: - tags: - - Configuration - operationId: Configuration_Import - requestBody: - x-name: exportConfiguration - content: - application/json: - schema: - $ref: '#/components/schemas/ExportConfigurationDTO' - required: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device: - get: - tags: - - Device - operationId: Device_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/DeviceDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Device - operationId: Device_Create - requestBody: - x-name: newDevice - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - put: - tags: - - Device - operationId: Device_Update - requestBody: - x-name: updatedDevice - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device/{id}/detail: - get: - tags: - - Device - operationId: Device_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Device/mainInfos: - put: - tags: - - Device - operationId: Device_UpdateMainInfos - requestBody: - x-name: deviceIn - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Device/{id}: - delete: - tags: - - Device - operationId: Device_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource: - get: - tags: - - Resource - operationId: Resource_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/ResourceDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Resource - operationId: Resource_Create - requestBody: - x-name: newResource - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Resource - operationId: Resource_Update - requestBody: - x-name: updatedResource - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource/{id}/detail: - get: - tags: - - Resource - operationId: Resource_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Resource/{id}: - get: - tags: - - Resource - operationId: Resource_Show - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/octet-stream: - schema: - type: string - format: binary - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Resource - operationId: Resource_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Resource/upload: - post: - tags: - - Resource - operationId: Resource_Upload - requestBody: - content: - multipart/form-data: - schema: - properties: - label: - type: string - nullable: true - type: - type: string - nullable: true - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section: - get: - tags: - - Section - operationId: Section_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - Section - operationId: Section_Create - requestBody: - x-name: newSection - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - put: - tags: - - Section - operationId: Section_Update - requestBody: - x-name: updatedSection - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/configuration/{id}: - get: - tags: - - Section - operationId: Section_GetFromConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Section - operationId: Section_DeleteAllForConfiguration - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/{id}/subsections: - get: - tags: - - Section - operationId: Section_GetAllSectionSubSections - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: {} - '400': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/{id}: - get: - tags: - - Section - operationId: Section_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SectionDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - delete: - tags: - - Section - operationId: Section_Delete - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/order: - put: - tags: - - Section - operationId: Section_UpdateOrder - requestBody: - x-name: updatedSectionsOrder - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/SectionDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Section/MapDTO: - get: - tags: - - Section - operationId: Section_GetMapDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/MapDTO' - security: - - bearer: [] - /api/Section/SliderDTO: - get: - tags: - - Section - operationId: Section_GetSliderDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SliderDTO' - security: - - bearer: [] - /api/Section/VideoDTO: - get: - tags: - - Section - operationId: Section_GetVideoDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/VideoDTO' - security: - - bearer: [] - /api/Section/WebDTO: - get: - tags: - - Section - operationId: Section_GetWebDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/WebDTO' - security: - - bearer: [] - /api/Section/MenuDTO: - get: - tags: - - Section - operationId: Section_GetMenuDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/MenuDTO' - security: - - bearer: [] - /api/Section/PlayerMessageDTO: - get: - tags: - - Section - operationId: Section_PlayerMessageDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/PlayerMessageDTO' - security: - - bearer: [] - /api/Section/QuizzDTO: - get: - tags: - - Section - operationId: Section_GetQuizzDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/QuizzDTO' - security: - - bearer: [] - /api/Section/ArticleDTO: - get: - tags: - - Section - operationId: Section_GetArticleDTO - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/ArticleDTO' - security: - - bearer: [] - /api/User: - get: - tags: - - User - operationId: User_Get - responses: - '200': - description: '' - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - post: - tags: - - User - operationId: User_CreateUser - requestBody: - x-name: newUser - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '409': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - put: - tags: - - User - operationId: User_UpdateUser - requestBody: - x-name: updatedUser - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/User/{id}: - get: - tags: - - User - operationId: User_GetDetail - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/UserDetailDTO' - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - delete: - tags: - - User - operationId: User_DeleteUser - parameters: - - name: id - in: path - required: true - schema: - type: string - nullable: true - x-position: 1 - responses: - '202': - description: '' - content: - application/json: - schema: - type: string - '400': - description: '' - content: - application/json: - schema: - type: string - '404': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - security: - - bearer: [] - /api/Authentication/Token: - post: - tags: - - Authentication - operationId: Authentication_AuthenticateWithForm - requestBody: - content: - multipart/form-data: - schema: - properties: - grant_type: - type: string - nullable: true - username: - type: string - nullable: true - password: - type: string - nullable: true - client_id: - type: string - nullable: true - client_secret: - type: string - nullable: true - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string - /api/Authentication/Authenticate: - post: - tags: - - Authentication - operationId: Authentication_AuthenticateWithJson - requestBody: - x-name: login - content: - application/json: - schema: - $ref: '#/components/schemas/LoginDTO' - required: true - x-position: 1 - responses: - '200': - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/TokenDTO' - '401': - description: '' - content: - application/json: - schema: - type: string - '500': - description: '' - content: - application/json: - schema: - type: string -components: - schemas: - ConfigurationDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - label: - type: string - nullable: true - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - imageId: - type: string - nullable: true - imageSource: - type: string - nullable: true - primaryColor: - type: string - nullable: true - secondaryColor: - type: string - nullable: true - languages: - type: array - nullable: true - items: - type: string - dateCreation: - type: string - format: date-time - isMobile: - type: boolean - isTablet: - type: boolean - isOffline: - type: boolean - TranslationDTO: - type: object - additionalProperties: false - properties: - language: - type: string - nullable: true - value: - type: string - nullable: true - ExportConfigurationDTO: - allOf: - - $ref: '#/components/schemas/ConfigurationDTO' - - type: object - additionalProperties: false - properties: - sections: - type: array - nullable: true - items: - $ref: '#/components/schemas/SectionDTO' - resources: - type: array - nullable: true - items: - $ref: '#/components/schemas/ResourceDTO' - SectionDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - label: - type: string - nullable: true - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - imageId: - type: string - nullable: true - imageSource: - type: string - nullable: true - configurationId: - type: string - nullable: true - isSubSection: - type: boolean - parentId: - type: string - nullable: true - type: - $ref: '#/components/schemas/SectionType' - data: - type: string - nullable: true - dateCreation: - type: string - format: date-time - order: - type: integer - format: int32 - SectionType: - type: string - description: '' - x-enumNames: - - Map - - Slider - - Video - - Web - - Menu - - Quizz - - Article - enum: - - Map - - Slider - - Video - - Web - - Menu - - Quizz - - Article - ResourceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - type: - $ref: '#/components/schemas/ResourceType' - label: - type: string - nullable: true - dateCreation: - type: string - format: date-time - data: - type: string - nullable: true - ResourceType: - type: string - description: '' - x-enumNames: - - Image - - Video - - ImageUrl - - VideoUrl - enum: - - Image - - Video - - ImageUrl - - VideoUrl - DeviceDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - identifier: - type: string - nullable: true - name: - type: string - nullable: true - ipAddressWLAN: - type: string - nullable: true - ipAddressETH: - type: string - nullable: true - configurationId: - type: string - nullable: true - configuration: - type: string - nullable: true - connected: - type: boolean - dateCreation: - type: string - format: date-time - dateUpdate: - type: string - format: date-time - DeviceDetailDTO: - allOf: - - $ref: '#/components/schemas/DeviceDTO' - - type: object - additionalProperties: false - properties: - connectionLevel: - type: string - nullable: true - lastConnectionLevel: - type: string - format: date-time - batteryLevel: - type: string - nullable: true - lastBatteryLevel: - type: string - format: date-time - MapDTO: - type: object - additionalProperties: false - properties: - zoom: - type: integer - format: int32 - mapType: - $ref: '#/components/schemas/MapTypeApp' - points: - type: array - nullable: true - items: - $ref: '#/components/schemas/GeoPointDTO' - iconResourceId: - type: string - nullable: true - iconSource: - type: string - nullable: true - MapTypeApp: - type: string - description: '' - x-enumNames: - - none - - normal - - satellite - - terrain - - hybrid - enum: - - none - - normal - - satellite - - terrain - - hybrid - GeoPointDTO: - type: object - additionalProperties: false - properties: - id: - type: integer - format: int32 - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - images: - type: array - nullable: true - items: - $ref: '#/components/schemas/ImageGeoPoint' - latitude: - type: string - nullable: true - longitude: - type: string - nullable: true - ImageGeoPoint: - type: object - additionalProperties: false - properties: - imageResourceId: - type: string - nullable: true - imageSource: - type: string - nullable: true - SliderDTO: - type: object - additionalProperties: false - properties: - images: - type: array - nullable: true - items: - $ref: '#/components/schemas/ImageDTO' - ImageDTO: - type: object - additionalProperties: false - properties: - title: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - description: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true - order: - type: integer - format: int32 - VideoDTO: - type: object - additionalProperties: false - properties: - source: - type: string - nullable: true - WebDTO: - type: object - additionalProperties: false - properties: - source: - type: string - nullable: true - MenuDTO: - type: object - additionalProperties: false - properties: - sections: - type: array - nullable: true - items: - $ref: '#/components/schemas/SectionDTO' - PlayerMessageDTO: - type: object - additionalProperties: false - properties: - configChanged: - type: boolean - isDeleted: - type: boolean - QuizzDTO: - type: object - additionalProperties: false - properties: - questions: - type: array - nullable: true - items: - $ref: '#/components/schemas/QuestionDTO' - bad_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - medium_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - good_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - great_level: - nullable: true - oneOf: - - $ref: '#/components/schemas/LevelDTO' - QuestionDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - responses: - type: array - nullable: true - items: - $ref: '#/components/schemas/ResponseDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true - order: - type: integer - format: int32 - ResponseDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - isGood: - type: boolean - order: - type: integer - format: int32 - LevelDTO: - type: object - additionalProperties: false - properties: - label: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - resourceId: - type: string - nullable: true - source: - type: string - nullable: true - ArticleDTO: - type: object - additionalProperties: false - properties: - content: - type: array - nullable: true - items: - $ref: '#/components/schemas/TranslationDTO' - qrCode: - type: string - nullable: true - isContentTop: - type: boolean - audioId: - type: string - nullable: true - isReadAudioAuto: - type: boolean - images: - type: array - nullable: true - items: - $ref: '#/components/schemas/ImageDTO' - User: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - email: - type: string - nullable: true - password: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - token: - type: string - nullable: true - dateCreation: - type: string - format: date-time - UserDetailDTO: - type: object - additionalProperties: false - properties: - id: - type: string - nullable: true - email: - type: string - nullable: true - firstName: - type: string - nullable: true - lastName: - type: string - nullable: true - TokenDTO: - type: object - additionalProperties: false - properties: - access_token: - type: string - nullable: true - refresh_token: - type: string - nullable: true - scope: - type: string - nullable: true - token_type: - type: string - nullable: true - expires_in: - type: integer - format: int32 - expiration: - type: string - format: date-time - LoginDTO: - type: object - additionalProperties: false - properties: - email: - type: string - nullable: true - password: - type: string - nullable: true - securitySchemes: - bearer: - type: oauth2 - description: Manager Authentication - flows: - password: - authorizationUrl: /authentication/Token - tokenUrl: /api/authentication/Token - scopes: - Manager-api: Manager WebAPI -security: - - bearer: [] -tags: - - name: Configuration - description: Configuration management - - name: Device - description: Device management - - name: Resource - description: Resource management - - name: Section - description: Section management - - name: User - description: User management - - name: Authentication - description: Authentication management diff --git a/lib/app_context.dart b/lib/app_context.dart index 3617414..73dbd48 100644 --- a/lib/app_context.dart +++ b/lib/app_context.dart @@ -6,7 +6,7 @@ import 'Models/visitContext.dart'; class AppContext with ChangeNotifier { VisitAppContext _visitContext; - Client clientAPI = Client("https://api.mymuseum.be"); // Replace by https://api.mymuseum.be //http://192.168.31.140:8089 + Client clientAPI = Client("https://api.myinfomate.be"); // Replace by https://api.mymuseum.be //http://192.168.31.140:8089 AppContext(this._visitContext); diff --git a/lib/constants.dart b/lib/constants.dart index 51c2a18..a7c47f2 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -25,15 +25,14 @@ const kDefaultPadding = 20.0; const kMainGrey = Color(0xFF424242); const kSecondGrey = Color(0xFF555457); -const kTestSecondColor = Color(0xFF2F4858); const kSecondRed = Color(0xFF622727); const kTextRed = Color(0xFFba0505); const kBackgroundGrey = Color(0xFFb5b7b9); const kBackgroundSecondGrey = Color(0xFF5b5b63); -const kBlue0 = Color(0xFF306bac); -const kBlue1 = Color(0xFF308aae); -const kBlue2 = Color(0xFF309cb0); +const kMainColor0 = Color(0xFFe52122); // const kBlue0 = Color(0xFF306bac); +const kMainColor1 = Color(0xFFed7082); // const kBlue1 = Color(0xFF308aae); +const kMainColor2 = Color(0xFFed7082); // const kBlue2 = Color(0xFF309cb0); const kBackgroundLight = Color(0xfff3f3f3); diff --git a/lib/main.dart b/lib/main.dart index 5681a55..fe1e978 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -28,7 +28,7 @@ void main() async { List articleReadTest = List.from(await DatabaseHelper.instance.getData(DatabaseTableType.articleRead)); localContext.readSections = articleReadTest; } else { - localContext = VisitAppContext(language: "FR", id: "UserId_Init", instanceId: "63514fd67ed8c735aaa4b8f1", isAdmin: false, isAllLanguages: false); // 633ee379d9405f32f166f047 Fort Saint-Héribert - MyMuseum instance 63514fd67ed8c735aaa4b8f1 + localContext = VisitAppContext(language: "FR", id: "UserId_Init", instanceId: "63514fd67ed8c735aaa4b8f2", isAdmin: false, isAllLanguages: false); // 63514fd67ed8c735aaa4b8f2 MyInfoMate test instance -- 633ee379d9405f32f166f047 MyMuseum Fort Saint-Héribert - MyMuseum instance 63514fd67ed8c735aaa4b8f1 DatabaseHelper.instance.insert(DatabaseTableType.main, localContext.toMap()); List articleReadTest = List.from(await DatabaseHelper.instance.getData(DatabaseTableType.articleRead)); @@ -86,7 +86,7 @@ class _MyAppState extends State { create: (_) => AppContext(widget.visitAppContext), child: MaterialApp( debugShowCheckedModeBanner: false, - title: 'Fort Saint Héribert', + title: 'Musée de la fraise', //'Fort Saint Héribert' initialRoute: widget.initialRoute, localizationsDelegates: const [ AppLocalizations.delegate, @@ -102,7 +102,7 @@ class _MyAppState extends State { primarySwatch: Colors.blue, scaffoldBackgroundColor: kBackgroundColor, //fontFamily: "Vollkorn", - textTheme: const TextTheme(bodyText1: TextStyle(color: kTestSecondColor)), + textTheme: TextTheme(bodyLarge: TextStyle(color: widget.visitAppContext.configuration != null ? widget.visitAppContext.configuration!.primaryColor != null ? Color(int.parse(widget.visitAppContext.configuration!.primaryColor!.split('(0x')[1].split(')')[0], radix: 16)): kMainColor1 : kMainColor1)), visualDensity: VisualDensity.adaptivePlatformDensity, ), routes: { diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 0edeac8..af7a916 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10) project(runner LANGUAGES CXX) set(BINARY_NAME "mymuseum_visitapp") -set(APPLICATION_ID "be.unov.myvisit.mymuseum_visitapp") +set(APPLICATION_ID "be.unov.myinfomate.mdlf") cmake_policy(SET CMP0063 NEW) diff --git a/manager_api/.openapi-generator/FILES b/manager_api/.openapi-generator/FILES index ca166c6..7849567 100644 --- a/manager_api/.openapi-generator/FILES +++ b/manager_api/.openapi-generator/FILES @@ -2,10 +2,14 @@ .travis.yml README.md analysis_options.yaml +doc/AgendaDTO.md doc/ArticleDTO.md doc/AuthenticationApi.md +doc/CategorieDTO.md doc/ConfigurationApi.md doc/ConfigurationDTO.md +doc/ContentDTO.md +doc/ContentGeoPoint.md doc/DeviceApi.md doc/DeviceDTO.md doc/DeviceDetailDTO.md @@ -13,17 +17,25 @@ doc/DeviceDetailDTOAllOf.md doc/ExportConfigurationDTO.md doc/ExportConfigurationDTOAllOf.md doc/GeoPointDTO.md -doc/ImageDTO.md -doc/ImageGeoPoint.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/MapProvider.md doc/MapTypeApp.md +doc/MapTypeMapBox.md doc/MenuDTO.md +doc/PDFFileDTO.md +doc/PdfDTO.md doc/PlayerMessageDTO.md +doc/PuzzleDTO.md +doc/PuzzleDTOImage.md doc/QuestionDTO.md doc/QuizzDTO.md doc/QuizzDTOBadLevel.md @@ -36,11 +48,13 @@ doc/SectionDTO.md doc/SectionType.md doc/SliderDTO.md doc/TokenDTO.md +doc/TranslationAndResourceDTO.md doc/TranslationDTO.md doc/User.md doc/UserApi.md doc/UserDetailDTO.md doc/VideoDTO.md +doc/WeatherDTO.md doc/WebDTO.md git_push.sh lib/api.dart @@ -59,24 +73,36 @@ lib/auth/authentication.dart lib/auth/http_basic_auth.dart lib/auth/http_bearer_auth.dart lib/auth/oauth.dart +lib/model/agenda_dto.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/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_dto.dart -lib/model/image_dto.dart -lib/model/image_geo_point.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_provider.dart lib/model/map_type_app.dart +lib/model/map_type_map_box.dart lib/model/menu_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/question_dto.dart lib/model/quizz_dto.dart lib/model/quizz_dto_bad_level.dart @@ -87,9 +113,13 @@ lib/model/section_dto.dart lib/model/section_type.dart lib/model/slider_dto.dart lib/model/token_dto.dart +lib/model/translation_and_resource_dto.dart lib/model/translation_dto.dart lib/model/user.dart lib/model/user_detail_dto.dart 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 diff --git a/manager_api/README.md b/manager_api/README.md index 7bffafd..7a47de3 100644 --- a/manager_api/README.md +++ b/manager_api/README.md @@ -60,7 +60,7 @@ try { ## Documentation for API Endpoints -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *https://api.myinfomate.be* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -70,6 +70,7 @@ Class | Method | HTTP request | Description *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 | @@ -83,6 +84,7 @@ Class | Method | HTTP request | Description *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} | @@ -95,6 +97,7 @@ Class | Method | HTTP request | Description *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 | @@ -102,9 +105,12 @@ Class | Method | HTTP request | Description *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 | @@ -118,24 +124,36 @@ Class | Method | HTTP request | Description ## 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) - - [ImageDTO](doc\/ImageDTO.md) - - [ImageGeoPoint](doc\/ImageGeoPoint.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) @@ -146,17 +164,20 @@ Class | Method | HTTP request | Description - [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 -## bearer +Authentication schemes defined for the API: +### bearer - **Type**: OAuth - **Flow**: password diff --git a/manager_api/doc/AgendaDTO.md b/manager_api/doc/AgendaDTO.md new file mode 100644 index 0000000..b341661 --- /dev/null +++ b/manager_api/doc/AgendaDTO.md @@ -0,0 +1,16 @@ +# manager_api.model.AgendaDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resourceIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.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) + + diff --git a/manager_api/doc/ArticleDTO.md b/manager_api/doc/ArticleDTO.md index 66b99a4..b8e31fb 100644 --- a/manager_api/doc/ArticleDTO.md +++ b/manager_api/doc/ArticleDTO.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **isContentTop** | **bool** | | [optional] **audioIds** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **isReadAudioAuto** | **bool** | | [optional] -**images** | [**List**](ImageDTO.md) | | [optional] [default to const []] +**contents** | [**List**](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) diff --git a/manager_api/doc/AuthenticationApi.md b/manager_api/doc/AuthenticationApi.md index be64641..71112c8 100644 --- a/manager_api/doc/AuthenticationApi.md +++ b/manager_api/doc/AuthenticationApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *https://api.myinfomate.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/CategorieDTO.md b/manager_api/doc/CategorieDTO.md new file mode 100644 index 0000000..e346999 --- /dev/null +++ b/manager_api/doc/CategorieDTO.md @@ -0,0 +1,20 @@ +# manager_api.model.CategorieDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**icon** | **String** | | [optional] +**iconResourceId** | **String** | | [optional] +**iconUrl** | **String** | | [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) + + diff --git a/manager_api/doc/ConfigurationApi.md b/manager_api/doc/ConfigurationApi.md index 8a503df..7ef7c1c 100644 --- a/manager_api/doc/ConfigurationApi.md +++ b/manager_api/doc/ConfigurationApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *https://api.myinfomate.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,6 +13,7 @@ Method | HTTP request | Description [**configurationDelete**](ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} | [**configurationExport**](ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export | [**configurationGet**](ConfigurationApi.md#configurationget) | **GET** /api/Configuration | +[**configurationGetConfigurationsByPinCode**](ConfigurationApi.md#configurationgetconfigurationsbypincode) | **GET** /api/Configuration/byPin | [**configurationGetDetail**](ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} | [**configurationImport**](ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import | [**configurationUpdate**](ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration | @@ -192,6 +193,49 @@ 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) +# **configurationGetConfigurationsByPinCode** +> List configurationGetConfigurationsByPinCode(pinCode) + + + +### Example +```dart +import 'package:manager_api/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = ConfigurationApi(); +final pinCode = 56; // int | + +try { + final result = api_instance.configurationGetConfigurationsByPinCode(pinCode); + print(result); +} catch (e) { + print('Exception when calling ConfigurationApi->configurationGetConfigurationsByPinCode: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pinCode** | **int**| | [optional] + +### Return type + +[**List**](ConfigurationDTO.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) + # **configurationGetDetail** > ConfigurationDTO configurationGetDetail(id) diff --git a/manager_api/doc/ConfigurationDTO.md b/manager_api/doc/ConfigurationDTO.md index cc289f3..edf6380 100644 --- a/manager_api/doc/ConfigurationDTO.md +++ b/manager_api/doc/ConfigurationDTO.md @@ -22,6 +22,17 @@ Name | Type | Description | Notes **isOffline** | **bool** | | [optional] **instanceId** | **String** | | [optional] **sectionIds** | **List** | | [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] +**roundedValue** | **int** | | [optional] +**screenPercentageSectionsMainPage** | **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) diff --git a/manager_api/doc/ContentDTO.md b/manager_api/doc/ContentDTO.md new file mode 100644 index 0000000..47fe015 --- /dev/null +++ b/manager_api/doc/ContentDTO.md @@ -0,0 +1,20 @@ +# manager_api.model.ContentDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**resourceId** | **String** | | [optional] +**resourceUrl** | **String** | | [optional] +**order** | **int** | | [optional] +**resourceType** | [**ResourceType**](ResourceType.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) + + diff --git a/manager_api/doc/ContentGeoPoint.md b/manager_api/doc/ContentGeoPoint.md new file mode 100644 index 0000000..adb2867 --- /dev/null +++ b/manager_api/doc/ContentGeoPoint.md @@ -0,0 +1,18 @@ +# manager_api.model.ContentGeoPoint + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resourceId** | **String** | | [optional] +**resourceType** | [**ResourceType**](ResourceType.md) | | [optional] +**resourceUrl** | **String** | | [optional] +**resourceName** | **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) + + diff --git a/manager_api/doc/DeviceApi.md b/manager_api/doc/DeviceApi.md index 30e9574..aef8698 100644 --- a/manager_api/doc/DeviceApi.md +++ b/manager_api/doc/DeviceApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *https://api.myinfomate.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/ExportConfigurationDTO.md b/manager_api/doc/ExportConfigurationDTO.md index 46813fd..3c88c48 100644 --- a/manager_api/doc/ExportConfigurationDTO.md +++ b/manager_api/doc/ExportConfigurationDTO.md @@ -22,6 +22,17 @@ Name | Type | Description | Notes **isOffline** | **bool** | | [optional] **instanceId** | **String** | | [optional] **sectionIds** | **List** | | [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] +**roundedValue** | **int** | | [optional] +**screenPercentageSectionsMainPage** | **int** | | [optional] **sections** | [**List**](SectionDTO.md) | | [optional] [default to const []] **resources** | [**List**](ResourceDTO.md) | | [optional] [default to const []] diff --git a/manager_api/doc/GeoPointDTO.md b/manager_api/doc/GeoPointDTO.md index 7423c02..a3412ff 100644 --- a/manager_api/doc/GeoPointDTO.md +++ b/manager_api/doc/GeoPointDTO.md @@ -11,9 +11,18 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] **description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**images** | [**List**](ImageGeoPoint.md) | | [optional] [default to const []] +**contents** | [**List**](ContentGeoPoint.md) | | [optional] [default to const []] +**categorie** | [**GeoPointDTOCategorie**](GeoPointDTOCategorie.md) | | [optional] +**categorieId** | **int** | | [optional] **latitude** | **String** | | [optional] **longitude** | **String** | | [optional] +**imageResourceId** | **String** | | [optional] +**imageUrl** | **String** | | [optional] +**schedules** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**prices** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**phone** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**email** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**site** | [**List**](TranslationDTO.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) diff --git a/manager_api/doc/GeoPointDTOCategorie.md b/manager_api/doc/GeoPointDTOCategorie.md new file mode 100644 index 0000000..6765935 --- /dev/null +++ b/manager_api/doc/GeoPointDTOCategorie.md @@ -0,0 +1,20 @@ +# manager_api.model.GeoPointDTOCategorie + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**icon** | **String** | | [optional] +**iconResourceId** | **String** | | [optional] +**iconUrl** | **String** | | [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) + + diff --git a/manager_api/doc/Instance.md b/manager_api/doc/Instance.md index dd6770c..1fd6ac6 100644 --- a/manager_api/doc/Instance.md +++ b/manager_api/doc/Instance.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **id** | **String** | | [optional] **name** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**pinCode** | **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) diff --git a/manager_api/doc/InstanceApi.md b/manager_api/doc/InstanceApi.md index cf81e4a..a0aaa08 100644 --- a/manager_api/doc/InstanceApi.md +++ b/manager_api/doc/InstanceApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *https://api.myinfomate.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,6 +13,7 @@ Method | HTTP request | Description [**instanceDeleteInstance**](InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} | [**instanceGet**](InstanceApi.md#instanceget) | **GET** /api/Instance | [**instanceGetDetail**](InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} | +[**instanceGetInstanceByPinCode**](InstanceApi.md#instancegetinstancebypincode) | **GET** /api/Instance/byPin | [**instanceUpdateinstance**](InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance | @@ -184,6 +185,49 @@ 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) +# **instanceGetInstanceByPinCode** +> InstanceDTO instanceGetInstanceByPinCode(pinCode) + + + +### Example +```dart +import 'package:manager_api/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = InstanceApi(); +final pinCode = 56; // int | + +try { + final result = api_instance.instanceGetInstanceByPinCode(pinCode); + print(result); +} catch (e) { + print('Exception when calling InstanceApi->instanceGetInstanceByPinCode: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pinCode** | **int**| | [optional] + +### Return type + +[**InstanceDTO**](InstanceDTO.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) + # **instanceUpdateinstance** > InstanceDTO instanceUpdateinstance(instance) diff --git a/manager_api/doc/InstanceDTO.md b/manager_api/doc/InstanceDTO.md index 1f678ff..ec1d952 100644 --- a/manager_api/doc/InstanceDTO.md +++ b/manager_api/doc/InstanceDTO.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **id** | **String** | | [optional] **name** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] +**pinCode** | **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) diff --git a/manager_api/doc/LevelDTO.md b/manager_api/doc/LevelDTO.md index e936fdb..d87fee3 100644 --- a/manager_api/doc/LevelDTO.md +++ b/manager_api/doc/LevelDTO.md @@ -8,9 +8,7 @@ import 'package:manager_api/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**resourceId** | **String** | | [optional] -**source_** | **String** | | [optional] +**label** | [**List**](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) diff --git a/manager_api/doc/MapDTO.md b/manager_api/doc/MapDTO.md index 8701cf7..ffcad9b 100644 --- a/manager_api/doc/MapDTO.md +++ b/manager_api/doc/MapDTO.md @@ -9,10 +9,15 @@ import 'package:manager_api/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **zoom** | **int** | | [optional] -**mapType** | [**MapTypeApp**](MapTypeApp.md) | | [optional] +**mapType** | [**MapDTOMapType**](MapDTOMapType.md) | | [optional] +**mapTypeMapbox** | [**MapDTOMapTypeMapbox**](MapDTOMapTypeMapbox.md) | | [optional] +**mapProvider** | [**MapDTOMapProvider**](MapDTOMapProvider.md) | | [optional] **points** | [**List**](GeoPointDTO.md) | | [optional] [default to const []] **iconResourceId** | **String** | | [optional] **iconSource** | **String** | | [optional] +**categories** | [**List**](CategorieDTO.md) | | [optional] [default to const []] +**latitude** | **String** | | [optional] +**longitude** | **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) diff --git a/manager_api/doc/MapDTOMapProvider.md b/manager_api/doc/MapDTOMapProvider.md new file mode 100644 index 0000000..882195a --- /dev/null +++ b/manager_api/doc/MapDTOMapProvider.md @@ -0,0 +1,14 @@ +# manager_api.model.MapDTOMapProvider + +## Load the model package +```dart +import 'package:manager_api/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) + + diff --git a/manager_api/doc/MapDTOMapType.md b/manager_api/doc/MapDTOMapType.md new file mode 100644 index 0000000..118e848 --- /dev/null +++ b/manager_api/doc/MapDTOMapType.md @@ -0,0 +1,14 @@ +# manager_api.model.MapDTOMapType + +## Load the model package +```dart +import 'package:manager_api/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) + + diff --git a/manager_api/doc/MapDTOMapTypeMapbox.md b/manager_api/doc/MapDTOMapTypeMapbox.md new file mode 100644 index 0000000..d3937ca --- /dev/null +++ b/manager_api/doc/MapDTOMapTypeMapbox.md @@ -0,0 +1,14 @@ +# manager_api.model.MapDTOMapTypeMapbox + +## Load the model package +```dart +import 'package:manager_api/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) + + diff --git a/manager_api/doc/MapProvider.md b/manager_api/doc/MapProvider.md new file mode 100644 index 0000000..f600a20 --- /dev/null +++ b/manager_api/doc/MapProvider.md @@ -0,0 +1,14 @@ +# manager_api.model.MapProvider + +## Load the model package +```dart +import 'package:manager_api/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) + + diff --git a/manager_api/doc/MapTypeMapBox.md b/manager_api/doc/MapTypeMapBox.md new file mode 100644 index 0000000..99b9232 --- /dev/null +++ b/manager_api/doc/MapTypeMapBox.md @@ -0,0 +1,14 @@ +# manager_api.model.MapTypeMapBox + +## Load the model package +```dart +import 'package:manager_api/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) + + diff --git a/manager_api/doc/PDFFileDTO.md b/manager_api/doc/PDFFileDTO.md new file mode 100644 index 0000000..4d2432a --- /dev/null +++ b/manager_api/doc/PDFFileDTO.md @@ -0,0 +1,16 @@ +# manager_api.model.PDFFileDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pdfFilesAndTitles** | [**List**](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) + + diff --git a/manager_api/doc/PdfDTO.md b/manager_api/doc/PdfDTO.md new file mode 100644 index 0000000..1caaab8 --- /dev/null +++ b/manager_api/doc/PdfDTO.md @@ -0,0 +1,15 @@ +# manager_api.model.PdfDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pdfs** | [**List**](PDFFileDTO.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) + + diff --git a/manager_api/doc/PuzzleDTO.md b/manager_api/doc/PuzzleDTO.md new file mode 100644 index 0000000..a6655c1 --- /dev/null +++ b/manager_api/doc/PuzzleDTO.md @@ -0,0 +1,19 @@ +# manager_api.model.PuzzleDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**messageDebut** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**messageFin** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] +**image** | [**PuzzleDTOImage**](PuzzleDTOImage.md) | | [optional] +**rows** | **int** | | [optional] +**cols** | **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) + + diff --git a/manager_api/doc/PuzzleDTOImage.md b/manager_api/doc/PuzzleDTOImage.md new file mode 100644 index 0000000..cc2e07a --- /dev/null +++ b/manager_api/doc/PuzzleDTOImage.md @@ -0,0 +1,20 @@ +# manager_api.model.PuzzleDTOImage + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**description** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**resourceId** | **String** | | [optional] +**resourceUrl** | **String** | | [optional] +**order** | **int** | | [optional] +**resourceType** | [**ResourceType**](ResourceType.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) + + diff --git a/manager_api/doc/QuestionDTO.md b/manager_api/doc/QuestionDTO.md index f119fb3..24020cc 100644 --- a/manager_api/doc/QuestionDTO.md +++ b/manager_api/doc/QuestionDTO.md @@ -8,10 +8,11 @@ import 'package:manager_api/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**label** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] **responses** | [**List**](ResponseDTO.md) | | [optional] [default to const []] -**resourceId** | **String** | | [optional] -**source_** | **String** | | [optional] +**imageBackgroundResourceId** | **String** | | [optional] +**imageBackgroundResourceType** | [**ResourceType**](ResourceType.md) | | [optional] +**imageBackgroundResourceUrl** | **String** | | [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) diff --git a/manager_api/doc/QuizzDTOBadLevel.md b/manager_api/doc/QuizzDTOBadLevel.md index 94aa6b1..fd4ad3a 100644 --- a/manager_api/doc/QuizzDTOBadLevel.md +++ b/manager_api/doc/QuizzDTOBadLevel.md @@ -8,9 +8,7 @@ import 'package:manager_api/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] -**resourceId** | **String** | | [optional] -**source_** | **String** | | [optional] +**label** | [**List**](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) diff --git a/manager_api/doc/ResourceApi.md b/manager_api/doc/ResourceApi.md index 83d00db..22722f9 100644 --- a/manager_api/doc/ResourceApi.md +++ b/manager_api/doc/ResourceApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *https://api.myinfomate.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/ResourceDTO.md b/manager_api/doc/ResourceDTO.md index 6289a37..8f3ef86 100644 --- a/manager_api/doc/ResourceDTO.md +++ b/manager_api/doc/ResourceDTO.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **String** | | [optional] **type** | [**ResourceType**](ResourceType.md) | | [optional] **label** | **String** | | [optional] -**data** | **String** | | [optional] +**url** | **String** | | [optional] **dateCreation** | [**DateTime**](DateTime.md) | | [optional] **instanceId** | **String** | | [optional] diff --git a/manager_api/doc/ResponseDTO.md b/manager_api/doc/ResponseDTO.md index 7e6ed27..c40e9a8 100644 --- a/manager_api/doc/ResponseDTO.md +++ b/manager_api/doc/ResponseDTO.md @@ -8,7 +8,7 @@ import 'package:manager_api/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**label** | [**List**](TranslationDTO.md) | | [optional] [default to const []] +**label** | [**List**](TranslationAndResourceDTO.md) | | [optional] [default to const []] **isGood** | **bool** | | [optional] **order** | **int** | | [optional] diff --git a/manager_api/doc/SectionApi.md b/manager_api/doc/SectionApi.md index 46e8e00..5dba346 100644 --- a/manager_api/doc/SectionApi.md +++ b/manager_api/doc/SectionApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *https://api.myinfomate.be* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,6 +13,7 @@ Method | HTTP request | Description [**sectionDelete**](SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} | [**sectionDeleteAllForConfiguration**](SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} | [**sectionGet**](SectionApi.md#sectionget) | **GET** /api/Section | +[**sectionGetAgendaDTO**](SectionApi.md#sectiongetagendadto) | **GET** /api/Section/AgendaDTO | [**sectionGetAllBeaconsForInstance**](SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} | [**sectionGetAllSectionSubSections**](SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections | [**sectionGetArticleDTO**](SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO | @@ -20,9 +21,12 @@ Method | HTTP request | Description [**sectionGetFromConfiguration**](SectionApi.md#sectiongetfromconfiguration) | **GET** /api/Section/configuration/{id} | [**sectionGetMapDTO**](SectionApi.md#sectiongetmapdto) | **GET** /api/Section/MapDTO | [**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 | [**sectionGetSliderDTO**](SectionApi.md#sectiongetsliderdto) | **GET** /api/Section/SliderDTO | [**sectionGetVideoDTO**](SectionApi.md#sectiongetvideodto) | **GET** /api/Section/VideoDTO | +[**sectionGetWeatherDTO**](SectionApi.md#sectiongetweatherdto) | **GET** /api/Section/WeatherDTO | [**sectionGetWebDTO**](SectionApi.md#sectiongetwebdto) | **GET** /api/Section/WebDTO | [**sectionPlayerMessageDTO**](SectionApi.md#sectionplayermessagedto) | **GET** /api/Section/PlayerMessageDTO | [**sectionUpdate**](SectionApi.md#sectionupdate) | **PUT** /api/Section | @@ -201,6 +205,45 @@ 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) +# **sectionGetAgendaDTO** +> AgendaDTO sectionGetAgendaDTO() + + + +### Example +```dart +import 'package:manager_api/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionApi(); + +try { + final result = api_instance.sectionGetAgendaDTO(); + print(result); +} catch (e) { + print('Exception when calling SectionApi->sectionGetAgendaDTO: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**AgendaDTO**](AgendaDTO.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) + # **sectionGetAllBeaconsForInstance** > List sectionGetAllBeaconsForInstance(instanceId) @@ -490,6 +533,84 @@ 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) +# **sectionGetPdfDTO** +> PdfDTO sectionGetPdfDTO() + + + +### Example +```dart +import 'package:manager_api/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionApi(); + +try { + final result = api_instance.sectionGetPdfDTO(); + print(result); +} catch (e) { + print('Exception when calling SectionApi->sectionGetPdfDTO: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PdfDTO**](PdfDTO.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) + +# **sectionGetPuzzleDTO** +> PuzzleDTO sectionGetPuzzleDTO() + + + +### Example +```dart +import 'package:manager_api/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionApi(); + +try { + final result = api_instance.sectionGetPuzzleDTO(); + print(result); +} catch (e) { + print('Exception when calling SectionApi->sectionGetPuzzleDTO: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**PuzzleDTO**](PuzzleDTO.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) + # **sectionGetQuizzDTO** > QuizzDTO sectionGetQuizzDTO() @@ -607,6 +728,45 @@ 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) +# **sectionGetWeatherDTO** +> WeatherDTO sectionGetWeatherDTO() + + + +### Example +```dart +import 'package:manager_api/api.dart'; +// TODO Configure OAuth2 access token for authorization: bearer +//defaultApiClient.getAuthentication('bearer').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = SectionApi(); + +try { + final result = api_instance.sectionGetWeatherDTO(); + print(result); +} catch (e) { + print('Exception when calling SectionApi->sectionGetWeatherDTO: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WeatherDTO**](WeatherDTO.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) + # **sectionGetWebDTO** > WebDTO sectionGetWebDTO() diff --git a/manager_api/doc/SliderDTO.md b/manager_api/doc/SliderDTO.md index 36c8207..31d6839 100644 --- a/manager_api/doc/SliderDTO.md +++ b/manager_api/doc/SliderDTO.md @@ -8,7 +8,7 @@ import 'package:manager_api/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**images** | [**List**](ImageDTO.md) | | [optional] [default to const []] +**contents** | [**List**](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) diff --git a/manager_api/doc/TokenDTO.md b/manager_api/doc/TokenDTO.md index f8a2124..843486c 100644 --- a/manager_api/doc/TokenDTO.md +++ b/manager_api/doc/TokenDTO.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **expiresIn** | **int** | | [optional] **expiration** | [**DateTime**](DateTime.md) | | [optional] **instanceId** | **String** | | [optional] +**pinCode** | **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) diff --git a/manager_api/doc/TranslationAndResourceDTO.md b/manager_api/doc/TranslationAndResourceDTO.md new file mode 100644 index 0000000..5f6f567 --- /dev/null +++ b/manager_api/doc/TranslationAndResourceDTO.md @@ -0,0 +1,19 @@ +# manager_api.model.TranslationAndResourceDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**language** | **String** | | [optional] +**value** | **String** | | [optional] +**resourceId** | **String** | | [optional] +**resourceType** | [**ResourceType**](ResourceType.md) | | [optional] +**resourceUrl** | **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) + + diff --git a/manager_api/doc/UserApi.md b/manager_api/doc/UserApi.md index 5963708..644770e 100644 --- a/manager_api/doc/UserApi.md +++ b/manager_api/doc/UserApi.md @@ -5,7 +5,7 @@ import 'package:manager_api/api.dart'; ``` -All URIs are relative to *https://api.mymuseum.be* +All URIs are relative to *https://api.myinfomate.be* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/manager_api/doc/WeatherDTO.md b/manager_api/doc/WeatherDTO.md new file mode 100644 index 0000000..fedb7d7 --- /dev/null +++ b/manager_api/doc/WeatherDTO.md @@ -0,0 +1,17 @@ +# manager_api.model.WeatherDTO + +## Load the model package +```dart +import 'package:manager_api/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**city** | **String** | | [optional] +**updatedDate** | [**DateTime**](DateTime.md) | | [optional] +**result** | **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) + + diff --git a/manager_api/lib/api.dart b/manager_api/lib/api.dart index 3d214e5..078b45c 100644 --- a/manager_api/lib/api.dart +++ b/manager_api/lib/api.dart @@ -35,24 +35,36 @@ part 'api/resource_api.dart'; part 'api/section_api.dart'; part 'api/user_api.dart'; +part 'model/agenda_dto.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/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_dto.dart'; -part 'model/image_dto.dart'; -part 'model/image_geo_point.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_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/pdf_dto.dart'; part 'model/player_message_dto.dart'; +part 'model/puzzle_dto.dart'; +part 'model/puzzle_dto_image.dart'; part 'model/question_dto.dart'; part 'model/quizz_dto.dart'; part 'model/quizz_dto_bad_level.dart'; @@ -63,10 +75,12 @@ part 'model/section_dto.dart'; part 'model/section_type.dart'; part 'model/slider_dto.dart'; part 'model/token_dto.dart'; +part 'model/translation_and_resource_dto.dart'; part 'model/translation_dto.dart'; part 'model/user.dart'; part 'model/user_detail_dto.dart'; part 'model/video_dto.dart'; +part 'model/weather_dto.dart'; part 'model/web_dto.dart'; diff --git a/manager_api/lib/api/configuration_api.dart b/manager_api/lib/api/configuration_api.dart index 0814f10..8eacded 100644 --- a/manager_api/lib/api/configuration_api.dart +++ b/manager_api/lib/api/configuration_api.dart @@ -152,8 +152,8 @@ class ConfigurationApi { /// * [String] id (required): /// /// * [String] language: - Future configurationExport(String id, { String? language, }) async { - final response = await configurationExportWithHttpInfo(id, language: language, ); + Future 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)); } @@ -161,14 +161,10 @@ class ConfigurationApi { // 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) { - var test = await _decodeBodyBytes(response); - var responseJSON = json.decode(test); - var export = ExportConfigurationDTO.fromJson(responseJSON); + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ExportConfigurationDTO',) as ExportConfigurationDTO; - return export; - //return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; } - return null; + return Future.value(null); } /// Performs an HTTP 'GET /api/Configuration' operation and returns the [Response]. @@ -225,6 +221,60 @@ class ConfigurationApi { return null; } + /// Performs an HTTP 'GET /api/Configuration/byPin' operation and returns the [Response]. + /// Parameters: + /// + /// * [int] pinCode: + Future configurationGetConfigurationsByPinCodeWithHttpInfo({ int? pinCode, }) async { + // ignore: prefer_const_declarations + final path = r'/api/Configuration/byPin'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (pinCode != null) { + queryParams.addAll(_queryParams('', 'pinCode', pinCode)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [int] pinCode: + Future?> configurationGetConfigurationsByPinCode({ int? 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) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(); + + } + return null; + } + /// Performs an HTTP 'GET /api/Configuration/{id}' operation and returns the [Response]. /// Parameters: /// diff --git a/manager_api/lib/api/instance_api.dart b/manager_api/lib/api/instance_api.dart index ef652ce..2e120d1 100644 --- a/manager_api/lib/api/instance_api.dart +++ b/manager_api/lib/api/instance_api.dart @@ -203,6 +203,57 @@ class InstanceApi { return null; } + /// Performs an HTTP 'GET /api/Instance/byPin' operation and returns the [Response]. + /// Parameters: + /// + /// * [int] pinCode: + Future instanceGetInstanceByPinCodeWithHttpInfo({ int? pinCode, }) async { + // ignore: prefer_const_declarations + final path = r'/api/Instance/byPin'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (pinCode != null) { + queryParams.addAll(_queryParams('', 'pinCode', pinCode)); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [int] pinCode: + Future instanceGetInstanceByPinCode({ int? 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; + + } + return null; + } + /// Performs an HTTP 'PUT /api/Instance' operation and returns the [Response]. /// Parameters: /// diff --git a/manager_api/lib/api/section_api.dart b/manager_api/lib/api/section_api.dart index bc9addb..5dfcc5d 100644 --- a/manager_api/lib/api/section_api.dart +++ b/manager_api/lib/api/section_api.dart @@ -213,6 +213,47 @@ class SectionApi { return null; } + /// Performs an HTTP 'GET /api/Section/AgendaDTO' operation and returns the [Response]. + Future sectionGetAgendaDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/AgendaDTO'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + Future sectionGetAgendaDTO() async { + final response = await sectionGetAgendaDTOWithHttpInfo(); + 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), 'AgendaDTO',) as AgendaDTO; + + } + return null; + } + /// Performs an HTTP 'GET /api/Section/beacons/{instanceId}' operation and returns the [Response]. /// Parameters: /// @@ -537,6 +578,88 @@ class SectionApi { return null; } + /// Performs an HTTP 'GET /api/Section/PdfDTO' operation and returns the [Response]. + Future sectionGetPdfDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/PdfDTO'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + Future sectionGetPdfDTO() async { + final response = await sectionGetPdfDTOWithHttpInfo(); + 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), 'PdfDTO',) as PdfDTO; + + } + return null; + } + + /// Performs an HTTP 'GET /api/Section/PuzzleDTO' operation and returns the [Response]. + Future sectionGetPuzzleDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/PuzzleDTO'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + Future sectionGetPuzzleDTO() async { + final response = await sectionGetPuzzleDTOWithHttpInfo(); + 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), 'PuzzleDTO',) as PuzzleDTO; + + } + return null; + } + /// Performs an HTTP 'GET /api/Section/QuizzDTO' operation and returns the [Response]. Future sectionGetQuizzDTOWithHttpInfo() async { // ignore: prefer_const_declarations @@ -660,6 +783,47 @@ class SectionApi { return null; } + /// Performs an HTTP 'GET /api/Section/WeatherDTO' operation and returns the [Response]. + Future sectionGetWeatherDTOWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/api/Section/WeatherDTO'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + Future sectionGetWeatherDTO() async { + final response = await sectionGetWeatherDTOWithHttpInfo(); + 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), 'WeatherDTO',) as WeatherDTO; + + } + return null; + } + /// Performs an HTTP 'GET /api/Section/WebDTO' operation and returns the [Response]. Future sectionGetWebDTOWithHttpInfo() async { // ignore: prefer_const_declarations diff --git a/manager_api/lib/api_client.dart b/manager_api/lib/api_client.dart index 70d5cce..2fb099d 100644 --- a/manager_api/lib/api_client.dart +++ b/manager_api/lib/api_client.dart @@ -11,11 +11,13 @@ part of openapi.api; class ApiClient { - ApiClient({this.basePath = 'https://api.mymuseum.be', this.authentication}); + ApiClient({this.basePath = 'https://api.myinfomate.be', this.authentication,}); final String basePath; + final Authentication? authentication; var _client = Client(); + final _defaultHeaderMap = {}; /// Returns the current HTTP [Client] instance to use in this class. /// @@ -27,15 +29,12 @@ class ApiClient { _client = newClient; } - final _defaultHeaderMap = {}; - final Authentication? authentication; + Map get defaultHeaderMap => _defaultHeaderMap; void addDefaultHeader(String key, String value) { _defaultHeaderMap[key] = value; } - Map get defaultHeaderMap => _defaultHeaderMap; - // We don't use a Map for queryParams. // If collectionFormat is 'multi', a key might appear multiple times. Future invokeAPI( @@ -47,7 +46,7 @@ class ApiClient { Map formParams, String? contentType, ) async { - _updateParamsForAuth(queryParams, headerParams); + await authentication?.applyToParams(queryParams, headerParams); headerParams.addAll(_defaultHeaderMap); if (contentType != null) { @@ -165,16 +164,6 @@ class ApiClient { @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') String serialize(Object? value) => value == null ? '' : json.encode(value); - /// Update query and header parameters based on authentication settings. - void _updateParamsForAuth( - List queryParams, - Map headerParams, - ) { - if (authentication != null) { - authentication!.applyToParams(queryParams, headerParams); - } - } - static dynamic _deserialize(dynamic value, String targetType, {bool growable = false}) { try { switch (targetType) { @@ -190,10 +179,20 @@ class ApiClient { } final valueString = '$value'.toLowerCase(); return valueString == 'true' || valueString == '1'; + case 'DateTime': + return value is DateTime ? value : DateTime.tryParse(value); + case 'AgendaDTO': + return AgendaDTO.fromJson(value); case 'ArticleDTO': return ArticleDTO.fromJson(value); + case 'CategorieDTO': + return CategorieDTO.fromJson(value); case 'ConfigurationDTO': return ConfigurationDTO.fromJson(value); + case 'ContentDTO': + return ContentDTO.fromJson(value); + case 'ContentGeoPoint': + return ContentGeoPoint.fromJson(value); case 'DeviceDTO': return DeviceDTO.fromJson(value); case 'DeviceDetailDTO': @@ -206,10 +205,8 @@ class ApiClient { return ExportConfigurationDTOAllOf.fromJson(value); case 'GeoPointDTO': return GeoPointDTO.fromJson(value); - case 'ImageDTO': - return ImageDTO.fromJson(value); - case 'ImageGeoPoint': - return ImageGeoPoint.fromJson(value); + case 'GeoPointDTOCategorie': + return GeoPointDTOCategorie.fromJson(value); case 'Instance': return Instance.fromJson(value); case 'InstanceDTO': @@ -220,12 +217,30 @@ class ApiClient { 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 'MapProvider': + return MapProviderTypeTransformer().decode(value); case 'MapTypeApp': return MapTypeAppTypeTransformer().decode(value); + case 'MapTypeMapBox': + return MapTypeMapBoxTypeTransformer().decode(value); case 'MenuDTO': return MenuDTO.fromJson(value); + case 'PDFFileDTO': + return PDFFileDTO.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 'QuestionDTO': return QuestionDTO.fromJson(value); case 'QuizzDTO': @@ -246,6 +261,8 @@ class ApiClient { return SliderDTO.fromJson(value); case 'TokenDTO': return TokenDTO.fromJson(value); + case 'TranslationAndResourceDTO': + return TranslationAndResourceDTO.fromJson(value); case 'TranslationDTO': return TranslationDTO.fromJson(value); case 'User': @@ -254,6 +271,8 @@ class ApiClient { return UserDetailDTO.fromJson(value); case 'VideoDTO': return VideoDTO.fromJson(value); + case 'WeatherDTO': + return WeatherDTO.fromJson(value); case 'WebDTO': return WebDTO.fromJson(value); default: diff --git a/manager_api/lib/api_helper.dart b/manager_api/lib/api_helper.dart index fbfe3c5..d13d9d7 100644 --- a/manager_api/lib/api_helper.dart +++ b/manager_api/lib/api_helper.dart @@ -55,9 +55,15 @@ String parameterToString(dynamic value) { if (value is DateTime) { return value.toUtc().toIso8601String(); } + if (value is MapProvider) { + return MapProviderTypeTransformer().encode(value).toString(); + } if (value is MapTypeApp) { return MapTypeAppTypeTransformer().encode(value).toString(); } + if (value is MapTypeMapBox) { + return MapTypeMapBoxTypeTransformer().encode(value).toString(); + } if (value is ResourceType) { return ResourceTypeTypeTransformer().encode(value).toString(); } diff --git a/manager_api/lib/auth/api_key_auth.dart b/manager_api/lib/auth/api_key_auth.dart index e304eda..84dc295 100644 --- a/manager_api/lib/auth/api_key_auth.dart +++ b/manager_api/lib/auth/api_key_auth.dart @@ -20,7 +20,7 @@ class ApiKeyAuth implements Authentication { String apiKey = ''; @override - void applyToParams(List queryParams, Map headerParams) { + Future applyToParams(List queryParams, Map headerParams,) async { final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; if (paramValue.isNotEmpty) { diff --git a/manager_api/lib/auth/authentication.dart b/manager_api/lib/auth/authentication.dart index 49baf7c..1b1b8ae 100644 --- a/manager_api/lib/auth/authentication.dart +++ b/manager_api/lib/auth/authentication.dart @@ -13,5 +13,5 @@ part of openapi.api; // ignore: one_member_abstracts abstract class Authentication { /// Apply authentication settings to header and query params. - void applyToParams(List queryParams, Map headerParams); + Future applyToParams(List queryParams, Map headerParams); } diff --git a/manager_api/lib/auth/http_basic_auth.dart b/manager_api/lib/auth/http_basic_auth.dart index 81abd71..dfedaa5 100644 --- a/manager_api/lib/auth/http_basic_auth.dart +++ b/manager_api/lib/auth/http_basic_auth.dart @@ -17,7 +17,7 @@ class HttpBasicAuth implements Authentication { String password; @override - void applyToParams(List queryParams, Map headerParams) { + Future applyToParams(List queryParams, Map headerParams,) async { if (username.isNotEmpty && password.isNotEmpty) { final credentials = '$username:$password'; headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; diff --git a/manager_api/lib/auth/http_bearer_auth.dart b/manager_api/lib/auth/http_bearer_auth.dart index 213f348..eddf3a5 100644 --- a/manager_api/lib/auth/http_bearer_auth.dart +++ b/manager_api/lib/auth/http_bearer_auth.dart @@ -27,7 +27,7 @@ class HttpBearerAuth implements Authentication { } @override - void applyToParams(List queryParams, Map headerParams) { + Future applyToParams(List queryParams, Map headerParams,) async { if (_accessToken == null) { return; } diff --git a/manager_api/lib/auth/oauth.dart b/manager_api/lib/auth/oauth.dart index e9b87cf..e9e7d78 100644 --- a/manager_api/lib/auth/oauth.dart +++ b/manager_api/lib/auth/oauth.dart @@ -16,7 +16,7 @@ class OAuth implements Authentication { String accessToken; @override - void applyToParams(List queryParams, Map headerParams) { + Future applyToParams(List queryParams, Map headerParams,) async { if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } diff --git a/manager_api/lib/model/agenda_dto.dart b/manager_api/lib/model/agenda_dto.dart new file mode 100644 index 0000000..27e2e1b --- /dev/null +++ b/manager_api/lib/model/agenda_dto.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 AgendaDTO { + /// Returns a new [AgendaDTO] instance. + AgendaDTO({ + this.resourceIds = const [], + this.mapProvider, + }); + + List? resourceIds; + + MapProvider? mapProvider; + + @override + bool operator ==(Object other) => identical(this, other) || other is AgendaDTO && + other.resourceIds == resourceIds && + other.mapProvider == mapProvider; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (resourceIds == null ? 0 : resourceIds!.hashCode) + + (mapProvider == null ? 0 : mapProvider!.hashCode); + + @override + String toString() => 'AgendaDTO[resourceIds=$resourceIds, mapProvider=$mapProvider]'; + + Map toJson() { + final json = {}; + if (this.resourceIds != null) { + json[r'resourceIds'] = this.resourceIds; + } else { + json[r'resourceIds'] = null; + } + if (this.mapProvider != null) { + json[r'mapProvider'] = this.mapProvider; + } else { + json[r'mapProvider'] = null; + } + return json; + } + + /// Returns a new [AgendaDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AgendaDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AgendaDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AgendaDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AgendaDTO( + resourceIds: TranslationDTO.listFromJson(json[r'resourceIds']), + mapProvider: MapProvider.fromJson(json[r'mapProvider']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AgendaDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AgendaDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AgendaDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AgendaDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/article_dto.dart b/manager_api/lib/model/article_dto.dart index 5e6cd8f..2221429 100644 --- a/manager_api/lib/model/article_dto.dart +++ b/manager_api/lib/model/article_dto.dart @@ -17,7 +17,7 @@ class ArticleDTO { this.isContentTop, this.audioIds = const [], this.isReadAudioAuto, - this.images = const [], + this.contents = const [], }); List? content; @@ -40,7 +40,7 @@ class ArticleDTO { /// bool? isReadAudioAuto; - List? images; + List? contents; @override bool operator ==(Object other) => identical(this, other) || other is ArticleDTO && @@ -48,7 +48,7 @@ class ArticleDTO { other.isContentTop == isContentTop && other.audioIds == audioIds && other.isReadAudioAuto == isReadAudioAuto && - other.images == images; + other.contents == contents; @override int get hashCode => @@ -57,29 +57,39 @@ class ArticleDTO { (isContentTop == null ? 0 : isContentTop!.hashCode) + (audioIds == null ? 0 : audioIds!.hashCode) + (isReadAudioAuto == null ? 0 : isReadAudioAuto!.hashCode) + - (images == null ? 0 : images!.hashCode); + (contents == null ? 0 : contents!.hashCode); @override - String toString() => 'ArticleDTO[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, images=$images]'; + String toString() => 'ArticleDTO[content=$content, isContentTop=$isContentTop, audioIds=$audioIds, isReadAudioAuto=$isReadAudioAuto, contents=$contents]'; Map toJson() { - final _json = {}; - if (content != null) { - _json[r'content'] = content; + final json = {}; + if (this.content != null) { + json[r'content'] = this.content; + } else { + json[r'content'] = null; } - if (isContentTop != null) { - _json[r'isContentTop'] = isContentTop; + if (this.isContentTop != null) { + json[r'isContentTop'] = this.isContentTop; + } else { + json[r'isContentTop'] = null; } - if (audioIds != null) { - _json[r'audioIds'] = audioIds; + if (this.audioIds != null) { + json[r'audioIds'] = this.audioIds; + } else { + json[r'audioIds'] = null; } - if (isReadAudioAuto != null) { - _json[r'isReadAudioAuto'] = isReadAudioAuto; + if (this.isReadAudioAuto != null) { + json[r'isReadAudioAuto'] = this.isReadAudioAuto; + } else { + json[r'isReadAudioAuto'] = null; } - if (images != null) { - _json[r'images'] = images; + if (this.contents != null) { + json[r'contents'] = this.contents; + } else { + json[r'contents'] = null; } - return _json; + return json; } /// Returns a new [ArticleDTO] instance and imports its values from @@ -101,17 +111,17 @@ class ArticleDTO { }()); return ArticleDTO( - content: TranslationDTO.listFromJson(json[r'content']) ?? const [], + content: TranslationDTO.listFromJson(json[r'content']), isContentTop: mapValueOfType(json, r'isContentTop'), - audioIds: TranslationDTO.listFromJson(json[r'audioIds']) ?? const [], + audioIds: TranslationDTO.listFromJson(json[r'audioIds']), isReadAudioAuto: mapValueOfType(json, r'isReadAudioAuto'), - images: ImageDTO.listFromJson(json[r'images']) ?? const [], + contents: ContentDTO.listFromJson(json[r'contents']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -142,12 +152,10 @@ class ArticleDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ArticleDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ArticleDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/categorie_dto.dart b/manager_api/lib/model/categorie_dto.dart new file mode 100644 index 0000000..33dc8da --- /dev/null +++ b/manager_api/lib/model/categorie_dto.dart @@ -0,0 +1,167 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 CategorieDTO { + /// Returns a new [CategorieDTO] instance. + CategorieDTO({ + this.id, + this.label = const [], + this.icon, + this.iconResourceId, + this.iconUrl, + this.order, + }); + + int? id; + + List? label; + + String? icon; + + String? iconResourceId; + + String? iconUrl; + + int? order; + + @override + bool operator ==(Object other) => identical(this, other) || other is CategorieDTO && + other.id == id && + other.label == label && + other.icon == icon && + other.iconResourceId == iconResourceId && + other.iconUrl == iconUrl && + other.order == order; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (icon == null ? 0 : icon!.hashCode) + + (iconResourceId == null ? 0 : iconResourceId!.hashCode) + + (iconUrl == null ? 0 : iconUrl!.hashCode) + + (order == null ? 0 : order!.hashCode); + + @override + String toString() => 'CategorieDTO[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.icon != null) { + json[r'icon'] = this.icon; + } else { + json[r'icon'] = null; + } + if (this.iconResourceId != null) { + json[r'iconResourceId'] = this.iconResourceId; + } else { + json[r'iconResourceId'] = null; + } + if (this.iconUrl != null) { + json[r'iconUrl'] = this.iconUrl; + } else { + json[r'iconUrl'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + return json; + } + + /// Returns a new [CategorieDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static CategorieDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "CategorieDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "CategorieDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return CategorieDTO( + id: mapValueOfType(json, r'id'), + label: TranslationDTO.listFromJson(json[r'label']), + icon: mapValueOfType(json, r'icon'), + iconResourceId: mapValueOfType(json, r'iconResourceId'), + iconUrl: mapValueOfType(json, r'iconUrl'), + order: mapValueOfType(json, r'order'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = CategorieDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = CategorieDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of CategorieDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = CategorieDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/configuration_dto.dart b/manager_api/lib/model/configuration_dto.dart index fae5f68..3d642fc 100644 --- a/manager_api/lib/model/configuration_dto.dart +++ b/manager_api/lib/model/configuration_dto.dart @@ -27,6 +27,17 @@ class ConfigurationDTO { this.isOffline, this.instanceId, this.sectionIds = const [], + this.loaderImageId, + this.loaderImageUrl, + this.weatherCity, + this.weatherUpdatedDate, + this.weatherResult, + this.isWeather, + this.isDate, + this.isHour, + this.isSectionImageBackground, + this.roundedValue, + this.screenPercentageSectionsMainPage, }); String? id; @@ -81,6 +92,52 @@ class ConfigurationDTO { List? sectionIds; + String? loaderImageId; + + String? loaderImageUrl; + + String? weatherCity; + + DateTime? weatherUpdatedDate; + + String? weatherResult; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isWeather; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isDate; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isHour; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSectionImageBackground; + + int? roundedValue; + + int? screenPercentageSectionsMainPage; + @override bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO && other.id == id && @@ -96,7 +153,18 @@ class ConfigurationDTO { other.isTablet == isTablet && other.isOffline == isOffline && other.instanceId == instanceId && - other.sectionIds == sectionIds; + other.sectionIds == sectionIds && + other.loaderImageId == loaderImageId && + other.loaderImageUrl == loaderImageUrl && + other.weatherCity == weatherCity && + other.weatherUpdatedDate == weatherUpdatedDate && + other.weatherResult == weatherResult && + other.isWeather == isWeather && + other.isDate == isDate && + other.isHour == isHour && + other.isSectionImageBackground == isSectionImageBackground && + other.roundedValue == roundedValue && + other.screenPercentageSectionsMainPage == screenPercentageSectionsMainPage; @override int get hashCode => @@ -114,56 +182,150 @@ class ConfigurationDTO { (isTablet == null ? 0 : isTablet!.hashCode) + (isOffline == null ? 0 : isOffline!.hashCode) + (instanceId == null ? 0 : instanceId!.hashCode) + - (sectionIds == null ? 0 : sectionIds!.hashCode); + (sectionIds == null ? 0 : sectionIds!.hashCode) + + (loaderImageId == null ? 0 : loaderImageId!.hashCode) + + (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + + (weatherCity == null ? 0 : weatherCity!.hashCode) + + (weatherUpdatedDate == null ? 0 : weatherUpdatedDate!.hashCode) + + (weatherResult == null ? 0 : weatherResult!.hashCode) + + (isWeather == null ? 0 : isWeather!.hashCode) + + (isDate == null ? 0 : isDate!.hashCode) + + (isHour == null ? 0 : isHour!.hashCode) + + (isSectionImageBackground == null ? 0 : isSectionImageBackground!.hashCode) + + (roundedValue == null ? 0 : roundedValue!.hashCode) + + (screenPercentageSectionsMainPage == null ? 0 : screenPercentageSectionsMainPage!.hashCode); @override - String toString() => 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds]'; + String toString() => 'ConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, weatherUpdatedDate=$weatherUpdatedDate, weatherResult=$weatherResult, isWeather=$isWeather, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (label != null) { - _json[r'label'] = label; + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; } - if (title != null) { - _json[r'title'] = title; + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; } - if (imageId != null) { - _json[r'imageId'] = imageId; + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; } - if (imageSource != null) { - _json[r'imageSource'] = imageSource; + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; } - if (primaryColor != null) { - _json[r'primaryColor'] = primaryColor; + if (this.primaryColor != null) { + json[r'primaryColor'] = this.primaryColor; + } else { + json[r'primaryColor'] = null; } - if (secondaryColor != null) { - _json[r'secondaryColor'] = secondaryColor; + if (this.secondaryColor != null) { + json[r'secondaryColor'] = this.secondaryColor; + } else { + json[r'secondaryColor'] = null; } - if (languages != null) { - _json[r'languages'] = languages; + if (this.languages != null) { + json[r'languages'] = this.languages; + } else { + json[r'languages'] = null; } - if (dateCreation != null) { - _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; } - if (isMobile != null) { - _json[r'isMobile'] = isMobile; + if (this.isMobile != null) { + json[r'isMobile'] = this.isMobile; + } else { + json[r'isMobile'] = null; } - if (isTablet != null) { - _json[r'isTablet'] = isTablet; + if (this.isTablet != null) { + json[r'isTablet'] = this.isTablet; + } else { + json[r'isTablet'] = null; } - if (isOffline != null) { - _json[r'isOffline'] = isOffline; + if (this.isOffline != null) { + json[r'isOffline'] = this.isOffline; + } else { + json[r'isOffline'] = null; } - if (instanceId != null) { - _json[r'instanceId'] = instanceId; + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; } - if (sectionIds != null) { - _json[r'sectionIds'] = sectionIds; + if (this.sectionIds != null) { + json[r'sectionIds'] = this.sectionIds; + } else { + json[r'sectionIds'] = null; } - return _json; + if (this.loaderImageId != null) { + json[r'loaderImageId'] = this.loaderImageId; + } else { + json[r'loaderImageId'] = null; + } + if (this.loaderImageUrl != null) { + json[r'loaderImageUrl'] = this.loaderImageUrl; + } else { + json[r'loaderImageUrl'] = null; + } + if (this.weatherCity != null) { + json[r'weatherCity'] = this.weatherCity; + } else { + json[r'weatherCity'] = null; + } + if (this.weatherUpdatedDate != null) { + json[r'weatherUpdatedDate'] = this.weatherUpdatedDate!.toUtc().toIso8601String(); + } else { + json[r'weatherUpdatedDate'] = null; + } + if (this.weatherResult != null) { + json[r'weatherResult'] = this.weatherResult; + } else { + json[r'weatherResult'] = null; + } + if (this.isWeather != null) { + json[r'isWeather'] = this.isWeather; + } else { + json[r'isWeather'] = null; + } + if (this.isDate != null) { + json[r'isDate'] = this.isDate; + } else { + json[r'isDate'] = null; + } + if (this.isHour != null) { + json[r'isHour'] = this.isHour; + } else { + json[r'isHour'] = null; + } + if (this.isSectionImageBackground != null) { + json[r'isSectionImageBackground'] = this.isSectionImageBackground; + } else { + json[r'isSectionImageBackground'] = null; + } + if (this.roundedValue != null) { + json[r'roundedValue'] = this.roundedValue; + } else { + json[r'roundedValue'] = null; + } + if (this.screenPercentageSectionsMainPage != null) { + json[r'screenPercentageSectionsMainPage'] = this.screenPercentageSectionsMainPage; + } else { + json[r'screenPercentageSectionsMainPage'] = null; + } + return json; } /// Returns a new [ConfigurationDTO] instance and imports its values from @@ -187,7 +349,7 @@ class ConfigurationDTO { return ConfigurationDTO( id: mapValueOfType(json, r'id'), label: mapValueOfType(json, r'label'), - title: TranslationDTO.listFromJson(json[r'title']) ?? const [], + title: TranslationDTO.listFromJson(json[r'title']), imageId: mapValueOfType(json, r'imageId'), imageSource: mapValueOfType(json, r'imageSource'), primaryColor: mapValueOfType(json, r'primaryColor'), @@ -203,12 +365,23 @@ class ConfigurationDTO { sectionIds: json[r'sectionIds'] is List ? (json[r'sectionIds'] as List).cast() : const [], + loaderImageId: mapValueOfType(json, r'loaderImageId'), + loaderImageUrl: mapValueOfType(json, r'loaderImageUrl'), + weatherCity: mapValueOfType(json, r'weatherCity'), + weatherUpdatedDate: mapDateTime(json, r'weatherUpdatedDate', ''), + weatherResult: mapValueOfType(json, r'weatherResult'), + isWeather: mapValueOfType(json, r'isWeather'), + isDate: mapValueOfType(json, r'isDate'), + isHour: mapValueOfType(json, r'isHour'), + isSectionImageBackground: mapValueOfType(json, r'isSectionImageBackground'), + roundedValue: mapValueOfType(json, r'roundedValue'), + screenPercentageSectionsMainPage: mapValueOfType(json, r'screenPercentageSectionsMainPage'), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -239,12 +412,10 @@ class ConfigurationDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ConfigurationDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ConfigurationDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/content_dto.dart b/manager_api/lib/model/content_dto.dart new file mode 100644 index 0000000..32512da --- /dev/null +++ b/manager_api/lib/model/content_dto.dart @@ -0,0 +1,179 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 ContentDTO { + /// Returns a new [ContentDTO] instance. + ContentDTO({ + this.title = const [], + this.description = const [], + this.resourceId, + this.resourceUrl, + this.order, + this.resourceType, + }); + + List? title; + + List? description; + + String? resourceId; + + String? resourceUrl; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ResourceType? resourceType; + + @override + bool operator ==(Object other) => identical(this, other) || other is ContentDTO && + other.title == title && + other.description == description && + other.resourceId == resourceId && + other.resourceUrl == resourceUrl && + other.order == order && + other.resourceType == resourceType; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode); + + @override + String toString() => 'ContentDTO[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; + + Map toJson() { + final json = {}; + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; + } else { + json[r'resourceId'] = null; + } + if (this.resourceUrl != null) { + json[r'resourceUrl'] = this.resourceUrl; + } else { + json[r'resourceUrl'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.resourceType != null) { + json[r'resourceType'] = this.resourceType; + } else { + json[r'resourceType'] = null; + } + return json; + } + + /// Returns a new [ContentDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ContentDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ContentDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ContentDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ContentDTO( + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + resourceId: mapValueOfType(json, r'resourceId'), + resourceUrl: mapValueOfType(json, r'resourceUrl'), + order: mapValueOfType(json, r'order'), + resourceType: ResourceType.fromJson(json[r'resourceType']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ContentDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ContentDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ContentDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ContentDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/content_geo_point.dart b/manager_api/lib/model/content_geo_point.dart new file mode 100644 index 0000000..d299f8a --- /dev/null +++ b/manager_api/lib/model/content_geo_point.dart @@ -0,0 +1,151 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 ContentGeoPoint { + /// Returns a new [ContentGeoPoint] instance. + ContentGeoPoint({ + this.resourceId, + this.resourceType, + this.resourceUrl, + this.resourceName, + }); + + String? resourceId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ResourceType? resourceType; + + String? resourceUrl; + + String? resourceName; + + @override + bool operator ==(Object other) => identical(this, other) || other is ContentGeoPoint && + other.resourceId == resourceId && + other.resourceType == resourceType && + other.resourceUrl == resourceUrl && + other.resourceName == resourceName; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (resourceName == null ? 0 : resourceName!.hashCode); + + @override + String toString() => 'ContentGeoPoint[resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl, resourceName=$resourceName]'; + + Map toJson() { + final json = {}; + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; + } else { + json[r'resourceId'] = null; + } + if (this.resourceType != null) { + json[r'resourceType'] = this.resourceType; + } else { + json[r'resourceType'] = null; + } + if (this.resourceUrl != null) { + json[r'resourceUrl'] = this.resourceUrl; + } else { + json[r'resourceUrl'] = null; + } + if (this.resourceName != null) { + json[r'resourceName'] = this.resourceName; + } else { + json[r'resourceName'] = null; + } + return json; + } + + /// Returns a new [ContentGeoPoint] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ContentGeoPoint? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ContentGeoPoint[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ContentGeoPoint[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ContentGeoPoint( + resourceId: mapValueOfType(json, r'resourceId'), + resourceType: ResourceType.fromJson(json[r'resourceType']), + resourceUrl: mapValueOfType(json, r'resourceUrl'), + resourceName: mapValueOfType(json, r'resourceName'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ContentGeoPoint.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ContentGeoPoint.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ContentGeoPoint-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ContentGeoPoint.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/device_detail_dto.dart b/manager_api/lib/model/device_detail_dto.dart index 88ec18f..8c645d6 100644 --- a/manager_api/lib/model/device_detail_dto.dart +++ b/manager_api/lib/model/device_detail_dto.dart @@ -131,53 +131,83 @@ class DeviceDetailDTO { String toString() => 'DeviceDetailDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId, connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (identifier != null) { - _json[r'identifier'] = identifier; + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; } - if (name != null) { - _json[r'name'] = name; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; } - if (ipAddressWLAN != null) { - _json[r'ipAddressWLAN'] = ipAddressWLAN; + if (this.ipAddressWLAN != null) { + json[r'ipAddressWLAN'] = this.ipAddressWLAN; + } else { + json[r'ipAddressWLAN'] = null; } - if (ipAddressETH != null) { - _json[r'ipAddressETH'] = ipAddressETH; + if (this.ipAddressETH != null) { + json[r'ipAddressETH'] = this.ipAddressETH; + } else { + json[r'ipAddressETH'] = null; } - if (configurationId != null) { - _json[r'configurationId'] = configurationId; + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; } - if (configuration != null) { - _json[r'configuration'] = configuration; + if (this.configuration != null) { + json[r'configuration'] = this.configuration; + } else { + json[r'configuration'] = null; } - if (connected != null) { - _json[r'connected'] = connected; + if (this.connected != null) { + json[r'connected'] = this.connected; + } else { + json[r'connected'] = null; } - if (dateCreation != null) { - _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; } - if (dateUpdate != null) { - _json[r'dateUpdate'] = dateUpdate!.toUtc().toIso8601String(); + if (this.dateUpdate != null) { + json[r'dateUpdate'] = this.dateUpdate!.toUtc().toIso8601String(); + } else { + json[r'dateUpdate'] = null; } - if (instanceId != null) { - _json[r'instanceId'] = instanceId; + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; } - if (connectionLevel != null) { - _json[r'connectionLevel'] = connectionLevel; + if (this.connectionLevel != null) { + json[r'connectionLevel'] = this.connectionLevel; + } else { + json[r'connectionLevel'] = null; } - if (lastConnectionLevel != null) { - _json[r'lastConnectionLevel'] = lastConnectionLevel!.toUtc().toIso8601String(); + if (this.lastConnectionLevel != null) { + json[r'lastConnectionLevel'] = this.lastConnectionLevel!.toUtc().toIso8601String(); + } else { + json[r'lastConnectionLevel'] = null; } - if (batteryLevel != null) { - _json[r'batteryLevel'] = batteryLevel; + if (this.batteryLevel != null) { + json[r'batteryLevel'] = this.batteryLevel; + } else { + json[r'batteryLevel'] = null; } - if (lastBatteryLevel != null) { - _json[r'lastBatteryLevel'] = lastBatteryLevel!.toUtc().toIso8601String(); + if (this.lastBatteryLevel != null) { + json[r'lastBatteryLevel'] = this.lastBatteryLevel!.toUtc().toIso8601String(); + } else { + json[r'lastBatteryLevel'] = null; } - return _json; + return json; } /// Returns a new [DeviceDetailDTO] instance and imports its values from @@ -219,7 +249,7 @@ class DeviceDetailDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -250,12 +280,10 @@ class DeviceDetailDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = DeviceDetailDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = DeviceDetailDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/device_detail_dto_all_of.dart b/manager_api/lib/model/device_detail_dto_all_of.dart index cc7cfb6..2e990db 100644 --- a/manager_api/lib/model/device_detail_dto_all_of.dart +++ b/manager_api/lib/model/device_detail_dto_all_of.dart @@ -58,20 +58,28 @@ class DeviceDetailDTOAllOf { String toString() => 'DeviceDetailDTOAllOf[connectionLevel=$connectionLevel, lastConnectionLevel=$lastConnectionLevel, batteryLevel=$batteryLevel, lastBatteryLevel=$lastBatteryLevel]'; Map toJson() { - final _json = {}; - if (connectionLevel != null) { - _json[r'connectionLevel'] = connectionLevel; + final json = {}; + if (this.connectionLevel != null) { + json[r'connectionLevel'] = this.connectionLevel; + } else { + json[r'connectionLevel'] = null; } - if (lastConnectionLevel != null) { - _json[r'lastConnectionLevel'] = lastConnectionLevel!.toUtc().toIso8601String(); + if (this.lastConnectionLevel != null) { + json[r'lastConnectionLevel'] = this.lastConnectionLevel!.toUtc().toIso8601String(); + } else { + json[r'lastConnectionLevel'] = null; } - if (batteryLevel != null) { - _json[r'batteryLevel'] = batteryLevel; + if (this.batteryLevel != null) { + json[r'batteryLevel'] = this.batteryLevel; + } else { + json[r'batteryLevel'] = null; } - if (lastBatteryLevel != null) { - _json[r'lastBatteryLevel'] = lastBatteryLevel!.toUtc().toIso8601String(); + if (this.lastBatteryLevel != null) { + json[r'lastBatteryLevel'] = this.lastBatteryLevel!.toUtc().toIso8601String(); + } else { + json[r'lastBatteryLevel'] = null; } - return _json; + return json; } /// Returns a new [DeviceDetailDTOAllOf] instance and imports its values from @@ -102,7 +110,7 @@ class DeviceDetailDTOAllOf { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -133,12 +141,10 @@ class DeviceDetailDTOAllOf { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = DeviceDetailDTOAllOf.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = DeviceDetailDTOAllOf.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/device_dto.dart b/manager_api/lib/model/device_dto.dart index 7915fb8..7d8ea3a 100644 --- a/manager_api/lib/model/device_dto.dart +++ b/manager_api/lib/model/device_dto.dart @@ -99,41 +99,63 @@ class DeviceDTO { String toString() => 'DeviceDTO[id=$id, identifier=$identifier, name=$name, ipAddressWLAN=$ipAddressWLAN, ipAddressETH=$ipAddressETH, configurationId=$configurationId, configuration=$configuration, connected=$connected, dateCreation=$dateCreation, dateUpdate=$dateUpdate, instanceId=$instanceId]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (identifier != null) { - _json[r'identifier'] = identifier; + if (this.identifier != null) { + json[r'identifier'] = this.identifier; + } else { + json[r'identifier'] = null; } - if (name != null) { - _json[r'name'] = name; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; } - if (ipAddressWLAN != null) { - _json[r'ipAddressWLAN'] = ipAddressWLAN; + if (this.ipAddressWLAN != null) { + json[r'ipAddressWLAN'] = this.ipAddressWLAN; + } else { + json[r'ipAddressWLAN'] = null; } - if (ipAddressETH != null) { - _json[r'ipAddressETH'] = ipAddressETH; + if (this.ipAddressETH != null) { + json[r'ipAddressETH'] = this.ipAddressETH; + } else { + json[r'ipAddressETH'] = null; } - if (configurationId != null) { - _json[r'configurationId'] = configurationId; + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; } - if (configuration != null) { - _json[r'configuration'] = configuration; + if (this.configuration != null) { + json[r'configuration'] = this.configuration; + } else { + json[r'configuration'] = null; } - if (connected != null) { - _json[r'connected'] = connected; + if (this.connected != null) { + json[r'connected'] = this.connected; + } else { + json[r'connected'] = null; } - if (dateCreation != null) { - _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; } - if (dateUpdate != null) { - _json[r'dateUpdate'] = dateUpdate!.toUtc().toIso8601String(); + if (this.dateUpdate != null) { + json[r'dateUpdate'] = this.dateUpdate!.toUtc().toIso8601String(); + } else { + json[r'dateUpdate'] = null; } - if (instanceId != null) { - _json[r'instanceId'] = instanceId; + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; } - return _json; + return json; } /// Returns a new [DeviceDTO] instance and imports its values from @@ -171,7 +193,7 @@ class DeviceDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -202,12 +224,10 @@ class DeviceDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = DeviceDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = DeviceDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/export_configuration_dto.dart b/manager_api/lib/model/export_configuration_dto.dart index 04543ca..e1f7cad 100644 --- a/manager_api/lib/model/export_configuration_dto.dart +++ b/manager_api/lib/model/export_configuration_dto.dart @@ -27,6 +27,17 @@ class ExportConfigurationDTO { this.isOffline, this.instanceId, this.sectionIds = const [], + this.loaderImageId, + this.loaderImageUrl, + this.weatherCity, + this.weatherUpdatedDate, + this.weatherResult, + this.isWeather, + this.isDate, + this.isHour, + this.isSectionImageBackground, + this.roundedValue, + this.screenPercentageSectionsMainPage, this.sections = const [], this.resources = const [], }); @@ -83,6 +94,52 @@ class ExportConfigurationDTO { List? sectionIds; + String? loaderImageId; + + String? loaderImageUrl; + + String? weatherCity; + + DateTime? weatherUpdatedDate; + + String? weatherResult; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isWeather; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isDate; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isHour; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? isSectionImageBackground; + + int? roundedValue; + + int? screenPercentageSectionsMainPage; + List? sections; List? resources; @@ -103,6 +160,17 @@ class ExportConfigurationDTO { other.isOffline == isOffline && other.instanceId == instanceId && other.sectionIds == sectionIds && + other.loaderImageId == loaderImageId && + other.loaderImageUrl == loaderImageUrl && + other.weatherCity == weatherCity && + other.weatherUpdatedDate == weatherUpdatedDate && + other.weatherResult == weatherResult && + other.isWeather == isWeather && + other.isDate == isDate && + other.isHour == isHour && + other.isSectionImageBackground == isSectionImageBackground && + other.roundedValue == roundedValue && + other.screenPercentageSectionsMainPage == screenPercentageSectionsMainPage && other.sections == sections && other.resources == resources; @@ -123,63 +191,161 @@ class ExportConfigurationDTO { (isOffline == null ? 0 : isOffline!.hashCode) + (instanceId == null ? 0 : instanceId!.hashCode) + (sectionIds == null ? 0 : sectionIds!.hashCode) + + (loaderImageId == null ? 0 : loaderImageId!.hashCode) + + (loaderImageUrl == null ? 0 : loaderImageUrl!.hashCode) + + (weatherCity == null ? 0 : weatherCity!.hashCode) + + (weatherUpdatedDate == null ? 0 : weatherUpdatedDate!.hashCode) + + (weatherResult == null ? 0 : weatherResult!.hashCode) + + (isWeather == null ? 0 : isWeather!.hashCode) + + (isDate == null ? 0 : isDate!.hashCode) + + (isHour == null ? 0 : isHour!.hashCode) + + (isSectionImageBackground == null ? 0 : isSectionImageBackground!.hashCode) + + (roundedValue == null ? 0 : roundedValue!.hashCode) + + (screenPercentageSectionsMainPage == null ? 0 : screenPercentageSectionsMainPage!.hashCode) + (sections == null ? 0 : sections!.hashCode) + (resources == null ? 0 : resources!.hashCode); @override - String toString() => 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, sections=$sections, resources=$resources]'; + String toString() => 'ExportConfigurationDTO[id=$id, label=$label, title=$title, imageId=$imageId, imageSource=$imageSource, primaryColor=$primaryColor, secondaryColor=$secondaryColor, languages=$languages, dateCreation=$dateCreation, isMobile=$isMobile, isTablet=$isTablet, isOffline=$isOffline, instanceId=$instanceId, sectionIds=$sectionIds, loaderImageId=$loaderImageId, loaderImageUrl=$loaderImageUrl, weatherCity=$weatherCity, weatherUpdatedDate=$weatherUpdatedDate, weatherResult=$weatherResult, isWeather=$isWeather, isDate=$isDate, isHour=$isHour, isSectionImageBackground=$isSectionImageBackground, roundedValue=$roundedValue, screenPercentageSectionsMainPage=$screenPercentageSectionsMainPage, sections=$sections, resources=$resources]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (label != null) { - _json[r'label'] = label; + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; } - if (title != null) { - _json[r'title'] = title; + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; } - if (imageId != null) { - _json[r'imageId'] = imageId; + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; } - if (imageSource != null) { - _json[r'imageSource'] = imageSource; + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; } - if (primaryColor != null) { - _json[r'primaryColor'] = primaryColor; + if (this.primaryColor != null) { + json[r'primaryColor'] = this.primaryColor; + } else { + json[r'primaryColor'] = null; } - if (secondaryColor != null) { - _json[r'secondaryColor'] = secondaryColor; + if (this.secondaryColor != null) { + json[r'secondaryColor'] = this.secondaryColor; + } else { + json[r'secondaryColor'] = null; } - if (languages != null) { - _json[r'languages'] = languages; + if (this.languages != null) { + json[r'languages'] = this.languages; + } else { + json[r'languages'] = null; } - if (dateCreation != null) { - _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; } - if (isMobile != null) { - _json[r'isMobile'] = isMobile; + if (this.isMobile != null) { + json[r'isMobile'] = this.isMobile; + } else { + json[r'isMobile'] = null; } - if (isTablet != null) { - _json[r'isTablet'] = isTablet; + if (this.isTablet != null) { + json[r'isTablet'] = this.isTablet; + } else { + json[r'isTablet'] = null; } - if (isOffline != null) { - _json[r'isOffline'] = isOffline; + if (this.isOffline != null) { + json[r'isOffline'] = this.isOffline; + } else { + json[r'isOffline'] = null; } - if (instanceId != null) { - _json[r'instanceId'] = instanceId; + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; } - if (sectionIds != null) { - _json[r'sectionIds'] = sectionIds; + if (this.sectionIds != null) { + json[r'sectionIds'] = this.sectionIds; + } else { + json[r'sectionIds'] = null; } - if (sections != null) { - _json[r'sections'] = sections; + if (this.loaderImageId != null) { + json[r'loaderImageId'] = this.loaderImageId; + } else { + json[r'loaderImageId'] = null; } - if (resources != null) { - _json[r'resources'] = resources; + if (this.loaderImageUrl != null) { + json[r'loaderImageUrl'] = this.loaderImageUrl; + } else { + json[r'loaderImageUrl'] = null; } - return _json; + if (this.weatherCity != null) { + json[r'weatherCity'] = this.weatherCity; + } else { + json[r'weatherCity'] = null; + } + if (this.weatherUpdatedDate != null) { + json[r'weatherUpdatedDate'] = this.weatherUpdatedDate!.toUtc().toIso8601String(); + } else { + json[r'weatherUpdatedDate'] = null; + } + if (this.weatherResult != null) { + json[r'weatherResult'] = this.weatherResult; + } else { + json[r'weatherResult'] = null; + } + if (this.isWeather != null) { + json[r'isWeather'] = this.isWeather; + } else { + json[r'isWeather'] = null; + } + if (this.isDate != null) { + json[r'isDate'] = this.isDate; + } else { + json[r'isDate'] = null; + } + if (this.isHour != null) { + json[r'isHour'] = this.isHour; + } else { + json[r'isHour'] = null; + } + if (this.isSectionImageBackground != null) { + json[r'isSectionImageBackground'] = this.isSectionImageBackground; + } else { + json[r'isSectionImageBackground'] = null; + } + if (this.roundedValue != null) { + json[r'roundedValue'] = this.roundedValue; + } else { + json[r'roundedValue'] = null; + } + if (this.screenPercentageSectionsMainPage != null) { + json[r'screenPercentageSectionsMainPage'] = this.screenPercentageSectionsMainPage; + } else { + json[r'screenPercentageSectionsMainPage'] = null; + } + if (this.sections != null) { + json[r'sections'] = this.sections; + } else { + json[r'sections'] = null; + } + if (this.resources != null) { + json[r'resources'] = this.resources; + } else { + json[r'resources'] = null; + } + return json; } /// Returns a new [ExportConfigurationDTO] instance and imports its values from @@ -203,7 +369,7 @@ class ExportConfigurationDTO { return ExportConfigurationDTO( id: mapValueOfType(json, r'id'), label: mapValueOfType(json, r'label'), - title: TranslationDTO.listFromJson(json[r'title']) ?? const [], + title: TranslationDTO.listFromJson(json[r'title']), imageId: mapValueOfType(json, r'imageId'), imageSource: mapValueOfType(json, r'imageSource'), primaryColor: mapValueOfType(json, r'primaryColor'), @@ -219,14 +385,25 @@ class ExportConfigurationDTO { sectionIds: json[r'sectionIds'] is List ? (json[r'sectionIds'] as List).cast() : const [], - sections: SectionDTO.listFromJson(json[r'sections']) ?? const [], - resources: ResourceDTO.listFromJson(json[r'resources']) ?? const [], + loaderImageId: mapValueOfType(json, r'loaderImageId'), + loaderImageUrl: mapValueOfType(json, r'loaderImageUrl'), + weatherCity: mapValueOfType(json, r'weatherCity'), + weatherUpdatedDate: mapDateTime(json, r'weatherUpdatedDate', ''), + weatherResult: mapValueOfType(json, r'weatherResult'), + isWeather: mapValueOfType(json, r'isWeather'), + isDate: mapValueOfType(json, r'isDate'), + isHour: mapValueOfType(json, r'isHour'), + isSectionImageBackground: mapValueOfType(json, r'isSectionImageBackground'), + roundedValue: mapValueOfType(json, r'roundedValue'), + screenPercentageSectionsMainPage: mapValueOfType(json, r'screenPercentageSectionsMainPage'), + sections: SectionDTO.listFromJson(json[r'sections']), + resources: ResourceDTO.listFromJson(json[r'resources']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -257,12 +434,10 @@ class ExportConfigurationDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ExportConfigurationDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ExportConfigurationDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/export_configuration_dto_all_of.dart b/manager_api/lib/model/export_configuration_dto_all_of.dart index 28c86a7..89650d1 100644 --- a/manager_api/lib/model/export_configuration_dto_all_of.dart +++ b/manager_api/lib/model/export_configuration_dto_all_of.dart @@ -36,14 +36,18 @@ class ExportConfigurationDTOAllOf { String toString() => 'ExportConfigurationDTOAllOf[sections=$sections, resources=$resources]'; Map toJson() { - final _json = {}; - if (sections != null) { - _json[r'sections'] = sections; + final json = {}; + if (this.sections != null) { + json[r'sections'] = this.sections; + } else { + json[r'sections'] = null; } - if (resources != null) { - _json[r'resources'] = resources; + if (this.resources != null) { + json[r'resources'] = this.resources; + } else { + json[r'resources'] = null; } - return _json; + return json; } /// Returns a new [ExportConfigurationDTOAllOf] instance and imports its values from @@ -65,14 +69,14 @@ class ExportConfigurationDTOAllOf { }()); return ExportConfigurationDTOAllOf( - sections: SectionDTO.listFromJson(json[r'sections']) ?? const [], - resources: ResourceDTO.listFromJson(json[r'resources']) ?? const [], + sections: SectionDTO.listFromJson(json[r'sections']), + resources: ResourceDTO.listFromJson(json[r'resources']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -103,12 +107,10 @@ class ExportConfigurationDTOAllOf { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ExportConfigurationDTOAllOf.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ExportConfigurationDTOAllOf.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/geo_point_dto.dart b/manager_api/lib/model/geo_point_dto.dart index 28600c5..a9acae5 100644 --- a/manager_api/lib/model/geo_point_dto.dart +++ b/manager_api/lib/model/geo_point_dto.dart @@ -16,37 +16,67 @@ class GeoPointDTO { this.id, this.title = const [], this.description = const [], - this.images = const [], + this.contents = const [], + this.categorie, + this.categorieId, this.latitude, this.longitude, + this.imageResourceId, + this.imageUrl, + this.schedules = const [], + this.prices = const [], + this.phone = const [], + this.email = const [], + this.site = const [], }); - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// int? id; List? title; List? description; - List? images; + List? contents; + + GeoPointDTOCategorie? categorie; + + int? categorieId; String? latitude; String? longitude; + String? imageResourceId; + + String? imageUrl; + + List? schedules; + + List? prices; + + List? phone; + + List? email; + + List? site; + @override bool operator ==(Object other) => identical(this, other) || other is GeoPointDTO && other.id == id && other.title == title && other.description == description && - other.images == images && + other.contents == contents && + other.categorie == categorie && + other.categorieId == categorieId && other.latitude == latitude && - other.longitude == longitude; + other.longitude == longitude && + other.imageResourceId == imageResourceId && + other.imageUrl == imageUrl && + other.schedules == schedules && + other.prices == prices && + other.phone == phone && + other.email == email && + other.site == site; @override int get hashCode => @@ -54,34 +84,100 @@ class GeoPointDTO { (id == null ? 0 : id!.hashCode) + (title == null ? 0 : title!.hashCode) + (description == null ? 0 : description!.hashCode) + - (images == null ? 0 : images!.hashCode) + + (contents == null ? 0 : contents!.hashCode) + + (categorie == null ? 0 : categorie!.hashCode) + + (categorieId == null ? 0 : categorieId!.hashCode) + (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode); + (longitude == null ? 0 : longitude!.hashCode) + + (imageResourceId == null ? 0 : imageResourceId!.hashCode) + + (imageUrl == null ? 0 : imageUrl!.hashCode) + + (schedules == null ? 0 : schedules!.hashCode) + + (prices == null ? 0 : prices!.hashCode) + + (phone == null ? 0 : phone!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (site == null ? 0 : site!.hashCode); @override - String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, images=$images, latitude=$latitude, longitude=$longitude]'; + String toString() => 'GeoPointDTO[id=$id, title=$title, description=$description, contents=$contents, categorie=$categorie, categorieId=$categorieId, latitude=$latitude, longitude=$longitude, imageResourceId=$imageResourceId, imageUrl=$imageUrl, schedules=$schedules, prices=$prices, phone=$phone, email=$email, site=$site]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (title != null) { - _json[r'title'] = title; + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; } - if (description != null) { - _json[r'description'] = description; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; } - if (images != null) { - _json[r'images'] = images; + if (this.contents != null) { + json[r'contents'] = this.contents; + } else { + json[r'contents'] = null; } - if (latitude != null) { - _json[r'latitude'] = latitude; + if (this.categorie != null) { + json[r'categorie'] = this.categorie; + } else { + json[r'categorie'] = null; } - if (longitude != null) { - _json[r'longitude'] = longitude; + if (this.categorieId != null) { + json[r'categorieId'] = this.categorieId; + } else { + json[r'categorieId'] = null; } - return _json; + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + if (this.imageResourceId != null) { + json[r'imageResourceId'] = this.imageResourceId; + } else { + json[r'imageResourceId'] = null; + } + if (this.imageUrl != null) { + json[r'imageUrl'] = this.imageUrl; + } else { + json[r'imageUrl'] = null; + } + if (this.schedules != null) { + json[r'schedules'] = this.schedules; + } else { + json[r'schedules'] = null; + } + if (this.prices != null) { + json[r'prices'] = this.prices; + } else { + json[r'prices'] = null; + } + if (this.phone != null) { + json[r'phone'] = this.phone; + } else { + json[r'phone'] = null; + } + if (this.email != null) { + json[r'email'] = this.email; + } else { + json[r'email'] = null; + } + if (this.site != null) { + json[r'site'] = this.site; + } else { + json[r'site'] = null; + } + return json; } /// Returns a new [GeoPointDTO] instance and imports its values from @@ -104,17 +200,26 @@ class GeoPointDTO { return GeoPointDTO( id: mapValueOfType(json, r'id'), - title: TranslationDTO.listFromJson(json[r'title']) ?? const [], - description: TranslationDTO.listFromJson(json[r'description']) ?? const [], - images: ImageGeoPoint.listFromJson(json[r'images']) ?? const [], + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + contents: ContentGeoPoint.listFromJson(json[r'contents']), + categorie: GeoPointDTOCategorie.fromJson(json[r'categorie']), + categorieId: mapValueOfType(json, r'categorieId'), latitude: mapValueOfType(json, r'latitude'), longitude: mapValueOfType(json, r'longitude'), + imageResourceId: mapValueOfType(json, r'imageResourceId'), + imageUrl: mapValueOfType(json, r'imageUrl'), + schedules: TranslationDTO.listFromJson(json[r'schedules']), + prices: TranslationDTO.listFromJson(json[r'prices']), + phone: TranslationDTO.listFromJson(json[r'phone']), + email: TranslationDTO.listFromJson(json[r'email']), + site: TranslationDTO.listFromJson(json[r'site']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -145,12 +250,10 @@ class GeoPointDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = GeoPointDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = GeoPointDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/geo_point_dto_categorie.dart b/manager_api/lib/model/geo_point_dto_categorie.dart new file mode 100644 index 0000000..5c06018 --- /dev/null +++ b/manager_api/lib/model/geo_point_dto_categorie.dart @@ -0,0 +1,167 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 GeoPointDTOCategorie { + /// Returns a new [GeoPointDTOCategorie] instance. + GeoPointDTOCategorie({ + this.id, + this.label = const [], + this.icon, + this.iconResourceId, + this.iconUrl, + this.order, + }); + + int? id; + + List? label; + + String? icon; + + String? iconResourceId; + + String? iconUrl; + + int? order; + + @override + bool operator ==(Object other) => identical(this, other) || other is GeoPointDTOCategorie && + other.id == id && + other.label == label && + other.icon == icon && + other.iconResourceId == iconResourceId && + other.iconUrl == iconUrl && + other.order == order; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (label == null ? 0 : label!.hashCode) + + (icon == null ? 0 : icon!.hashCode) + + (iconResourceId == null ? 0 : iconResourceId!.hashCode) + + (iconUrl == null ? 0 : iconUrl!.hashCode) + + (order == null ? 0 : order!.hashCode); + + @override + String toString() => 'GeoPointDTOCategorie[id=$id, label=$label, icon=$icon, iconResourceId=$iconResourceId, iconUrl=$iconUrl, order=$order]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; + } + if (this.icon != null) { + json[r'icon'] = this.icon; + } else { + json[r'icon'] = null; + } + if (this.iconResourceId != null) { + json[r'iconResourceId'] = this.iconResourceId; + } else { + json[r'iconResourceId'] = null; + } + if (this.iconUrl != null) { + json[r'iconUrl'] = this.iconUrl; + } else { + json[r'iconUrl'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + return json; + } + + /// Returns a new [GeoPointDTOCategorie] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static GeoPointDTOCategorie? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "GeoPointDTOCategorie[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "GeoPointDTOCategorie[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return GeoPointDTOCategorie( + id: mapValueOfType(json, r'id'), + label: TranslationDTO.listFromJson(json[r'label']), + icon: mapValueOfType(json, r'icon'), + iconResourceId: mapValueOfType(json, r'iconResourceId'), + iconUrl: mapValueOfType(json, r'iconUrl'), + order: mapValueOfType(json, r'order'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = GeoPointDTOCategorie.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = GeoPointDTOCategorie.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of GeoPointDTOCategorie-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = GeoPointDTOCategorie.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/image_dto.dart b/manager_api/lib/model/image_dto.dart index b72c787..0a55eed 100644 --- a/manager_api/lib/model/image_dto.dart +++ b/manager_api/lib/model/image_dto.dart @@ -57,23 +57,33 @@ class ImageDTO { String toString() => 'ImageDTO[title=$title, description=$description, resourceId=$resourceId, source_=$source_, order=$order]'; Map toJson() { - final _json = {}; - if (title != null) { - _json[r'title'] = title; + final json = {}; + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; } - if (description != null) { - _json[r'description'] = description; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; } - if (resourceId != null) { - _json[r'resourceId'] = resourceId; + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; + } else { + json[r'resourceId'] = null; } - if (source_ != null) { - _json[r'source'] = source_; + if (this.source_ != null) { + json[r'source'] = this.source_; + } else { + json[r'source'] = null; } - if (order != null) { - _json[r'order'] = order; + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; } - return _json; + return json; } /// Returns a new [ImageDTO] instance and imports its values from @@ -95,8 +105,8 @@ class ImageDTO { }()); return ImageDTO( - title: TranslationDTO.listFromJson(json[r'title']) ?? const [], - description: TranslationDTO.listFromJson(json[r'description']) ?? const [], + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), resourceId: mapValueOfType(json, r'resourceId'), source_: mapValueOfType(json, r'source'), order: mapValueOfType(json, r'order'), @@ -105,7 +115,7 @@ class ImageDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -136,12 +146,10 @@ class ImageDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ImageDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ImageDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/image_geo_point.dart b/manager_api/lib/model/image_geo_point.dart index 8291c85..4ecb68c 100644 --- a/manager_api/lib/model/image_geo_point.dart +++ b/manager_api/lib/model/image_geo_point.dart @@ -36,14 +36,18 @@ class ImageGeoPoint { String toString() => 'ImageGeoPoint[imageResourceId=$imageResourceId, imageSource=$imageSource]'; Map toJson() { - final _json = {}; - if (imageResourceId != null) { - _json[r'imageResourceId'] = imageResourceId; + final json = {}; + if (this.imageResourceId != null) { + json[r'imageResourceId'] = this.imageResourceId; + } else { + json[r'imageResourceId'] = null; } - if (imageSource != null) { - _json[r'imageSource'] = imageSource; + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; } - return _json; + return json; } /// Returns a new [ImageGeoPoint] instance and imports its values from @@ -72,7 +76,7 @@ class ImageGeoPoint { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -103,12 +107,10 @@ class ImageGeoPoint { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ImageGeoPoint.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ImageGeoPoint.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/instance.dart b/manager_api/lib/model/instance.dart index 74e7ca8..62800f6 100644 --- a/manager_api/lib/model/instance.dart +++ b/manager_api/lib/model/instance.dart @@ -16,6 +16,7 @@ class Instance { this.id, this.name, this.dateCreation, + this.pinCode, }); String? id; @@ -30,34 +31,49 @@ class Instance { /// DateTime? dateCreation; + int? pinCode; + @override bool operator ==(Object other) => identical(this, other) || other is Instance && other.id == id && other.name == name && - other.dateCreation == dateCreation; + other.dateCreation == dateCreation && + other.pinCode == pinCode; @override int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + (name == null ? 0 : name!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode); + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation]'; + String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (name != null) { - _json[r'name'] = name; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; } - if (dateCreation != null) { - _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; } - return _json; + if (this.pinCode != null) { + json[r'pinCode'] = this.pinCode; + } else { + json[r'pinCode'] = null; + } + return json; } /// Returns a new [Instance] instance and imports its values from @@ -82,12 +98,13 @@ class Instance { id: mapValueOfType(json, r'id'), name: mapValueOfType(json, r'name'), dateCreation: mapDateTime(json, r'dateCreation', ''), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -118,12 +135,10 @@ class Instance { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = Instance.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = Instance.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/instance_dto.dart b/manager_api/lib/model/instance_dto.dart index a1d77a7..5f4399d 100644 --- a/manager_api/lib/model/instance_dto.dart +++ b/manager_api/lib/model/instance_dto.dart @@ -16,6 +16,7 @@ class InstanceDTO { this.id, this.name, this.dateCreation, + this.pinCode, }); String? id; @@ -30,34 +31,49 @@ class InstanceDTO { /// DateTime? dateCreation; + int? pinCode; + @override bool operator ==(Object other) => identical(this, other) || other is InstanceDTO && other.id == id && other.name == name && - other.dateCreation == dateCreation; + other.dateCreation == dateCreation && + other.pinCode == pinCode; @override int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + (name == null ? 0 : name!.hashCode) + - (dateCreation == null ? 0 : dateCreation!.hashCode); + (dateCreation == null ? 0 : dateCreation!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation]'; + String toString() => 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (name != null) { - _json[r'name'] = name; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; } - if (dateCreation != null) { - _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; } - return _json; + if (this.pinCode != null) { + json[r'pinCode'] = this.pinCode; + } else { + json[r'pinCode'] = null; + } + return json; } /// Returns a new [InstanceDTO] instance and imports its values from @@ -82,12 +98,13 @@ class InstanceDTO { id: mapValueOfType(json, r'id'), name: mapValueOfType(json, r'name'), dateCreation: mapDateTime(json, r'dateCreation', ''), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -118,12 +135,10 @@ class InstanceDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = InstanceDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = InstanceDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/level_dto.dart b/manager_api/lib/model/level_dto.dart index 58cfe04..79e8ea1 100644 --- a/manager_api/lib/model/level_dto.dart +++ b/manager_api/lib/model/level_dto.dart @@ -14,44 +14,30 @@ class LevelDTO { /// Returns a new [LevelDTO] instance. LevelDTO({ this.label = const [], - this.resourceId, - this.source_, }); - List? label; - - String? resourceId; - - String? source_; + List? label; @override bool operator ==(Object other) => identical(this, other) || other is LevelDTO && - other.label == label && - other.resourceId == resourceId && - other.source_ == source_; + other.label == label; @override int get hashCode => // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (source_ == null ? 0 : source_!.hashCode); + (label == null ? 0 : label!.hashCode); @override - String toString() => 'LevelDTO[label=$label, resourceId=$resourceId, source_=$source_]'; + String toString() => 'LevelDTO[label=$label]'; Map toJson() { - final _json = {}; - if (label != null) { - _json[r'label'] = label; + final json = {}; + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; } - if (resourceId != null) { - _json[r'resourceId'] = resourceId; - } - if (source_ != null) { - _json[r'source'] = source_; - } - return _json; + return json; } /// Returns a new [LevelDTO] instance and imports its values from @@ -73,15 +59,13 @@ class LevelDTO { }()); return LevelDTO( - label: TranslationDTO.listFromJson(json[r'label']) ?? const [], - resourceId: mapValueOfType(json, r'resourceId'), - source_: mapValueOfType(json, r'source'), + label: TranslationAndResourceDTO.listFromJson(json[r'label']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -112,12 +96,10 @@ class LevelDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = LevelDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = LevelDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/login_dto.dart b/manager_api/lib/model/login_dto.dart index e5543ec..a8e6b90 100644 --- a/manager_api/lib/model/login_dto.dart +++ b/manager_api/lib/model/login_dto.dart @@ -36,14 +36,18 @@ class LoginDTO { String toString() => 'LoginDTO[email=$email, password=$password]'; Map toJson() { - final _json = {}; - if (email != null) { - _json[r'email'] = email; + final json = {}; + if (this.email != null) { + json[r'email'] = this.email; + } else { + json[r'email'] = null; } - if (password != null) { - _json[r'password'] = password; + if (this.password != null) { + json[r'password'] = this.password; + } else { + json[r'password'] = null; } - return _json; + return json; } /// Returns a new [LoginDTO] instance and imports its values from @@ -72,7 +76,7 @@ class LoginDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -103,12 +107,10 @@ class LoginDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = LoginDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = LoginDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/map_dto.dart b/manager_api/lib/model/map_dto.dart index 8a283e6..0f97a93 100644 --- a/manager_api/lib/model/map_dto.dart +++ b/manager_api/lib/model/map_dto.dart @@ -15,9 +15,14 @@ class MapDTO { MapDTO({ this.zoom, this.mapType, + this.mapTypeMapbox, + this.mapProvider, this.points = const [], this.iconResourceId, this.iconSource, + this.categories = const [], + this.latitude, + this.longitude, }); /// @@ -28,58 +33,107 @@ class MapDTO { /// int? zoom; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// MapTypeApp? mapType; + MapTypeMapBox? mapTypeMapbox; + + MapProvider? mapProvider; + List? points; String? iconResourceId; String? iconSource; + List? categories; + + String? latitude; + + String? longitude; + @override bool operator ==(Object other) => identical(this, other) || other is MapDTO && - other.zoom == zoom && - other.mapType == mapType && - other.points == points && - other.iconResourceId == iconResourceId && - other.iconSource == iconSource; + other.zoom == zoom && + other.mapType == mapType && + other.mapTypeMapbox == mapTypeMapbox && + other.mapProvider == mapProvider && + other.points == points && + other.iconResourceId == iconResourceId && + other.iconSource == iconSource && + other.categories == categories && + other.latitude == latitude && + other.longitude == longitude; @override int get hashCode => - // ignore: unnecessary_parenthesis - (zoom == null ? 0 : zoom!.hashCode) + - (mapType == null ? 0 : mapType!.hashCode) + - (points == null ? 0 : points!.hashCode) + - (iconResourceId == null ? 0 : iconResourceId!.hashCode) + - (iconSource == null ? 0 : iconSource!.hashCode); + // ignore: unnecessary_parenthesis + (zoom == null ? 0 : zoom!.hashCode) + + (mapType == null ? 0 : mapType!.hashCode) + + (mapTypeMapbox == null ? 0 : mapTypeMapbox!.hashCode) + + (mapProvider == null ? 0 : mapProvider!.hashCode) + + (points == null ? 0 : points!.hashCode) + + (iconResourceId == null ? 0 : iconResourceId!.hashCode) + + (iconSource == null ? 0 : iconSource!.hashCode) + + (categories == null ? 0 : categories!.hashCode) + + (latitude == null ? 0 : latitude!.hashCode) + + (longitude == null ? 0 : longitude!.hashCode); @override - String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource]'; + String toString() => 'MapDTO[zoom=$zoom, mapType=$mapType, mapTypeMapbox=$mapTypeMapbox, mapProvider=$mapProvider, points=$points, iconResourceId=$iconResourceId, iconSource=$iconSource, categories=$categories, latitude=$latitude, longitude=$longitude]'; Map toJson() { - final _json = {}; - if (zoom != null) { - _json[r'zoom'] = zoom; + final json = {}; + if (this.zoom != null) { + json[r'zoom'] = this.zoom; + } else { + json[r'zoom'] = null; } - if (mapType != null) { - _json[r'mapType'] = mapType; + if (this.mapType != null) { + json[r'mapType'] = this.mapType; + } else { + json[r'mapType'] = null; } - if (points != null) { - _json[r'points'] = points; + if (this.mapTypeMapbox != null) { + json[r'mapTypeMapbox'] = this.mapTypeMapbox; + } else { + json[r'mapTypeMapbox'] = null; } - if (iconResourceId != null) { - _json[r'iconResourceId'] = iconResourceId; + if (this.mapProvider != null) { + json[r'mapProvider'] = this.mapProvider; + } else { + json[r'mapProvider'] = null; } - if (iconSource != null) { - _json[r'iconSource'] = iconSource; + if (this.points != null) { + json[r'points'] = this.points; + } else { + json[r'points'] = null; } - return _json; + if (this.iconResourceId != null) { + json[r'iconResourceId'] = this.iconResourceId; + } else { + json[r'iconResourceId'] = null; + } + if (this.iconSource != null) { + json[r'iconSource'] = this.iconSource; + } else { + json[r'iconSource'] = null; + } + if (this.categories != null) { + json[r'categories'] = this.categories; + } else { + json[r'categories'] = null; + } + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; + } + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; + } + return json; } /// Returns a new [MapDTO] instance and imports its values from @@ -103,15 +157,20 @@ class MapDTO { return MapDTO( zoom: mapValueOfType(json, r'zoom'), mapType: MapTypeApp.fromJson(json[r'mapType']), - points: GeoPointDTO.listFromJson(json[r'points']) ?? const [], + mapTypeMapbox: MapTypeMapBox.fromJson(json[r'mapTypeMapbox']), + mapProvider: MapProvider.fromJson(json[r'mapProvider']), + points: GeoPointDTO.listFromJson(json[r'points']), iconResourceId: mapValueOfType(json, r'iconResourceId'), iconSource: mapValueOfType(json, r'iconSource'), + categories: CategorieDTO.listFromJson(json[r'categories']), + latitude: mapValueOfType(json, r'latitude'), + longitude: mapValueOfType(json, r'longitude'), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -142,12 +201,10 @@ class MapDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = MapDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = MapDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/map_dto_map_provider.dart b/manager_api/lib/model/map_dto_map_provider.dart new file mode 100644 index 0000000..2ab6869 --- /dev/null +++ b/manager_api/lib/model/map_dto_map_provider.dart @@ -0,0 +1,96 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 MapDTOMapProvider { + /// Returns a new [MapDTOMapProvider] instance. + MapDTOMapProvider(); + + @override + bool operator ==(Object other) => identical(this, other) || other is MapDTOMapProvider; + + @override + String toString() => 'MapDTOMapProvider[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// Returns a new [MapDTOMapProvider] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MapDTOMapProvider? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "MapDTOMapProvider[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOMapProvider[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MapDTOMapProvider( + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapDTOMapProvider.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MapDTOMapProvider.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MapDTOMapProvider-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MapDTOMapProvider.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/map_dto_map_type.dart b/manager_api/lib/model/map_dto_map_type.dart new file mode 100644 index 0000000..8b78f37 --- /dev/null +++ b/manager_api/lib/model/map_dto_map_type.dart @@ -0,0 +1,96 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 MapDTOMapType { + /// Returns a new [MapDTOMapType] instance. + MapDTOMapType(); + + @override + bool operator ==(Object other) => identical(this, other) || other is MapDTOMapType; + + @override + String toString() => 'MapDTOMapType[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// Returns a new [MapDTOMapType] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MapDTOMapType? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "MapDTOMapType[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOMapType[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MapDTOMapType( + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapDTOMapType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MapDTOMapType.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MapDTOMapType-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MapDTOMapType.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/map_dto_map_type_mapbox.dart b/manager_api/lib/model/map_dto_map_type_mapbox.dart new file mode 100644 index 0000000..2c164f5 --- /dev/null +++ b/manager_api/lib/model/map_dto_map_type_mapbox.dart @@ -0,0 +1,96 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 MapDTOMapTypeMapbox { + /// Returns a new [MapDTOMapTypeMapbox] instance. + MapDTOMapTypeMapbox(); + + @override + bool operator ==(Object other) => identical(this, other) || other is MapDTOMapTypeMapbox; + + @override + String toString() => 'MapDTOMapTypeMapbox[]'; + + Map toJson() { + final json = {}; + return json; + } + + /// Returns a new [MapDTOMapTypeMapbox] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MapDTOMapTypeMapbox? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "MapDTOMapTypeMapbox[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapDTOMapTypeMapbox[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MapDTOMapTypeMapbox( + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapDTOMapTypeMapbox.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MapDTOMapTypeMapbox.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MapDTOMapTypeMapbox-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MapDTOMapTypeMapbox.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/map_provider.dart b/manager_api/lib/model/map_provider.dart new file mode 100644 index 0000000..c017c9b --- /dev/null +++ b/manager_api/lib/model/map_provider.dart @@ -0,0 +1,98 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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; + +/// 0 = Google 1 = MapBox +class MapProvider { + /// Instantiate a new enum with the provided [value]. + const MapProvider._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + int toJson() => value; + + static const Google = MapProvider._(0); + static const MapBox = MapProvider._(1); + + /// List of all possible values in this [enum][MapProvider]. + static const values = [ + Google, + MapBox, + ]; + + static MapProvider? fromJson(dynamic value) => MapProviderTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapProvider.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [MapProvider] to int, +/// and [decode] dynamic data back to [MapProvider]. +class MapProviderTypeTransformer { + factory MapProviderTypeTransformer() => _instance ??= const MapProviderTypeTransformer._(); + + const MapProviderTypeTransformer._(); + + int encode(MapProvider data) => data.value; + + /// Decodes a [dynamic value][data] to a MapProvider. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + MapProvider? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + if(data.runtimeType == String) { + switch (data.toString().toLowerCase()) { + case r'google': return MapProvider.Google; + case r'mapbox': return MapProvider.MapBox; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } else { + if(data.runtimeType == int) { + switch (data) { + case 0: return MapProvider.Google; + case 1: return MapProvider.MapBox; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + } + } + return null; + } + + /// Singleton [MapProviderTypeTransformer] instance. + static MapProviderTypeTransformer? _instance; +} + diff --git a/manager_api/lib/model/map_type_app.dart b/manager_api/lib/model/map_type_app.dart index deee49b..174ce99 100644 --- a/manager_api/lib/model/map_type_app.dart +++ b/manager_api/lib/model/map_type_app.dart @@ -40,7 +40,7 @@ class MapTypeApp { static MapTypeApp? fromJson(dynamic value) => MapTypeAppTypeTransformer().decode(value); - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -72,7 +72,7 @@ class MapTypeAppTypeTransformer { /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, /// and users are still using an old app with the old code. MapTypeApp? decode(dynamic data, {bool allowNull = true}) { - if (data != null) { + /*if (data != null) { switch (data.toString()) { case r'None': return MapTypeApp.none; case r'Normal': return MapTypeApp.normal; @@ -84,7 +84,7 @@ class MapTypeAppTypeTransformer { throw ArgumentError('Unknown enum value to decode: $data'); } } - } + }*/ if (data != null) { if(data.runtimeType == String) { switch (data.toString()) { @@ -113,7 +113,6 @@ class MapTypeAppTypeTransformer { } } } - } return null; } diff --git a/manager_api/lib/model/map_type_map_box.dart b/manager_api/lib/model/map_type_map_box.dart new file mode 100644 index 0000000..7aaad20 --- /dev/null +++ b/manager_api/lib/model/map_type_map_box.dart @@ -0,0 +1,119 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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; + +/// 0 = standard 1 = streets 2 = outdoors 3 = light 4 = dark 5 = satellite 6 = satellite_streets +class MapTypeMapBox { + /// Instantiate a new enum with the provided [value]. + const MapTypeMapBox._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + int toJson() => value; + + static const standard = MapTypeMapBox._(0); + static const streets = MapTypeMapBox._(1); + static const outdoors = MapTypeMapBox._(2); + static const light = MapTypeMapBox._(3); + static const dark = MapTypeMapBox._(4); + static const satellite = MapTypeMapBox._(5); + static const satellite_streets = MapTypeMapBox._(6); + + /// List of all possible values in this [enum][MapTypeMapBox]. + static const values = [ + standard, + streets, + outdoors, + light, + dark, + satellite, + satellite_streets, + ]; + + static MapTypeMapBox? fromJson(dynamic value) => MapTypeMapBoxTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapTypeMapBox.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [MapTypeMapBox] to int, +/// and [decode] dynamic data back to [MapTypeMapBox]. +class MapTypeMapBoxTypeTransformer { + factory MapTypeMapBoxTypeTransformer() => _instance ??= const MapTypeMapBoxTypeTransformer._(); + + const MapTypeMapBoxTypeTransformer._(); + + int encode(MapTypeMapBox data) => data.value; + + /// Decodes a [dynamic value][data] to a MapTypeMapBox. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + MapTypeMapBox? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + if(data.runtimeType == String) { + switch (data.toString().toLowerCase()) { + case r'standard': return MapTypeMapBox.standard; + case r'streets': return MapTypeMapBox.streets; + case r'outdoors': return MapTypeMapBox.outdoors; + case r'light': return MapTypeMapBox.light; + case r'dark': return MapTypeMapBox.dark; + case r'satellite': return MapTypeMapBox.satellite; + case r'satellite_streets': return MapTypeMapBox.satellite_streets; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } else { + if(data.runtimeType == int) { + switch (data) { + case 0: return MapTypeMapBox.standard; + case 1: return MapTypeMapBox.streets; + case 2: return MapTypeMapBox.outdoors; + case 3: return MapTypeMapBox.light; + case 4: return MapTypeMapBox.dark; + case 5: return MapTypeMapBox.satellite; + case 6: return MapTypeMapBox.satellite_streets; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + } + + } + return null; + } + + /// Singleton [MapTypeMapBoxTypeTransformer] instance. + static MapTypeMapBoxTypeTransformer? _instance; +} + diff --git a/manager_api/lib/model/menu_dto.dart b/manager_api/lib/model/menu_dto.dart index feb29a8..0f47549 100644 --- a/manager_api/lib/model/menu_dto.dart +++ b/manager_api/lib/model/menu_dto.dart @@ -31,11 +31,13 @@ class MenuDTO { String toString() => 'MenuDTO[sections=$sections]'; Map toJson() { - final _json = {}; - if (sections != null) { - _json[r'sections'] = sections; + final json = {}; + if (this.sections != null) { + json[r'sections'] = this.sections; + } else { + json[r'sections'] = null; } - return _json; + return json; } /// Returns a new [MenuDTO] instance and imports its values from @@ -57,13 +59,13 @@ class MenuDTO { }()); return MenuDTO( - sections: SectionDTO.listFromJson(json[r'sections']) ?? const [], + sections: SectionDTO.listFromJson(json[r'sections']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +96,10 @@ class MenuDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = MenuDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = MenuDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/pdf_dto.dart b/manager_api/lib/model/pdf_dto.dart new file mode 100644 index 0000000..53cb445 --- /dev/null +++ b/manager_api/lib/model/pdf_dto.dart @@ -0,0 +1,112 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 PdfDTO { + /// Returns a new [PdfDTO] instance. + PdfDTO({ + this.pdfs = const [], + }); + + List? pdfs; + + @override + bool operator ==(Object other) => identical(this, other) || other is PdfDTO && + other.pdfs == pdfs; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (pdfs == null ? 0 : pdfs!.hashCode); + + @override + String toString() => 'PdfDTO[pdfs=$pdfs]'; + + Map toJson() { + final json = {}; + if (this.pdfs != null) { + json[r'pdfs'] = this.pdfs; + } else { + json[r'pdfs'] = null; + } + return json; + } + + /// Returns a new [PdfDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PdfDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PdfDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PdfDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PdfDTO( + pdfs: PDFFileDTO.listFromJson(json[r'pdfs']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PdfDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PdfDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PdfDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PdfDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/pdf_file_dto.dart b/manager_api/lib/model/pdf_file_dto.dart new file mode 100644 index 0000000..fbe682e --- /dev/null +++ b/manager_api/lib/model/pdf_file_dto.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 PDFFileDTO { + /// Returns a new [PDFFileDTO] instance. + PDFFileDTO({ + this.pdfFilesAndTitles = const [], + this.order, + }); + + List? pdfFilesAndTitles; + + int? order; + + @override + bool operator ==(Object other) => identical(this, other) || other is PDFFileDTO && + other.pdfFilesAndTitles == pdfFilesAndTitles && + other.order == order; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (pdfFilesAndTitles == null ? 0 : pdfFilesAndTitles!.hashCode) + + (order == null ? 0 : order!.hashCode); + + @override + String toString() => 'PDFFileDTO[pdfFilesAndTitles=$pdfFilesAndTitles, order=$order]'; + + Map toJson() { + final json = {}; + if (this.pdfFilesAndTitles != null) { + json[r'pdfFilesAndTitles'] = this.pdfFilesAndTitles; + } else { + json[r'pdfFilesAndTitles'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + return json; + } + + /// Returns a new [PDFFileDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PDFFileDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PDFFileDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PDFFileDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PDFFileDTO( + pdfFilesAndTitles: TranslationAndResourceDTO.listFromJson(json[r'pdfFilesAndTitles']), + order: mapValueOfType(json, r'order'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PDFFileDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PDFFileDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PDFFileDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PDFFileDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/player_message_dto.dart b/manager_api/lib/model/player_message_dto.dart index c51ce09..9e67106 100644 --- a/manager_api/lib/model/player_message_dto.dart +++ b/manager_api/lib/model/player_message_dto.dart @@ -48,14 +48,18 @@ class PlayerMessageDTO { String toString() => 'PlayerMessageDTO[configChanged=$configChanged, isDeleted=$isDeleted]'; Map toJson() { - final _json = {}; - if (configChanged != null) { - _json[r'configChanged'] = configChanged; + final json = {}; + if (this.configChanged != null) { + json[r'configChanged'] = this.configChanged; + } else { + json[r'configChanged'] = null; } - if (isDeleted != null) { - _json[r'isDeleted'] = isDeleted; + if (this.isDeleted != null) { + json[r'isDeleted'] = this.isDeleted; + } else { + json[r'isDeleted'] = null; } - return _json; + return json; } /// Returns a new [PlayerMessageDTO] instance and imports its values from @@ -84,7 +88,7 @@ class PlayerMessageDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -115,12 +119,10 @@ class PlayerMessageDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = PlayerMessageDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = PlayerMessageDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/puzzle_dto.dart b/manager_api/lib/model/puzzle_dto.dart new file mode 100644 index 0000000..14654e5 --- /dev/null +++ b/manager_api/lib/model/puzzle_dto.dart @@ -0,0 +1,168 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 PuzzleDTO { + /// Returns a new [PuzzleDTO] instance. + PuzzleDTO({ + this.messageDebut = const [], + this.messageFin = const [], + this.image, + this.rows, + this.cols, + }); + + List? messageDebut; + + List? messageFin; + + PuzzleDTOImage? image; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? rows; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? cols; + + @override + bool operator ==(Object other) => identical(this, other) || other is PuzzleDTO && + other.messageDebut == messageDebut && + other.messageFin == messageFin && + other.image == image && + other.rows == rows && + other.cols == cols; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (messageDebut == null ? 0 : messageDebut!.hashCode) + + (messageFin == null ? 0 : messageFin!.hashCode) + + (image == null ? 0 : image!.hashCode) + + (rows == null ? 0 : rows!.hashCode) + + (cols == null ? 0 : cols!.hashCode); + + @override + String toString() => 'PuzzleDTO[messageDebut=$messageDebut, messageFin=$messageFin, image=$image, rows=$rows, cols=$cols]'; + + Map toJson() { + final json = {}; + if (this.messageDebut != null) { + json[r'messageDebut'] = this.messageDebut; + } else { + json[r'messageDebut'] = null; + } + if (this.messageFin != null) { + json[r'messageFin'] = this.messageFin; + } else { + json[r'messageFin'] = null; + } + if (this.image != null) { + json[r'image'] = this.image; + } else { + json[r'image'] = null; + } + if (this.rows != null) { + json[r'rows'] = this.rows; + } else { + json[r'rows'] = null; + } + if (this.cols != null) { + json[r'cols'] = this.cols; + } else { + json[r'cols'] = null; + } + return json; + } + + /// Returns a new [PuzzleDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PuzzleDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PuzzleDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PuzzleDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PuzzleDTO( + messageDebut: TranslationAndResourceDTO.listFromJson(json[r'messageDebut']), + messageFin: TranslationAndResourceDTO.listFromJson(json[r'messageFin']), + image: PuzzleDTOImage.fromJson(json[r'image']), + rows: mapValueOfType(json, r'rows'), + cols: mapValueOfType(json, r'cols'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PuzzleDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PuzzleDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PuzzleDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PuzzleDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/puzzle_dto_image.dart b/manager_api/lib/model/puzzle_dto_image.dart new file mode 100644 index 0000000..1cd92ce --- /dev/null +++ b/manager_api/lib/model/puzzle_dto_image.dart @@ -0,0 +1,179 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 PuzzleDTOImage { + /// Returns a new [PuzzleDTOImage] instance. + PuzzleDTOImage({ + this.title = const [], + this.description = const [], + this.resourceId, + this.resourceUrl, + this.order, + this.resourceType, + }); + + List? title; + + List? description; + + String? resourceId; + + String? resourceUrl; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? order; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ResourceType? resourceType; + + @override + bool operator ==(Object other) => identical(this, other) || other is PuzzleDTOImage && + other.title == title && + other.description == description && + other.resourceId == resourceId && + other.resourceUrl == resourceUrl && + other.order == order && + other.resourceType == resourceType; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (title == null ? 0 : title!.hashCode) + + (description == null ? 0 : description!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode) + + (order == null ? 0 : order!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode); + + @override + String toString() => 'PuzzleDTOImage[title=$title, description=$description, resourceId=$resourceId, resourceUrl=$resourceUrl, order=$order, resourceType=$resourceType]'; + + Map toJson() { + final json = {}; + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; + } + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; + } + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; + } else { + json[r'resourceId'] = null; + } + if (this.resourceUrl != null) { + json[r'resourceUrl'] = this.resourceUrl; + } else { + json[r'resourceUrl'] = null; + } + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + if (this.resourceType != null) { + json[r'resourceType'] = this.resourceType; + } else { + json[r'resourceType'] = null; + } + return json; + } + + /// Returns a new [PuzzleDTOImage] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static PuzzleDTOImage? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "PuzzleDTOImage[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "PuzzleDTOImage[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return PuzzleDTOImage( + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), + resourceId: mapValueOfType(json, r'resourceId'), + resourceUrl: mapValueOfType(json, r'resourceUrl'), + order: mapValueOfType(json, r'order'), + resourceType: ResourceType.fromJson(json[r'resourceType']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PuzzleDTOImage.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = PuzzleDTOImage.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of PuzzleDTOImage-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = PuzzleDTOImage.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/question_dto.dart b/manager_api/lib/model/question_dto.dart index 0e7f86b..4eb1254 100644 --- a/manager_api/lib/model/question_dto.dart +++ b/manager_api/lib/model/question_dto.dart @@ -15,18 +15,27 @@ class QuestionDTO { QuestionDTO({ this.label = const [], this.responses = const [], - this.resourceId, - this.source_, + this.imageBackgroundResourceId, + this.imageBackgroundResourceType, + this.imageBackgroundResourceUrl, this.order, }); - List? label; + List? label; List? responses; - String? resourceId; + String? imageBackgroundResourceId; - String? source_; + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ResourceType? imageBackgroundResourceType; + + String? imageBackgroundResourceUrl; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -40,8 +49,9 @@ class QuestionDTO { bool operator ==(Object other) => identical(this, other) || other is QuestionDTO && other.label == label && other.responses == responses && - other.resourceId == resourceId && - other.source_ == source_ && + other.imageBackgroundResourceId == imageBackgroundResourceId && + other.imageBackgroundResourceType == imageBackgroundResourceType && + other.imageBackgroundResourceUrl == imageBackgroundResourceUrl && other.order == order; @override @@ -49,31 +59,47 @@ class QuestionDTO { // ignore: unnecessary_parenthesis (label == null ? 0 : label!.hashCode) + (responses == null ? 0 : responses!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (source_ == null ? 0 : source_!.hashCode) + + (imageBackgroundResourceId == null ? 0 : imageBackgroundResourceId!.hashCode) + + (imageBackgroundResourceType == null ? 0 : imageBackgroundResourceType!.hashCode) + + (imageBackgroundResourceUrl == null ? 0 : imageBackgroundResourceUrl!.hashCode) + (order == null ? 0 : order!.hashCode); @override - String toString() => 'QuestionDTO[label=$label, responses=$responses, resourceId=$resourceId, source_=$source_, order=$order]'; + String toString() => 'QuestionDTO[label=$label, responses=$responses, imageBackgroundResourceId=$imageBackgroundResourceId, imageBackgroundResourceType=$imageBackgroundResourceType, imageBackgroundResourceUrl=$imageBackgroundResourceUrl, order=$order]'; Map toJson() { - final _json = {}; - if (label != null) { - _json[r'label'] = label; + final json = {}; + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; } - if (responses != null) { - _json[r'responses'] = responses; + if (this.responses != null) { + json[r'responses'] = this.responses; + } else { + json[r'responses'] = null; } - if (resourceId != null) { - _json[r'resourceId'] = resourceId; + if (this.imageBackgroundResourceId != null) { + json[r'imageBackgroundResourceId'] = this.imageBackgroundResourceId; + } else { + json[r'imageBackgroundResourceId'] = null; } - if (source_ != null) { - _json[r'source'] = source_; + if (this.imageBackgroundResourceType != null) { + json[r'imageBackgroundResourceType'] = this.imageBackgroundResourceType; + } else { + json[r'imageBackgroundResourceType'] = null; } - if (order != null) { - _json[r'order'] = order; + if (this.imageBackgroundResourceUrl != null) { + json[r'imageBackgroundResourceUrl'] = this.imageBackgroundResourceUrl; + } else { + json[r'imageBackgroundResourceUrl'] = null; } - return _json; + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; + } + return json; } /// Returns a new [QuestionDTO] instance and imports its values from @@ -95,17 +121,18 @@ class QuestionDTO { }()); return QuestionDTO( - label: TranslationDTO.listFromJson(json[r'label']) ?? const [], - responses: ResponseDTO.listFromJson(json[r'responses']) ?? const [], - resourceId: mapValueOfType(json, r'resourceId'), - source_: mapValueOfType(json, r'source'), + label: TranslationAndResourceDTO.listFromJson(json[r'label']), + responses: ResponseDTO.listFromJson(json[r'responses']), + imageBackgroundResourceId: mapValueOfType(json, r'imageBackgroundResourceId'), + imageBackgroundResourceType: ResourceType.fromJson(json[r'imageBackgroundResourceType']), + imageBackgroundResourceUrl: mapValueOfType(json, r'imageBackgroundResourceUrl'), order: mapValueOfType(json, r'order'), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -136,12 +163,10 @@ class QuestionDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = QuestionDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = QuestionDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/quizz_dto.dart b/manager_api/lib/model/quizz_dto.dart index d4cfd58..0a3b921 100644 --- a/manager_api/lib/model/quizz_dto.dart +++ b/manager_api/lib/model/quizz_dto.dart @@ -22,13 +22,13 @@ class QuizzDTO { List? questions; - QuizzDTOBadLevel? badLevel; + LevelDTO? badLevel; - QuizzDTOBadLevel? mediumLevel; + LevelDTO? mediumLevel; - QuizzDTOBadLevel? goodLevel; + LevelDTO? goodLevel; - QuizzDTOBadLevel? greatLevel; + LevelDTO? greatLevel; @override bool operator ==(Object other) => identical(this, other) || other is QuizzDTO && @@ -51,23 +51,33 @@ class QuizzDTO { String toString() => 'QuizzDTO[questions=$questions, badLevel=$badLevel, mediumLevel=$mediumLevel, goodLevel=$goodLevel, greatLevel=$greatLevel]'; Map toJson() { - final _json = {}; - if (questions != null) { - _json[r'questions'] = questions; + final json = {}; + if (this.questions != null) { + json[r'questions'] = this.questions; + } else { + json[r'questions'] = null; } - if (badLevel != null) { - _json[r'bad_level'] = badLevel; + if (this.badLevel != null) { + json[r'bad_level'] = this.badLevel; + } else { + json[r'bad_level'] = null; } - if (mediumLevel != null) { - _json[r'medium_level'] = mediumLevel; + if (this.mediumLevel != null) { + json[r'medium_level'] = this.mediumLevel; + } else { + json[r'medium_level'] = null; } - if (goodLevel != null) { - _json[r'good_level'] = goodLevel; + if (this.goodLevel != null) { + json[r'good_level'] = this.goodLevel; + } else { + json[r'good_level'] = null; } - if (greatLevel != null) { - _json[r'great_level'] = greatLevel; + if (this.greatLevel != null) { + json[r'great_level'] = this.greatLevel; + } else { + json[r'great_level'] = null; } - return _json; + return json; } /// Returns a new [QuizzDTO] instance and imports its values from @@ -89,17 +99,17 @@ class QuizzDTO { }()); return QuizzDTO( - questions: QuestionDTO.listFromJson(json[r'questions']) ?? const [], - badLevel: QuizzDTOBadLevel.fromJson(json[r'bad_level']), - mediumLevel: QuizzDTOBadLevel.fromJson(json[r'medium_level']), - goodLevel: QuizzDTOBadLevel.fromJson(json[r'good_level']), - greatLevel: QuizzDTOBadLevel.fromJson(json[r'great_level']), + questions: QuestionDTO.listFromJson(json[r'questions']), + badLevel: LevelDTO.fromJson(json[r'bad_level']), + mediumLevel: LevelDTO.fromJson(json[r'medium_level']), + goodLevel: LevelDTO.fromJson(json[r'good_level']), + greatLevel: LevelDTO.fromJson(json[r'great_level']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -130,12 +140,10 @@ class QuizzDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = QuizzDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = QuizzDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/quizz_dto_bad_level.dart b/manager_api/lib/model/quizz_dto_bad_level.dart index f18f478..3e2fee2 100644 --- a/manager_api/lib/model/quizz_dto_bad_level.dart +++ b/manager_api/lib/model/quizz_dto_bad_level.dart @@ -14,44 +14,30 @@ class QuizzDTOBadLevel { /// Returns a new [QuizzDTOBadLevel] instance. QuizzDTOBadLevel({ this.label = const [], - this.resourceId, - this.source_, }); - List? label; - - String? resourceId; - - String? source_; + List? label; @override bool operator ==(Object other) => identical(this, other) || other is QuizzDTOBadLevel && - other.label == label && - other.resourceId == resourceId && - other.source_ == source_; + other.label == label; @override int get hashCode => // ignore: unnecessary_parenthesis - (label == null ? 0 : label!.hashCode) + - (resourceId == null ? 0 : resourceId!.hashCode) + - (source_ == null ? 0 : source_!.hashCode); + (label == null ? 0 : label!.hashCode); @override - String toString() => 'QuizzDTOBadLevel[label=$label, resourceId=$resourceId, source_=$source_]'; + String toString() => 'QuizzDTOBadLevel[label=$label]'; Map toJson() { - final _json = {}; - if (label != null) { - _json[r'label'] = label; + final json = {}; + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; } - if (resourceId != null) { - _json[r'resourceId'] = resourceId; - } - if (source_ != null) { - _json[r'source'] = source_; - } - return _json; + return json; } /// Returns a new [QuizzDTOBadLevel] instance and imports its values from @@ -73,15 +59,13 @@ class QuizzDTOBadLevel { }()); return QuizzDTOBadLevel( - label: TranslationDTO.listFromJson(json[r'label']) ?? const [], - resourceId: mapValueOfType(json, r'resourceId'), - source_: mapValueOfType(json, r'source'), + label: TranslationAndResourceDTO.listFromJson(json[r'label']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -112,12 +96,10 @@ class QuizzDTOBadLevel { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = QuizzDTOBadLevel.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = QuizzDTOBadLevel.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/resource_dto.dart b/manager_api/lib/model/resource_dto.dart index 72a3f52..028b523 100644 --- a/manager_api/lib/model/resource_dto.dart +++ b/manager_api/lib/model/resource_dto.dart @@ -16,7 +16,7 @@ class ResourceDTO { this.id, this.type, this.label, - this.data, + this.url, this.dateCreation, this.instanceId, }); @@ -33,7 +33,7 @@ class ResourceDTO { String? label; - String? data; + String? url; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -50,7 +50,7 @@ class ResourceDTO { other.id == id && other.type == type && other.label == label && - other.data == data && + other.url == url && other.dateCreation == dateCreation && other.instanceId == instanceId; @@ -60,34 +60,46 @@ class ResourceDTO { (id == null ? 0 : id!.hashCode) + (type == null ? 0 : type!.hashCode) + (label == null ? 0 : label!.hashCode) + - (data == null ? 0 : data!.hashCode) + + (url == null ? 0 : url!.hashCode) + (dateCreation == null ? 0 : dateCreation!.hashCode) + (instanceId == null ? 0 : instanceId!.hashCode); @override - String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, data=$data, dateCreation=$dateCreation, instanceId=$instanceId]'; + String toString() => 'ResourceDTO[id=$id, type=$type, label=$label, url=$url, dateCreation=$dateCreation, instanceId=$instanceId]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (type != null) { - _json[r'type'] = type; + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; } - if (label != null) { - _json[r'label'] = label; + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; } - if (data != null) { - _json[r'data'] = data; + if (this.url != null) { + json[r'url'] = this.url; + } else { + json[r'url'] = null; } - if (dateCreation != null) { - _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; } - if (instanceId != null) { - _json[r'instanceId'] = instanceId; + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; } - return _json; + return json; } /// Returns a new [ResourceDTO] instance and imports its values from @@ -112,7 +124,7 @@ class ResourceDTO { id: mapValueOfType(json, r'id'), type: ResourceType.fromJson(json[r'type']), label: mapValueOfType(json, r'label'), - data: mapValueOfType(json, r'data'), + url: mapValueOfType(json, r'url'), dateCreation: mapDateTime(json, r'dateCreation', ''), instanceId: mapValueOfType(json, r'instanceId'), ); @@ -120,7 +132,7 @@ class ResourceDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -151,12 +163,10 @@ class ResourceDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ResourceDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ResourceDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/resource_type.dart b/manager_api/lib/model/resource_type.dart index f9022f2..cfde41e 100644 --- a/manager_api/lib/model/resource_type.dart +++ b/manager_api/lib/model/resource_type.dart @@ -10,7 +10,7 @@ part of openapi.api; -/// 0 = Image 1 = Video 2 = ImageUrl 3 = VideoUrl 4 = Audio +/// 0 = Image 1 = Video 2 = ImageUrl 3 = VideoUrl 4 = Audio 5 = PDF 6 = JSON 7 = JSONUrl class ResourceType { /// Instantiate a new enum with the provided [value]. const ResourceType._(this.value); @@ -28,6 +28,9 @@ class ResourceType { static const ImageUrl = ResourceType._(2); static const VideoUrl = ResourceType._(3); static const Audio = ResourceType._(4); + static const Pdf = ResourceType._(5); + static const Json = ResourceType._(6); + static const JsonUrl = ResourceType._(7); /// List of all possible values in this [enum][ResourceType]. static const values = [ @@ -35,7 +38,10 @@ class ResourceType { Video, ImageUrl, VideoUrl, - Audio + Audio, + Pdf, + Json, + JsonUrl ]; static ResourceType? fromJson(dynamic value) => ResourceTypeTypeTransformer().decode(value); @@ -75,11 +81,14 @@ class ResourceTypeTypeTransformer { if (data != null) { if(data.runtimeType == String) { switch (data.toString()) { - case r'Image': return ResourceType.Image; - case r'Video': return ResourceType.Video; - case r'ImageUrl': return ResourceType.ImageUrl; - case r'VideoUrl': return ResourceType.VideoUrl; - case r'Audio': return ResourceType.Audio; + case "Image": return ResourceType.Image; + case "Video": return ResourceType.Video; + case "ImageUrl": return ResourceType.ImageUrl; + case "VideoUrl": return ResourceType.VideoUrl; + case "Audio": return ResourceType.Audio; + case "PDF": return ResourceType.Pdf; + case "JSON": return ResourceType.Json; + case "JSONUrl": return ResourceType.JsonUrl; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); @@ -93,6 +102,9 @@ class ResourceTypeTypeTransformer { case 2: return ResourceType.ImageUrl; case 3: return ResourceType.VideoUrl; case 4: return ResourceType.Audio; + case 5: return ResourceType.Pdf; + case 6: return ResourceType.Json; + case 7: return ResourceType.JsonUrl; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/manager_api/lib/model/response_dto.dart b/manager_api/lib/model/response_dto.dart index 266f6a9..6963754 100644 --- a/manager_api/lib/model/response_dto.dart +++ b/manager_api/lib/model/response_dto.dart @@ -18,7 +18,7 @@ class ResponseDTO { this.order, }); - List? label; + List? label; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -53,17 +53,23 @@ class ResponseDTO { String toString() => 'ResponseDTO[label=$label, isGood=$isGood, order=$order]'; Map toJson() { - final _json = {}; - if (label != null) { - _json[r'label'] = label; + final json = {}; + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; } - if (isGood != null) { - _json[r'isGood'] = isGood; + if (this.isGood != null) { + json[r'isGood'] = this.isGood; + } else { + json[r'isGood'] = null; } - if (order != null) { - _json[r'order'] = order; + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; } - return _json; + return json; } /// Returns a new [ResponseDTO] instance and imports its values from @@ -85,7 +91,7 @@ class ResponseDTO { }()); return ResponseDTO( - label: TranslationDTO.listFromJson(json[r'label']) ?? const [], + label: TranslationAndResourceDTO.listFromJson(json[r'label']), isGood: mapValueOfType(json, r'isGood'), order: mapValueOfType(json, r'order'), ); @@ -93,7 +99,7 @@ class ResponseDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -124,12 +130,10 @@ class ResponseDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ResponseDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ResponseDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/section_dto.dart b/manager_api/lib/model/section_dto.dart index a25824e..b3c097e 100644 --- a/manager_api/lib/model/section_dto.dart +++ b/manager_api/lib/model/section_dto.dart @@ -76,12 +76,6 @@ class SectionDTO { /// DateTime? dateCreation; - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// int? order; String? instanceId; @@ -151,65 +145,103 @@ class SectionDTO { String toString() => 'SectionDTO[id=$id, label=$label, title=$title, description=$description, imageId=$imageId, imageSource=$imageSource, configurationId=$configurationId, isSubSection=$isSubSection, parentId=$parentId, type=$type, data=$data, dateCreation=$dateCreation, order=$order, instanceId=$instanceId, latitude=$latitude, longitude=$longitude, meterZoneGPS=$meterZoneGPS, isBeacon=$isBeacon, beaconId=$beaconId]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (label != null) { - _json[r'label'] = label; + if (this.label != null) { + json[r'label'] = this.label; + } else { + json[r'label'] = null; } - if (title != null) { - _json[r'title'] = title; + if (this.title != null) { + json[r'title'] = this.title; + } else { + json[r'title'] = null; } - if (description != null) { - _json[r'description'] = description; + if (this.description != null) { + json[r'description'] = this.description; + } else { + json[r'description'] = null; } - if (imageId != null) { - _json[r'imageId'] = imageId; + if (this.imageId != null) { + json[r'imageId'] = this.imageId; + } else { + json[r'imageId'] = null; } - if (imageSource != null) { - _json[r'imageSource'] = imageSource; + if (this.imageSource != null) { + json[r'imageSource'] = this.imageSource; + } else { + json[r'imageSource'] = null; } - if (configurationId != null) { - _json[r'configurationId'] = configurationId; + if (this.configurationId != null) { + json[r'configurationId'] = this.configurationId; + } else { + json[r'configurationId'] = null; } - if (isSubSection != null) { - _json[r'isSubSection'] = isSubSection; + if (this.isSubSection != null) { + json[r'isSubSection'] = this.isSubSection; + } else { + json[r'isSubSection'] = null; } - if (parentId != null) { - _json[r'parentId'] = parentId; + if (this.parentId != null) { + json[r'parentId'] = this.parentId; + } else { + json[r'parentId'] = null; } - if (type != null) { - _json[r'type'] = type; + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; } - if (data != null) { - _json[r'data'] = data; + if (this.data != null) { + json[r'data'] = this.data; + } else { + json[r'data'] = null; } - if (dateCreation != null) { - _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; } - if (order != null) { - _json[r'order'] = order; + if (this.order != null) { + json[r'order'] = this.order; + } else { + json[r'order'] = null; } - if (instanceId != null) { - _json[r'instanceId'] = instanceId; + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; } - if (latitude != null) { - _json[r'latitude'] = latitude; + if (this.latitude != null) { + json[r'latitude'] = this.latitude; + } else { + json[r'latitude'] = null; } - if (longitude != null) { - _json[r'longitude'] = longitude; + if (this.longitude != null) { + json[r'longitude'] = this.longitude; + } else { + json[r'longitude'] = null; } - if (meterZoneGPS != null) { - _json[r'meterZoneGPS'] = meterZoneGPS; + if (this.meterZoneGPS != null) { + json[r'meterZoneGPS'] = this.meterZoneGPS; + } else { + json[r'meterZoneGPS'] = null; } - if (isBeacon != null) { - _json[r'isBeacon'] = isBeacon; + if (this.isBeacon != null) { + json[r'isBeacon'] = this.isBeacon; + } else { + json[r'isBeacon'] = null; } - if (beaconId != null) { - _json[r'beaconId'] = beaconId; + if (this.beaconId != null) { + json[r'beaconId'] = this.beaconId; + } else { + json[r'beaconId'] = null; } - return _json; + return json; } /// Returns a new [SectionDTO] instance and imports its values from @@ -233,8 +265,8 @@ class SectionDTO { return SectionDTO( id: mapValueOfType(json, r'id'), label: mapValueOfType(json, r'label'), - title: TranslationDTO.listFromJson(json[r'title']) ?? const [], - description: TranslationDTO.listFromJson(json[r'description']) ?? const [], + title: TranslationDTO.listFromJson(json[r'title']), + description: TranslationDTO.listFromJson(json[r'description']), imageId: mapValueOfType(json, r'imageId'), imageSource: mapValueOfType(json, r'imageSource'), configurationId: mapValueOfType(json, r'configurationId'), @@ -255,7 +287,7 @@ class SectionDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -286,12 +318,10 @@ class SectionDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SectionDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SectionDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/section_type.dart b/manager_api/lib/model/section_type.dart index 56bf3f0..5a9cebe 100644 --- a/manager_api/lib/model/section_type.dart +++ b/manager_api/lib/model/section_type.dart @@ -10,7 +10,7 @@ part of openapi.api; -/// 0 = Map 1 = Slider 2 = Video 3 = Web 4 = Menu 5 = Quizz 6 = Article +/// 0 = Map 1 = Slider 2 = Video 3 = Web 4 = Menu 5 = Quizz 6 = Article 7 = PDF 8 = Puzzle 9 = Agenda 10 = Weather class SectionType { /// Instantiate a new enum with the provided [value]. const SectionType._(this.value); @@ -30,6 +30,10 @@ class SectionType { static const Menu = SectionType._(4); static const Quizz = SectionType._(5); static const Article = SectionType._(6); + static const Pdf = SectionType._(7); + static const Puzzle = SectionType._(8); + static const Agenda = SectionType._(9); + static const Weather = SectionType._(10); /// List of all possible values in this [enum][SectionType]. static const values = [ @@ -39,12 +43,16 @@ class SectionType { Web, Menu, Quizz, - Article + Article, + Pdf, + Puzzle, + Agenda, + Weather ]; static SectionType? fromJson(dynamic value) => SectionTypeTypeTransformer().decode(value); - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -77,9 +85,6 @@ class SectionTypeTypeTransformer { /// and users are still using an old app with the old code. SectionType? decode(dynamic data, {bool allowNull = true}) { if (data != null) { - /*print("data.toString()"); - print(data.toString()); - print(data.runtimeType);*/ if(data.runtimeType == String) { switch (data.toString()) { case r'Map': return SectionType.Map; @@ -89,6 +94,10 @@ class SectionTypeTypeTransformer { case r'Menu': return SectionType.Menu; case r'Quizz': return SectionType.Quizz; case r'Article': return SectionType.Article; + case r'PDF': return SectionType.Pdf; + case r'Puzzle': return SectionType.Puzzle; + case r'Agenda': return SectionType.Agenda; + case r'Weather': return SectionType.Weather; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); @@ -96,17 +105,18 @@ class SectionTypeTypeTransformer { } } else { if(data.runtimeType == int) { - //print("HELLOWWWWW INT"); switch (data) { - case 0: - print("RETURN MAP"); - return SectionType.Map; + case 0: return SectionType.Map; case 1: return SectionType.Slider; case 2: return SectionType.Video; case 3: return SectionType.Web; case 4: return SectionType.Menu; case 5: return SectionType.Quizz; case 6: return SectionType.Article; + case 7: return SectionType.Pdf; + case 8: return SectionType.Puzzle; + case 9: return SectionType.Agenda; + case 10: return SectionType.Weather; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/manager_api/lib/model/slider_dto.dart b/manager_api/lib/model/slider_dto.dart index f6ab5ec..837fb7a 100644 --- a/manager_api/lib/model/slider_dto.dart +++ b/manager_api/lib/model/slider_dto.dart @@ -13,29 +13,31 @@ part of openapi.api; class SliderDTO { /// Returns a new [SliderDTO] instance. SliderDTO({ - this.images = const [], + this.contents = const [], }); - List? images; + List? contents; @override bool operator ==(Object other) => identical(this, other) || other is SliderDTO && - other.images == images; + other.contents == contents; @override int get hashCode => // ignore: unnecessary_parenthesis - (images == null ? 0 : images!.hashCode); + (contents == null ? 0 : contents!.hashCode); @override - String toString() => 'SliderDTO[images=$images]'; + String toString() => 'SliderDTO[contents=$contents]'; Map toJson() { - final _json = {}; - if (images != null) { - _json[r'images'] = images; + final json = {}; + if (this.contents != null) { + json[r'contents'] = this.contents; + } else { + json[r'contents'] = null; } - return _json; + return json; } /// Returns a new [SliderDTO] instance and imports its values from @@ -57,13 +59,13 @@ class SliderDTO { }()); return SliderDTO( - images: ImageDTO.listFromJson(json[r'images']) ?? const [], + contents: ContentDTO.listFromJson(json[r'contents']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +96,10 @@ class SliderDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SliderDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SliderDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/token_dto.dart b/manager_api/lib/model/token_dto.dart index 5f89ba2..1c9ceb5 100644 --- a/manager_api/lib/model/token_dto.dart +++ b/manager_api/lib/model/token_dto.dart @@ -20,6 +20,7 @@ class TokenDTO { this.expiresIn, this.expiration, this.instanceId, + this.pinCode, }); String? accessToken; @@ -48,6 +49,8 @@ class TokenDTO { String? instanceId; + int? pinCode; + @override bool operator ==(Object other) => identical(this, other) || other is TokenDTO && other.accessToken == accessToken && @@ -56,7 +59,8 @@ class TokenDTO { other.tokenType == tokenType && other.expiresIn == expiresIn && other.expiration == expiration && - other.instanceId == instanceId; + other.instanceId == instanceId && + other.pinCode == pinCode; @override int get hashCode => @@ -67,35 +71,55 @@ class TokenDTO { (tokenType == null ? 0 : tokenType!.hashCode) + (expiresIn == null ? 0 : expiresIn!.hashCode) + (expiration == null ? 0 : expiration!.hashCode) + - (instanceId == null ? 0 : instanceId!.hashCode); + (instanceId == null ? 0 : instanceId!.hashCode) + + (pinCode == null ? 0 : pinCode!.hashCode); @override - String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId]'; + String toString() => 'TokenDTO[accessToken=$accessToken, refreshToken=$refreshToken, scope=$scope, tokenType=$tokenType, expiresIn=$expiresIn, expiration=$expiration, instanceId=$instanceId, pinCode=$pinCode]'; Map toJson() { - final _json = {}; - if (accessToken != null) { - _json[r'access_token'] = accessToken; + final json = {}; + if (this.accessToken != null) { + json[r'access_token'] = this.accessToken; + } else { + json[r'access_token'] = null; } - if (refreshToken != null) { - _json[r'refresh_token'] = refreshToken; + if (this.refreshToken != null) { + json[r'refresh_token'] = this.refreshToken; + } else { + json[r'refresh_token'] = null; } - if (scope != null) { - _json[r'scope'] = scope; + if (this.scope != null) { + json[r'scope'] = this.scope; + } else { + json[r'scope'] = null; } - if (tokenType != null) { - _json[r'token_type'] = tokenType; + if (this.tokenType != null) { + json[r'token_type'] = this.tokenType; + } else { + json[r'token_type'] = null; } - if (expiresIn != null) { - _json[r'expires_in'] = expiresIn; + if (this.expiresIn != null) { + json[r'expires_in'] = this.expiresIn; + } else { + json[r'expires_in'] = null; } - if (expiration != null) { - _json[r'expiration'] = expiration!.toUtc().toIso8601String(); + if (this.expiration != null) { + json[r'expiration'] = this.expiration!.toUtc().toIso8601String(); + } else { + json[r'expiration'] = null; } - if (instanceId != null) { - _json[r'instanceId'] = instanceId; + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; } - return _json; + if (this.pinCode != null) { + json[r'pinCode'] = this.pinCode; + } else { + json[r'pinCode'] = null; + } + return json; } /// Returns a new [TokenDTO] instance and imports its values from @@ -124,12 +148,13 @@ class TokenDTO { expiresIn: mapValueOfType(json, r'expires_in'), expiration: mapDateTime(json, r'expiration', ''), instanceId: mapValueOfType(json, r'instanceId'), + pinCode: mapValueOfType(json, r'pinCode'), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -160,12 +185,10 @@ class TokenDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = TokenDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = TokenDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/translation_and_resource_dto.dart b/manager_api/lib/model/translation_and_resource_dto.dart new file mode 100644 index 0000000..f365b2e --- /dev/null +++ b/manager_api/lib/model/translation_and_resource_dto.dart @@ -0,0 +1,162 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 TranslationAndResourceDTO { + /// Returns a new [TranslationAndResourceDTO] instance. + TranslationAndResourceDTO({ + this.language, + this.value, + this.resourceId, + this.resourceType, + this.resourceUrl, + }); + + String? language; + + String? value; + + String? resourceId; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ResourceType? resourceType; + + String? resourceUrl; + + @override + bool operator ==(Object other) => identical(this, other) || other is TranslationAndResourceDTO && + other.language == language && + other.value == value && + other.resourceId == resourceId && + other.resourceType == resourceType && + other.resourceUrl == resourceUrl; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (language == null ? 0 : language!.hashCode) + + (value == null ? 0 : value!.hashCode) + + (resourceId == null ? 0 : resourceId!.hashCode) + + (resourceType == null ? 0 : resourceType!.hashCode) + + (resourceUrl == null ? 0 : resourceUrl!.hashCode); + + @override + String toString() => 'TranslationAndResourceDTO[language=$language, value=$value, resourceId=$resourceId, resourceType=$resourceType, resourceUrl=$resourceUrl]'; + + Map toJson() { + final json = {}; + if (this.language != null) { + json[r'language'] = this.language; + } else { + json[r'language'] = null; + } + if (this.value != null) { + json[r'value'] = this.value; + } else { + json[r'value'] = null; + } + if (this.resourceId != null) { + json[r'resourceId'] = this.resourceId; + } else { + json[r'resourceId'] = null; + } + if (this.resourceType != null) { + json[r'resourceType'] = this.resourceType; + } else { + json[r'resourceType'] = null; + } + if (this.resourceUrl != null) { + json[r'resourceUrl'] = this.resourceUrl; + } else { + json[r'resourceUrl'] = null; + } + return json; + } + + /// Returns a new [TranslationAndResourceDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TranslationAndResourceDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TranslationAndResourceDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TranslationAndResourceDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TranslationAndResourceDTO( + language: mapValueOfType(json, r'language'), + value: mapValueOfType(json, r'value'), + resourceId: mapValueOfType(json, r'resourceId'), + resourceType: ResourceType.fromJson(json[r'resourceType']), + resourceUrl: mapValueOfType(json, r'resourceUrl'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TranslationAndResourceDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TranslationAndResourceDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TranslationAndResourceDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TranslationAndResourceDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/translation_dto.dart b/manager_api/lib/model/translation_dto.dart index bc4c2da..4e324c2 100644 --- a/manager_api/lib/model/translation_dto.dart +++ b/manager_api/lib/model/translation_dto.dart @@ -36,14 +36,18 @@ class TranslationDTO { String toString() => 'TranslationDTO[language=$language, value=$value]'; Map toJson() { - final _json = {}; - if (language != null) { - _json[r'language'] = language; + final json = {}; + if (this.language != null) { + json[r'language'] = this.language; + } else { + json[r'language'] = null; } - if (value != null) { - _json[r'value'] = value; + if (this.value != null) { + json[r'value'] = this.value; + } else { + json[r'value'] = null; } - return _json; + return json; } /// Returns a new [TranslationDTO] instance and imports its values from @@ -72,7 +76,7 @@ class TranslationDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -103,12 +107,10 @@ class TranslationDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = TranslationDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = TranslationDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/user.dart b/manager_api/lib/model/user.dart index e50ca10..c3d7aad 100644 --- a/manager_api/lib/model/user.dart +++ b/manager_api/lib/model/user.dart @@ -72,32 +72,48 @@ class User { String toString() => 'User[id=$id, email=$email, password=$password, firstName=$firstName, lastName=$lastName, token=$token, dateCreation=$dateCreation, instanceId=$instanceId]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (email != null) { - _json[r'email'] = email; + if (this.email != null) { + json[r'email'] = this.email; + } else { + json[r'email'] = null; } - if (password != null) { - _json[r'password'] = password; + if (this.password != null) { + json[r'password'] = this.password; + } else { + json[r'password'] = null; } - if (firstName != null) { - _json[r'firstName'] = firstName; + if (this.firstName != null) { + json[r'firstName'] = this.firstName; + } else { + json[r'firstName'] = null; } - if (lastName != null) { - _json[r'lastName'] = lastName; + if (this.lastName != null) { + json[r'lastName'] = this.lastName; + } else { + json[r'lastName'] = null; } - if (token != null) { - _json[r'token'] = token; + if (this.token != null) { + json[r'token'] = this.token; + } else { + json[r'token'] = null; } - if (dateCreation != null) { - _json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String(); + if (this.dateCreation != null) { + json[r'dateCreation'] = this.dateCreation!.toUtc().toIso8601String(); + } else { + json[r'dateCreation'] = null; } - if (instanceId != null) { - _json[r'instanceId'] = instanceId; + if (this.instanceId != null) { + json[r'instanceId'] = this.instanceId; + } else { + json[r'instanceId'] = null; } - return _json; + return json; } /// Returns a new [User] instance and imports its values from @@ -132,7 +148,7 @@ class User { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -163,12 +179,10 @@ class User { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = User.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = User.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/user_detail_dto.dart b/manager_api/lib/model/user_detail_dto.dart index 33727ba..d0ce9cf 100644 --- a/manager_api/lib/model/user_detail_dto.dart +++ b/manager_api/lib/model/user_detail_dto.dart @@ -46,20 +46,28 @@ class UserDetailDTO { String toString() => 'UserDetailDTO[id=$id, email=$email, firstName=$firstName, lastName=$lastName]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; } - if (email != null) { - _json[r'email'] = email; + if (this.email != null) { + json[r'email'] = this.email; + } else { + json[r'email'] = null; } - if (firstName != null) { - _json[r'firstName'] = firstName; + if (this.firstName != null) { + json[r'firstName'] = this.firstName; + } else { + json[r'firstName'] = null; } - if (lastName != null) { - _json[r'lastName'] = lastName; + if (this.lastName != null) { + json[r'lastName'] = this.lastName; + } else { + json[r'lastName'] = null; } - return _json; + return json; } /// Returns a new [UserDetailDTO] instance and imports its values from @@ -90,7 +98,7 @@ class UserDetailDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -121,12 +129,10 @@ class UserDetailDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = UserDetailDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = UserDetailDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/video_dto.dart b/manager_api/lib/model/video_dto.dart index 49bceae..01540ef 100644 --- a/manager_api/lib/model/video_dto.dart +++ b/manager_api/lib/model/video_dto.dart @@ -31,11 +31,13 @@ class VideoDTO { String toString() => 'VideoDTO[source_=$source_]'; Map toJson() { - final _json = {}; - if (source_ != null) { - _json[r'source'] = source_; + final json = {}; + if (this.source_ != null) { + json[r'source'] = this.source_; + } else { + json[r'source'] = null; } - return _json; + return json; } /// Returns a new [VideoDTO] instance and imports its values from @@ -63,7 +65,7 @@ class VideoDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +96,10 @@ class VideoDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = VideoDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = VideoDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/lib/model/weather_dto.dart b/manager_api/lib/model/weather_dto.dart new file mode 100644 index 0000000..e2447d0 --- /dev/null +++ b/manager_api/lib/model/weather_dto.dart @@ -0,0 +1,134 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 WeatherDTO { + /// Returns a new [WeatherDTO] instance. + WeatherDTO({ + this.city, + this.updatedDate, + this.result, + }); + + String? city; + + DateTime? updatedDate; + + String? result; + + @override + bool operator ==(Object other) => identical(this, other) || other is WeatherDTO && + other.city == city && + other.updatedDate == updatedDate && + other.result == result; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (city == null ? 0 : city!.hashCode) + + (updatedDate == null ? 0 : updatedDate!.hashCode) + + (result == null ? 0 : result!.hashCode); + + @override + String toString() => 'WeatherDTO[city=$city, updatedDate=$updatedDate, result=$result]'; + + Map toJson() { + final json = {}; + if (this.city != null) { + json[r'city'] = this.city; + } else { + json[r'city'] = null; + } + if (this.updatedDate != null) { + json[r'updatedDate'] = this.updatedDate!.toUtc().toIso8601String(); + } else { + json[r'updatedDate'] = null; + } + if (this.result != null) { + json[r'result'] = this.result; + } else { + json[r'result'] = null; + } + return json; + } + + /// Returns a new [WeatherDTO] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static WeatherDTO? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "WeatherDTO[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "WeatherDTO[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return WeatherDTO( + city: mapValueOfType(json, r'city'), + updatedDate: mapDateTime(json, r'updatedDate', ''), + result: mapValueOfType(json, r'result'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = WeatherDTO.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = WeatherDTO.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of WeatherDTO-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = WeatherDTO.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/manager_api/lib/model/web_dto.dart b/manager_api/lib/model/web_dto.dart index f5d6fa7..98d5c31 100644 --- a/manager_api/lib/model/web_dto.dart +++ b/manager_api/lib/model/web_dto.dart @@ -31,11 +31,13 @@ class WebDTO { String toString() => 'WebDTO[source_=$source_]'; Map toJson() { - final _json = {}; - if (source_ != null) { - _json[r'source'] = source_; + final json = {}; + if (this.source_ != null) { + json[r'source'] = this.source_; + } else { + json[r'source'] = null; } - return _json; + return json; } /// Returns a new [WebDTO] instance and imports its values from @@ -63,7 +65,7 @@ class WebDTO { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +96,10 @@ class WebDTO { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = WebDTO.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = WebDTO.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/manager_api/pubspec.lock b/manager_api/pubspec.lock index 17a2139..be75c19 100644 --- a/manager_api/pubspec.lock +++ b/manager_api/pubspec.lock @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.0" convert: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: "direct main" description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "1.2.1" http_multi_server: dependency: transitive description: @@ -141,10 +141,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.19.0" io: dependency: transitive description: @@ -157,18 +157,18 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: "323b7c70073cccf6b9b8d8b334be418a3293cfb612a560dc2737160a37bf61bd" url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.6.6" logging: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: c0bbfe94d46aedf9b8b3e695cf3bd48c8e14b35e3b2c639e0aa7755d589ba946 url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.0" matcher: dependency: transitive description: @@ -377,6 +377,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.2" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" web_socket_channel: dependency: transitive description: @@ -402,4 +410,4 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <4.0.0" + dart: ">=3.3.0 <4.0.0" diff --git a/manager_api/pubspec.yaml b/manager_api/pubspec.yaml index 99a0f1b..9ad30da 100644 --- a/manager_api/pubspec.yaml +++ b/manager_api/pubspec.yaml @@ -7,10 +7,10 @@ version: '1.0.0' description: 'OpenAPI API client' homepage: 'homepage' environment: - sdk: '>=2.12.0 <3.0.0' + sdk: ">=3.1.0 <4.0.0" dependencies: - http: '>=0.13.0 <0.14.0' - intl: any + http: '^1.1.0' + intl: '^0.19.0' meta: '^1.1.8' dev_dependencies: test: '>=1.16.0 <1.18.0' diff --git a/manager_api/test/agenda_dto_test.dart b/manager_api/test/agenda_dto_test.dart new file mode 100644 index 0000000..60aa589 --- /dev/null +++ b/manager_api/test/agenda_dto_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for AgendaDTO +void main() { + // final instance = AgendaDTO(); + + group('test AgendaDTO', () { + // String source_ + test('to test the property `source_`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/article_dto_test.dart b/manager_api/test/article_dto_test.dart index 096f8dc..7be3235 100644 --- a/manager_api/test/article_dto_test.dart +++ b/manager_api/test/article_dto_test.dart @@ -21,18 +21,13 @@ void main() { // TODO }); - // String qrCode - test('to test the property `qrCode`', () async { - // TODO - }); - // bool isContentTop test('to test the property `isContentTop`', () async { // TODO }); - // String audioId - test('to test the property `audioId`', () async { + // List audioIds (default value: const []) + test('to test the property `audioIds`', () async { // TODO }); diff --git a/manager_api/test/categorie_dto_test.dart b/manager_api/test/categorie_dto_test.dart new file mode 100644 index 0000000..4c81425 --- /dev/null +++ b/manager_api/test/categorie_dto_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for CategorieDTO +void main() { + // final instance = CategorieDTO(); + + group('test CategorieDTO', () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + // String icon + test('to test the property `icon`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/configuration_api_test.dart b/manager_api/test/configuration_api_test.dart index 6f7c219..4844853 100644 --- a/manager_api/test/configuration_api_test.dart +++ b/manager_api/test/configuration_api_test.dart @@ -32,7 +32,7 @@ void main() { // TODO }); - //Future> configurationGet() async + //Future> configurationGet({ String instanceId }) async test('test configurationGet', () async { // TODO }); diff --git a/manager_api/test/configuration_dto_test.dart b/manager_api/test/configuration_dto_test.dart index 2008724..5c4461f 100644 --- a/manager_api/test/configuration_dto_test.dart +++ b/manager_api/test/configuration_dto_test.dart @@ -26,6 +26,21 @@ void main() { // TODO }); + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + // String primaryColor test('to test the property `primaryColor`', () async { // TODO @@ -61,6 +76,11 @@ void main() { // TODO }); + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); diff --git a/manager_api/test/content_dto_test.dart b/manager_api/test/content_dto_test.dart new file mode 100644 index 0000000..99e909b --- /dev/null +++ b/manager_api/test/content_dto_test.dart @@ -0,0 +1,52 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for ContentDTO +void main() { + // final instance = ContentDTO(); + + group('test ContentDTO', () { + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // String resourceId + test('to test the property `resourceId`', () async { + // TODO + }); + + // String resourceUrl + test('to test the property `resourceUrl`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + // ResourceType resourceType + test('to test the property `resourceType`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/content_geo_point_test.dart b/manager_api/test/content_geo_point_test.dart new file mode 100644 index 0000000..b24df45 --- /dev/null +++ b/manager_api/test/content_geo_point_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for ContentGeoPoint +void main() { + // final instance = ContentGeoPoint(); + + group('test ContentGeoPoint', () { + // String resourceId + test('to test the property `resourceId`', () async { + // TODO + }); + + // ResourceType resourceType + test('to test the property `resourceType`', () async { + // TODO + }); + + // String resourceUrl + test('to test the property `resourceUrl`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/device_api_test.dart b/manager_api/test/device_api_test.dart index 83f9741..acdb174 100644 --- a/manager_api/test/device_api_test.dart +++ b/manager_api/test/device_api_test.dart @@ -27,7 +27,7 @@ void main() { // TODO }); - //Future> deviceGet() async + //Future> deviceGet({ String instanceId }) async test('test deviceGet', () async { // TODO }); diff --git a/manager_api/test/device_detail_dto_test.dart b/manager_api/test/device_detail_dto_test.dart index d384865..9732639 100644 --- a/manager_api/test/device_detail_dto_test.dart +++ b/manager_api/test/device_detail_dto_test.dart @@ -66,6 +66,11 @@ void main() { // TODO }); + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + // String connectionLevel test('to test the property `connectionLevel`', () async { // TODO diff --git a/manager_api/test/device_dto_test.dart b/manager_api/test/device_dto_test.dart index 96226bf..7e02aa0 100644 --- a/manager_api/test/device_dto_test.dart +++ b/manager_api/test/device_dto_test.dart @@ -66,6 +66,11 @@ void main() { // TODO }); + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); diff --git a/manager_api/test/export_configuration_dto_test.dart b/manager_api/test/export_configuration_dto_test.dart index 735a2da..222334d 100644 --- a/manager_api/test/export_configuration_dto_test.dart +++ b/manager_api/test/export_configuration_dto_test.dart @@ -26,6 +26,21 @@ void main() { // TODO }); + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // String imageId + test('to test the property `imageId`', () async { + // TODO + }); + + // String imageSource + test('to test the property `imageSource`', () async { + // TODO + }); + // String primaryColor test('to test the property `primaryColor`', () async { // TODO @@ -61,6 +76,11 @@ void main() { // TODO }); + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + // List sections (default value: const []) test('to test the property `sections`', () async { // TODO diff --git a/manager_api/test/geo_point_dto_categorie_test.dart b/manager_api/test/geo_point_dto_categorie_test.dart new file mode 100644 index 0000000..03c380e --- /dev/null +++ b/manager_api/test/geo_point_dto_categorie_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for GeoPointDTOCategorie +void main() { + // final instance = GeoPointDTOCategorie(); + + group('test GeoPointDTOCategorie', () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + // String icon + test('to test the property `icon`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/map_dto_map_provider_test.dart b/manager_api/test/map_dto_map_provider_test.dart new file mode 100644 index 0000000..59fba41 --- /dev/null +++ b/manager_api/test/map_dto_map_provider_test.dart @@ -0,0 +1,22 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for MapDTOMapProvider +void main() { + // final instance = MapDTOMapProvider(); + + group('test MapDTOMapProvider', () { + + }); + +} diff --git a/manager_api/test/map_dto_map_type_mapbox_test.dart b/manager_api/test/map_dto_map_type_mapbox_test.dart new file mode 100644 index 0000000..163b689 --- /dev/null +++ b/manager_api/test/map_dto_map_type_mapbox_test.dart @@ -0,0 +1,22 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for MapDTOMapTypeMapbox +void main() { + // final instance = MapDTOMapTypeMapbox(); + + group('test MapDTOMapTypeMapbox', () { + + }); + +} diff --git a/manager_api/test/map_dto_map_type_test.dart b/manager_api/test/map_dto_map_type_test.dart new file mode 100644 index 0000000..2856e00 --- /dev/null +++ b/manager_api/test/map_dto_map_type_test.dart @@ -0,0 +1,22 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for MapDTOMapType +void main() { + // final instance = MapDTOMapType(); + + group('test MapDTOMapType', () { + + }); + +} diff --git a/manager_api/test/map_provider_test.dart b/manager_api/test/map_provider_test.dart new file mode 100644 index 0000000..3dac549 --- /dev/null +++ b/manager_api/test/map_provider_test.dart @@ -0,0 +1,21 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for MapProvider +void main() { + + group('test MapProvider', () { + + }); + +} diff --git a/manager_api/test/map_type_map_box_test.dart b/manager_api/test/map_type_map_box_test.dart new file mode 100644 index 0000000..b2ce7e4 --- /dev/null +++ b/manager_api/test/map_type_map_box_test.dart @@ -0,0 +1,21 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for MapTypeMapBox +void main() { + + group('test MapTypeMapBox', () { + + }); + +} diff --git a/manager_api/test/pdf_dto_test.dart b/manager_api/test/pdf_dto_test.dart new file mode 100644 index 0000000..4165d35 --- /dev/null +++ b/manager_api/test/pdf_dto_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for PdfDTO +void main() { + // final instance = PdfDTO(); + + group('test PdfDTO', () { + // String source_ + test('to test the property `source_`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/pdf_file_dto_test.dart b/manager_api/test/pdf_file_dto_test.dart new file mode 100644 index 0000000..258f2d5 --- /dev/null +++ b/manager_api/test/pdf_file_dto_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for PDFFileDTO +void main() { + // final instance = PDFFileDTO(); + + group('test PDFFileDTO', () { + // List pdfFilesAndTitles (default value: const []) + test('to test the property `pdfFilesAndTitles`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/puzzle_dto_image_test.dart b/manager_api/test/puzzle_dto_image_test.dart new file mode 100644 index 0000000..5695e08 --- /dev/null +++ b/manager_api/test/puzzle_dto_image_test.dart @@ -0,0 +1,47 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for PuzzleDTOImage +void main() { + // final instance = PuzzleDTOImage(); + + group('test PuzzleDTOImage', () { + // List title (default value: const []) + test('to test the property `title`', () async { + // TODO + }); + + // List description (default value: const []) + test('to test the property `description`', () async { + // TODO + }); + + // String resourceId + test('to test the property `resourceId`', () async { + // TODO + }); + + // String source_ + test('to test the property `source_`', () async { + // TODO + }); + + // int order + test('to test the property `order`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/puzzle_dto_test.dart b/manager_api/test/puzzle_dto_test.dart new file mode 100644 index 0000000..f6a83f9 --- /dev/null +++ b/manager_api/test/puzzle_dto_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for PuzzleDTO +void main() { + // final instance = PuzzleDTO(); + + group('test PuzzleDTO', () { + // List messageDebut (default value: const []) + test('to test the property `messageDebut`', () async { + // TODO + }); + + // List messageFin (default value: const []) + test('to test the property `messageFin`', () async { + // TODO + }); + + // PuzzleDTOImage image + test('to test the property `image`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/resource_api_test.dart b/manager_api/test/resource_api_test.dart index abddc3f..b28bd40 100644 --- a/manager_api/test/resource_api_test.dart +++ b/manager_api/test/resource_api_test.dart @@ -27,7 +27,7 @@ void main() { // TODO }); - //Future> resourceGet() async + //Future> resourceGet({ String instanceId, List types }) async test('test resourceGet', () async { // TODO }); @@ -47,7 +47,7 @@ void main() { // TODO }); - //Future resourceUpload({ String label, String type }) async + //Future resourceUpload({ String label, String type, String instanceId }) async test('test resourceUpload', () async { // TODO }); diff --git a/manager_api/test/resource_dto_test.dart b/manager_api/test/resource_dto_test.dart index 6252ece..5943a30 100644 --- a/manager_api/test/resource_dto_test.dart +++ b/manager_api/test/resource_dto_test.dart @@ -31,13 +31,18 @@ void main() { // TODO }); + // String data + test('to test the property `data`', () async { + // TODO + }); + // DateTime dateCreation test('to test the property `dateCreation`', () async { // TODO }); - // String data - test('to test the property `data`', () async { + // String instanceId + test('to test the property `instanceId`', () async { // TODO }); diff --git a/manager_api/test/section_api_test.dart b/manager_api/test/section_api_test.dart index e3fe10f..0d98fba 100644 --- a/manager_api/test/section_api_test.dart +++ b/manager_api/test/section_api_test.dart @@ -32,7 +32,7 @@ void main() { // TODO }); - //Future> sectionGet() async + //Future> sectionGet({ String instanceId }) async test('test sectionGet', () async { // TODO }); diff --git a/manager_api/test/section_dto_test.dart b/manager_api/test/section_dto_test.dart index e5341dc..5c6177e 100644 --- a/manager_api/test/section_dto_test.dart +++ b/manager_api/test/section_dto_test.dart @@ -81,6 +81,36 @@ void main() { // TODO }); + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + + // String latitude + test('to test the property `latitude`', () async { + // TODO + }); + + // String longitude + test('to test the property `longitude`', () async { + // TODO + }); + + // int meterZoneGPS + test('to test the property `meterZoneGPS`', () async { + // TODO + }); + + // bool isBeacon + test('to test the property `isBeacon`', () async { + // TODO + }); + + // String beaconId + test('to test the property `beaconId`', () async { + // TODO + }); + }); diff --git a/manager_api/test/token_dto_test.dart b/manager_api/test/token_dto_test.dart index 840c71a..6b83f0b 100644 --- a/manager_api/test/token_dto_test.dart +++ b/manager_api/test/token_dto_test.dart @@ -46,6 +46,11 @@ void main() { // TODO }); + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); diff --git a/manager_api/test/translation_and_resource_dto_test.dart b/manager_api/test/translation_and_resource_dto_test.dart new file mode 100644 index 0000000..9eccea6 --- /dev/null +++ b/manager_api/test/translation_and_resource_dto_test.dart @@ -0,0 +1,47 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for TranslationAndResourceDTO +void main() { + // final instance = TranslationAndResourceDTO(); + + group('test TranslationAndResourceDTO', () { + // String language + test('to test the property `language`', () async { + // TODO + }); + + // String value + test('to test the property `value`', () async { + // TODO + }); + + // String resourceId + test('to test the property `resourceId`', () async { + // TODO + }); + + // ResourceType resourceType + test('to test the property `resourceType`', () async { + // TODO + }); + + // String resourceUrl + test('to test the property `resourceUrl`', () async { + // TODO + }); + + + }); + +} diff --git a/manager_api/test/user_test.dart b/manager_api/test/user_test.dart index 3a0fb52..a80a97d 100644 --- a/manager_api/test/user_test.dart +++ b/manager_api/test/user_test.dart @@ -51,6 +51,11 @@ void main() { // TODO }); + // String instanceId + test('to test the property `instanceId`', () async { + // TODO + }); + }); diff --git a/manager_api/test/weather_dto_test.dart b/manager_api/test/weather_dto_test.dart new file mode 100644 index 0000000..dabee61 --- /dev/null +++ b/manager_api/test/weather_dto_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.12 + +// 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 + +import 'package:manager_api/api.dart'; +import 'package:test/test.dart'; + +// tests for WeatherDTO +void main() { + // final instance = WeatherDTO(); + + group('test WeatherDTO', () { + // String city + test('to test the property `city`', () async { + // TODO + }); + + // DateTime updatedDate + test('to test the property `updatedDate`', () async { + // TODO + }); + + // String result + test('to test the property `result`', () async { + // TODO + }); + + + }); + +} diff --git a/pubspec.lock b/pubspec.lock index d0ee74d..ae28089 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,34 +5,39 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "37bb1e815e15fbeefe916e4c941ef070f2f64d15a7eacc3cc0f6e8847b62319c" + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 url: "https://pub.dev" source: hosted - version: "48.0.0" + version: "72.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" analyzer: dependency: transitive description: name: analyzer - sha256: c50aea66893c20d44c365d4269983a74a5c1a4055b7b78f38fbf0e24f519b6a2 + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "6.7.0" archive: dependency: transitive description: name: archive - sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.3.6" + version: "3.6.1" args: dependency: transitive description: name: args - sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.5.0" async: dependency: transitive description: @@ -45,10 +50,10 @@ packages: dependency: transitive description: name: audio_session - sha256: "8a2bc5e30520e18f3fb0e366793d78057fb64cd5287862c76af0c8771f2a52ad" + sha256: a49af9981eec5d7cd73b37bacb6ee73f8143a6a9f9bd5b6021e6c346b9b6cf4e url: "https://pub.dev" source: hosted - version: "0.1.16" + version: "0.1.19" auto_size_text: dependency: "direct main" description: @@ -69,10 +74,10 @@ packages: dependency: transitive description: name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" build_config: dependency: transitive description: @@ -85,34 +90,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "4.0.2" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "687cf90a3951affac1bd5f9ecb5e3e90b60487f3d9cdc359bb310f8876bb02a6" + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.0.10" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.11" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" + sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe url: "https://pub.dev" source: hosted - version: "7.2.7" + version: "7.3.1" built_collection: dependency: transitive description: @@ -125,42 +130,34 @@ packages: dependency: transitive description: name: built_value - sha256: "169565c8ad06adb760c3645bf71f00bff161b00002cace266cad42c5d22a7725" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.4.3" + version: "8.9.2" cached_network_image: dependency: transitive description: name: cached_network_image - sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 + sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f" url: "https://pub.dev" source: hosted - version: "3.2.3" + version: "3.3.1" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface - sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 + sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "4.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web - sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 + sha256: "205d6a9f1862de34b93184f22b9d2d94586b2f05c581d546695e3d8f6a805cd7" url: "https://pub.dev" source: hosted - version: "1.0.2" - carousel_slider: - dependency: "direct main" - description: - name: carousel_slider - sha256: "9c695cc963bf1d04a47bd6021f68befce8970bcd61d24938e1fb0918cf5d9c42" - url: "https://pub.dev" - source: hosted - version: "4.2.1" + version: "1.2.0" characters: dependency: transitive description: @@ -173,26 +170,26 @@ packages: dependency: transitive description: name: checked_yaml - sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" chewie: dependency: transitive description: name: chewie - sha256: "745e81e84c6d7f3835f89f85bb49771c0a66099e4caf8f8e9e9a372bc66fb2c1" + sha256: e53da939709efb9aad0f3d72a69a8d05f889168b7a138af60ce78bab5c94b135 url: "https://pub.dev" source: hosted - version: "1.5.0" + version: "1.8.1" cli_util: dependency: transitive description: name: cli_util - sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 url: "https://pub.dev" source: hosted - version: "0.3.5" + version: "0.4.1" clock: dependency: transitive description: @@ -205,18 +202,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.10.0" collection: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -229,42 +226,50 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" csslib: dependency: transitive description: name: csslib - sha256: "831883fb353c8bdc1d71979e5b342c7d88acfbc643113c14ae51e2442ea0f20f" + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" url: "https://pub.dev" source: hosted - version: "0.17.3" + version: "1.0.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.8" dart_style: dependency: transitive description: name: dart_style - sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.3.6" + dbus: + dependency: transitive + description: + name: dbus + sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" + url: "https://pub.dev" + source: hosted + version: "0.7.10" diacritic: dependency: "direct main" description: name: diacritic - sha256: c09a420e737dc036122121fea9f774767e95068f34a17894ee9db30c5bda3075 + sha256: "96db5db6149cbe4aa3cfcbfd170aca9b7648639be7e48025f9d458517f807fe4" url: "https://pub.dev" source: hosted - version: "0.1.3" + version: "0.1.5" fake_async: dependency: transitive description: @@ -277,18 +282,18 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.2" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.0" fixnum: dependency: transitive description: @@ -310,30 +315,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" - flutter_blurhash: - dependency: transitive - description: - name: flutter_blurhash - sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" - url: "https://pub.dev" - source: hosted - version: "0.7.0" flutter_cache_manager: dependency: transitive description: name: flutter_cache_manager - sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3" + sha256: "395d6b7831f21f3b989ebedbb785545932adb9afe2622c1ffacf7f4b53a7e544" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.3.2" flutter_launcher_icons: dependency: "direct main" description: name: flutter_launcher_icons - sha256: a9de6706cd844668beac27c0aed5910fa0534832b3c2cad61a5fd977fce82a5d + sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" url: "https://pub.dev" source: hosted - version: "0.10.0" + version: "0.13.1" flutter_lints: dependency: "direct dev" description: @@ -351,10 +348,10 @@ packages: dependency: transitive description: name: flutter_svg - sha256: f991fdb1533c3caeee0cdc14b04f50f0c3916f0dbcbc05237ccbe4e3c6b93f3f + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.10+1" flutter_test: dependency: "direct dev" description: flutter @@ -369,106 +366,98 @@ packages: dependency: "direct main" description: name: flutter_widget_from_html - sha256: "9a51be2a49bee770d5f26a9d1d9352f5156791dba83567fed096745de859a57b" + sha256: e79144d8a37b7d1075fc1fdebc32708bd142ad9fdf1c7d9444f5e964cc03158b url: "https://pub.dev" source: hosted - version: "0.10.1" + version: "0.15.1" flutter_widget_from_html_core: dependency: transitive description: name: flutter_widget_from_html_core - sha256: "77f05cd7a738078dcdbe07741140d58b2fe7509197f3855a91269fb5a90f4bee" + sha256: df7c7c9e5ea144f7ab0adfbad733b4d4f7d408ab733c94e6e9fdcb327af92aa1 url: "https://pub.dev" source: hosted - version: "0.10.1" + version: "0.15.1" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" fwfh_cached_network_image: dependency: transitive description: name: fwfh_cached_network_image - sha256: "396ebb3a01978aa75cad416656abef6ffa31e12de71cf2ccf5ff4173bd35a3eb" + sha256: "8e44226801bfba27930673953afce8af44da7e92573be93f60385d9865a089dd" url: "https://pub.dev" source: hosted - version: "0.7.0+5" + version: "0.14.3" fwfh_chewie: dependency: transitive description: name: fwfh_chewie - sha256: "6474630c084cc90fbd348cea007d3cb41d62478460f75364e591f2baf26abccd" + sha256: "37bde9cedfb6dc5546176f7f0c56af1e814966cb33ec58f16c9565ed93ccb704" url: "https://pub.dev" source: hosted - version: "0.7.1+2" + version: "0.14.8" fwfh_just_audio: dependency: transitive description: name: fwfh_just_audio - sha256: "7b97696c264f36f7921c2f94e95c1d4186021699d85ca19aaa280f6b9700fb35" + sha256: "4ff7927619ff4855567a61e126269e1fef985a9fe7e78682592da17bf658aabb" url: "https://pub.dev" source: hosted - version: "0.9.0+2" + version: "0.15.1" fwfh_svg: dependency: transitive description: name: fwfh_svg - sha256: "398e8eec980e7b2868481489fd423634f7e337bc04c37508db6f84868b982120" + sha256: c6bb6b513f7ce2766aba76d7276caf9a96b6fee729ac3a492c366a42f82ef02e url: "https://pub.dev" source: hosted - version: "0.8.0+2" - fwfh_text_style: - dependency: transitive - description: - name: fwfh_text_style - sha256: f0883ccb64b7bb3f2a7a091542c2e834fc3e2a6aa54158f46b3c43b55675d8f7 - url: "https://pub.dev" - source: hosted - version: "2.22.8+3" + version: "0.8.2" fwfh_url_launcher: dependency: transitive description: name: fwfh_url_launcher - sha256: ff7f7a877c20fdbea24b453a0cd846a03ef1ea6b933943a7d37082388c27e849 + sha256: b9f5d55a5ae2c2c07243ba33f7ba49ac9544bdb2f4c16d8139df9ccbebe3449c url: "https://pub.dev" source: hosted - version: "0.9.0+2" + version: "0.9.1" fwfh_webview: dependency: transitive description: name: fwfh_webview - sha256: "7ebd3dff551d7281dd3fbb9f5523a8455592665ff75459ca84871ebbebe864a8" + sha256: "2cd2b1e463ddaf26b7d4f74e1a855126c4a836fdaff9551636693e07a07422b6" url: "https://pub.dev" source: hosted - version: "0.7.0+2" + version: "0.15.1" get: dependency: "direct main" description: name: get - sha256: "2ba20a47c8f1f233bed775ba2dd0d3ac97b4cf32fc17731b3dfc672b06b0e92a" + sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e url: "https://pub.dev" source: hosted - version: "4.6.5" + version: "4.6.6" glob: dependency: transitive description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2 + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.1" html: dependency: transitive description: @@ -481,10 +470,10 @@ packages: dependency: transitive description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "1.2.1" http_multi_server: dependency: transitive description: @@ -505,18 +494,18 @@ packages: dependency: transitive description: name: image - sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "4.2.0" intl: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" io: dependency: transitive description: @@ -537,34 +526,66 @@ packages: dependency: transitive description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.9.0" just_audio: dependency: "direct main" description: name: just_audio - sha256: "890cd0fc41a1a4530c171e375a2a3fb6a09d84e9d508c5195f40bcff54330327" + sha256: "5abfab1d199e01ab5beffa61b3e782350df5dad036cb8c83b79fa45fc656614e" url: "https://pub.dev" source: hosted - version: "0.9.34" + version: "0.9.38" + just_audio_cache: + dependency: "direct main" + description: + name: just_audio_cache + sha256: aecf2167c24f0c6ecdb180ecc7dae75b9e0b351c8714ecd8aafb1be9016376fc + url: "https://pub.dev" + source: hosted + version: "0.1.2" just_audio_platform_interface: dependency: transitive description: name: just_audio_platform_interface - sha256: d8409da198bbc59426cd45d4c92fca522a2ec269b576ce29459d6d6fcaeb44df + sha256: "0243828cce503c8366cc2090cefb2b3c871aa8ed2f520670d76fd47aa1ab2790" url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "4.3.0" just_audio_web: dependency: transitive description: name: just_audio_web - sha256: ff62f733f437b25a0ff590f0e295fa5441dcb465f1edbdb33b3dea264705bc13 + sha256: "0edb481ad4aa1ff38f8c40f1a3576013c3420bf6669b686fe661627d49bc606c" url: "https://pub.dev" source: hosted - version: "0.4.8" + version: "0.4.11" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -577,10 +598,18 @@ packages: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" manager_api: dependency: "direct main" description: @@ -592,34 +621,34 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.15.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" nested: dependency: transitive description: @@ -632,34 +661,34 @@ packages: dependency: transitive description: name: octo_image - sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" + sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "2.0.0" openapi_generator: dependency: "direct main" description: name: openapi_generator - sha256: "2c9cf35d91a26330f09ec4a2370f07c5e3040921bd3f33751ba36ac4d2346dc0" + sha256: "70614d71f5a500d84b7f061abfdfbe654d666c16b6aab4891672c3f4de39f29d" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.2" openapi_generator_annotations: dependency: "direct main" description: name: openapi_generator_annotations - sha256: "1745b86b57943c5a09647c37dd909da61060ad65a0d3d3e48bef58f9c1eebb32" + sha256: "86d924de3037a4a82e8a8d3b60c4120eced3df9e6b52a7d17cdec12ff4299ac5" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.2" openapi_generator_cli: dependency: "direct main" description: name: openapi_generator_cli - sha256: "5d558ea599202dc487f829193b0ba0f28a0e7ad559e819a611b2146ef20c77f5" + sha256: "772694a131972634ce6d04754fc8b30a5106240c324f9e3454476462d80d72c2" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.2" package_config: dependency: transitive description: @@ -668,14 +697,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: b93d8b4d624b4ea19b0a5a208b2d6eff06004bc3ce74c06040b120eeadd00ce0 + url: "https://pub.dev" + source: hosted + version: "8.0.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e + url: "https://pub.dev" + source: hosted + version: "3.0.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_parsing: dependency: transitive description: @@ -688,114 +733,130 @@ packages: dependency: transitive description: name: path_provider - sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95 + sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 url: "https://pub.dev" source: hosted - version: "2.0.12" + version: "2.1.3" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e + sha256: bca87b0165ffd7cdb9cad8edd22d18d2201e886d9a9f19b4fb3452ea7df3a72a url: "https://pub.dev" source: hosted - version: "2.0.22" + version: "2.2.6" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.4.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: "2e32f1640f07caef0d3cb993680f181c79e54a3827b997d5ee221490d131fbd9" + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.8" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted - version: "2.1.3" - pedantic: - dependency: transitive - description: - name: pedantic - sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602" - url: "https://pub.dev" - source: hosted - version: "1.11.1" + version: "2.2.1" permission_handler: dependency: "direct main" description: name: permission_handler - sha256: "4356882e9abf51aa0d56e8fb886e0d6162719f2310dd71f0b8fa7f34908b128d" + sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" url: "https://pub.dev" source: hosted - version: "8.3.0" + version: "11.3.1" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: b29a799ca03be9f999aa6c39f7de5209482d638e6f857f6b93b0875c618b7e54 + url: "https://pub.dev" + source: hosted + version: "12.0.7" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: e6f6d73b12438ef13e648c4ae56bd106ec60d17e90a59c4545db6781229082a0 + url: "https://pub.dev" + source: hosted + version: "9.4.5" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" + url: "https://pub.dev" + source: hosted + version: "0.1.1" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: "68abbc472002b5e6dfce47fe9898c6b7d8328d58b5d2524f75e277c07a97eb84" + sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" url: "https://pub.dev" source: hosted - version: "3.9.0" + version: "4.2.1" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + url: "https://pub.dev" + source: hosted + version: "0.2.1" petitparser: dependency: transitive description: name: petitparser - sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "6.0.2" photo_view: dependency: "direct main" description: name: photo_view - sha256: "8036802a00bae2a78fc197af8a158e3e2f7b500561ed23b4c458107685e645bb" + sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e" url: "https://pub.dev" source: hosted - version: "0.14.0" + version: "0.15.0" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.3" - pointycastle: - dependency: transitive - description: - name: pointycastle - sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 - url: "https://pub.dev" - source: hosted - version: "3.6.2" + version: "2.1.8" pool: dependency: transitive description: @@ -804,38 +865,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" provider: dependency: "direct main" description: name: provider - sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c url: "https://pub.dev" source: hosted - version: "6.0.5" + version: "6.1.2" pub_semver: dependency: transitive description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a" + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" qr_code_scanner: dependency: "direct main" description: @@ -852,22 +905,78 @@ packages: url: "https://pub.dev" source: hosted version: "0.27.7" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 + url: "https://pub.dev" + source: hosted + version: "2.2.3" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577" + url: "https://pub.dev" + source: hosted + version: "2.2.3" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" + url: "https://pub.dev" + source: hosted + version: "2.3.0" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" + url: "https://pub.dev" + source: hosted + version: "2.3.2" shelf: dependency: transitive description: name: shelf - sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -877,10 +986,10 @@ packages: dependency: transitive description: name: source_gen - sha256: "2d79738b6bbf38a43920e2b8d189e9a3ce6cc201f4b8fc76be5e4fe377b1c38d" + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.2.6" + version: "1.5.0" source_span: dependency: transitive description: @@ -889,38 +998,46 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" sqflite: dependency: "direct main" description: name: sqflite - sha256: "851d5040552cf911f4cabda08d003eca76b27da3ed0002978272e27c8fbf8ecc" + sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d url: "https://pub.dev" source: hosted - version: "2.2.5" + version: "2.3.3+1" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: bfd6973aaeeb93475bc0d875ac9aefddf7965ef22ce09790eb963992ffc5183f + sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4" url: "https://pub.dev" source: hosted - version: "2.4.2+2" + version: "2.5.4" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -941,10 +1058,10 @@ packages: dependency: transitive description: name: synchronized - sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b" + sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.1.0+1" term_glyph: dependency: transitive description: @@ -957,10 +1074,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.7.2" timing: dependency: transitive description: @@ -973,106 +1090,106 @@ packages: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" url_launcher: dependency: transitive description: name: url_launcher - sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" url: "https://pub.dev" source: hosted - version: "6.1.11" + version: "6.3.0" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: eed4e6a1164aa9794409325c3b707ff424d4d1c2a785e7db67f8bbda00e36e51 + sha256: ceb2625f0c24ade6ef6778d1de0b2e44f2db71fded235eb52295247feba8c5cf url: "https://pub.dev" source: hosted - version: "6.0.35" + version: "6.3.3" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "6.3.0" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.1.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e" + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.2.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "6bb1e5d7fe53daf02a8fee85352432a40b1f868a81880e99ec7440113d5cfcab" + sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" url: "https://pub.dev" source: hosted - version: "2.0.17" + version: "2.3.1" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.1" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.4.0" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: ea8d3fc7b2e0f35de38a7465063ecfcf03d8217f7962aa2a6717132cb5d43a79 + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" url: "https://pub.dev" source: hosted - version: "1.1.5" + version: "1.1.11+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: a5eaa5d19e123ad4f61c3718ca1ed921c4e6254238d9145f82aa214955d9aced + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da url: "https://pub.dev" source: hosted - version: "1.1.5" + version: "1.1.11+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "15edc42f7eaa478ce854eaf1fbb9062a899c0e4e56e775dd73b7f4709c97c4ca" + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.dev" source: hosted - version: "1.1.5" + version: "1.1.11+1" vector_math: dependency: transitive description: @@ -1085,170 +1202,162 @@ packages: dependency: transitive description: name: video_player - sha256: de95f0e9405f29b5582573d4166132e71f83b3158aac14e8ee5767a54f4f1fbd + sha256: e30df0d226c4ef82e2c150ebf6834b3522cf3f654d8e2f9419d376cdc071425d url: "https://pub.dev" source: hosted - version: "2.6.1" + version: "2.9.1" video_player_android: dependency: transitive description: name: video_player_android - sha256: f338a5a396c845f4632959511cad3542cdf3167e1b2a1a948ef07f7123c03608 + sha256: fdc0331ce9f808cc2714014cb8126bd6369943affefd54f8fdab0ea0bb617b7f url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.5.2" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation - sha256: "4c274e439f349a0ee5cb3c42978393ede173a443b98f50de6ffe6900eaa19216" + sha256: d1e9a824f2b324000dc8fb2dcb2a3285b6c1c7c487521c63306cc5b394f68a7c url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.6.1" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - sha256: a8c4dcae2a7a6e7cc1d7f9808294d968eca1993af34a98e95b9bdfa959bec684 + sha256: "236454725fafcacf98f0f39af0d7c7ab2ce84762e3b63f2cbb3ef9a7e0550bc6" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.2.2" video_player_web: dependency: transitive description: name: video_player_web - sha256: "44ce41424d104dfb7cf6982cc6b84af2b007a24d126406025bf40de5d481c74c" + sha256: ff4d69a6614b03f055397c27a71c9d3ddea2b2a23d71b2ba0164f59ca32b8fe2 url: "https://pub.dev" source: hosted - version: "2.0.16" - wakelock: + version: "2.3.1" + vm_service: dependency: transitive description: - name: wakelock - sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" + name: vm_service + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "0.6.2" - wakelock_macos: + version: "14.2.4" + wakelock_plus: dependency: transitive description: - name: wakelock_macos - sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" + name: wakelock_plus + sha256: "14758533319a462ffb5aa3b7ddb198e59b29ac3b02da14173a1715d65d4e6e68" url: "https://pub.dev" source: hosted - version: "0.4.0" - wakelock_platform_interface: + version: "1.2.5" + wakelock_plus_platform_interface: dependency: transitive description: - name: wakelock_platform_interface - sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" + name: wakelock_plus_platform_interface + sha256: "422d1cdbb448079a8a62a5a770b69baa489f8f7ca21aef47800c726d404f9d16" url: "https://pub.dev" source: hosted - version: "0.3.0" - wakelock_web: - dependency: transitive - description: - name: wakelock_web - sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" - url: "https://pub.dev" - source: hosted - version: "0.4.0" - wakelock_windows: - dependency: transitive - description: - name: wakelock_windows - sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567" - url: "https://pub.dev" - source: hosted - version: "0.2.1" + version: "1.2.1" watcher: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" + url: "https://pub.dev" + source: hosted + version: "0.1.5" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "3.0.0" webview_flutter: dependency: transitive description: name: webview_flutter - sha256: "789d52bd789373cc1e100fb634af2127e86c99cf9abde09499743270c5de8d00" + sha256: "6869c8786d179f929144b4a1f86e09ac0eddfe475984951ea6c634774c16b522" url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "4.8.0" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - sha256: "532135f6f6b8030cd039f30eab23f340d650350e29f38e9b37d2eaad028f1018" + sha256: f42447ca49523f11d8f70abea55ea211b3cafe172dd7a0e7ac007bb35dd356dc url: "https://pub.dev" source: hosted - version: "3.8.0" + version: "3.16.4" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - sha256: "656e2aeaef318900fffd21468b6ddc7958c7092a642f0e7220bac328b70d4a81" + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.10.0" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - sha256: ecc9e9ea15216afc5ba3b1f14aa19414ceba526e57b19cebd970bfa91a0f4058 + sha256: "7affdf9d680c015b11587181171d3cad8093e449db1f7d9f0f08f4f33d24f9a0" url: "https://pub.dev" source: hosted - version: "3.5.0" + version: "3.13.1" win32: dependency: transitive description: name: win32 - sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "5.5.1" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.4" xml: dependency: transitive description: name: xml - sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.5.0" yaml: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=3.1.0-185.0.dev <4.0.0" - flutter: ">=3.7.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/pubspec.lock.save b/pubspec.lock.save deleted file mode 100644 index e0695fe..0000000 --- a/pubspec.lock.save +++ /dev/null @@ -1,780 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - url: "https://pub.dartlang.org" - source: hosted - version: "47.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - url: "https://pub.dartlang.org" - source: hosted - version: "4.7.0" - archive: - dependency: transitive - description: - name: archive - url: "https://pub.dartlang.org" - source: hosted - version: "3.3.1" - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.1" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.9.0" - audioplayers: - dependency: "direct main" - description: - name: audioplayers - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - audioplayers_android: - dependency: transitive - description: - name: audioplayers_android - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - audioplayers_darwin: - dependency: transitive - description: - name: audioplayers_darwin - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - audioplayers_linux: - dependency: transitive - description: - name: audioplayers_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - audioplayers_platform_interface: - dependency: transitive - description: - name: audioplayers_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - audioplayers_web: - dependency: transitive - description: - name: audioplayers_web - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - audioplayers_windows: - dependency: transitive - description: - name: audioplayers_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - auto_size_text: - dependency: "direct main" - description: - name: auto_size_text - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - build: - dependency: transitive - description: - name: build - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.0" - build_config: - dependency: transitive - description: - name: build_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - build_daemon: - dependency: transitive - description: - name: build_daemon - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - build_runner: - dependency: "direct dev" - description: - name: build_runner - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.3" - built_collection: - dependency: transitive - description: - name: built_collection - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.1" - built_value: - dependency: transitive - description: - name: built_value - url: "https://pub.dartlang.org" - source: hosted - version: "8.4.1" - carousel_slider: - dependency: "direct main" - description: - name: carousel_slider - url: "https://pub.dartlang.org" - source: hosted - version: "4.1.1" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - checked_yaml: - dependency: transitive - description: - name: checked_yaml - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - code_builder: - dependency: transitive - description: - name: code_builder - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.0" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.16.0" - convert: - dependency: transitive - description: - name: convert - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.2" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.2" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.5" - dart_style: - dependency: transitive - description: - name: dart_style - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.3" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.4" - fixnum: - dependency: transitive - description: - name: fixnum - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_launcher_icons: - dependency: "direct main" - description: - name: flutter_launcher_icons - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" - flutter_localizations: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_svg: - dependency: transitive - description: - name: flutter_svg - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.5" - flutter_svg_provider: - dependency: "direct main" - description: - name: flutter_svg_provider - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" - glob: - dependency: transitive - description: - name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - graphs: - dependency: transitive - description: - name: graphs - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.5" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.1" - image: - dependency: transitive - description: - name: image - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" - intl: - dependency: "direct main" - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.17.0" - io: - dependency: transitive - description: - name: io - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.4" - json_annotation: - dependency: transitive - description: - name: json_annotation - url: "https://pub.dartlang.org" - source: hosted - version: "4.6.0" - lints: - dependency: transitive - description: - name: lints - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - logging: - dependency: transitive - description: - name: logging - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - manager_api: - dependency: "direct main" - description: - path: manager_api - relative: true - source: path - version: "1.0.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.12" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.5" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - mime: - dependency: transitive - description: - name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - nested: - dependency: transitive - description: - name: nested - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - openapi_generator: - dependency: "direct main" - description: - name: openapi_generator - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - openapi_generator_annotations: - dependency: "direct main" - description: - name: openapi_generator_annotations - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - openapi_generator_cli: - dependency: "direct main" - description: - name: openapi_generator_cli - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.0" - package_config: - dependency: transitive - description: - name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.2" - path_drawing: - dependency: transitive - description: - name: path_drawing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - path_parsing: - dependency: transitive - description: - name: path_parsing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.20" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.7" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.6" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.0" - photo_view: - dependency: "direct main" - description: - name: photo_view - url: "https://pub.dartlang.org" - source: hosted - version: "0.14.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" - pool: - dependency: transitive - description: - name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.1" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - provider: - dependency: "direct main" - description: - name: provider - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.0" - pub_semver: - dependency: transitive - description: - name: pub_semver - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - pubspec_parse: - dependency: transitive - description: - name: pubspec_parse - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - qr_code_scanner: - dependency: "direct main" - description: - name: qr_code_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - shelf: - dependency: transitive - description: - name: shelf - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.2" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_gen: - dependency: transitive - description: - name: source_gen - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.0" - sqflite: - dependency: "direct main" - description: - name: sqflite - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3+1" - sqflite_common: - dependency: transitive - description: - name: sqflite_common - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.1+1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - stream_transform: - dependency: transitive - description: - name: stream_transform - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - synchronized: - dependency: transitive - description: - name: synchronized - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.0+3" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.12" - timing: - dependency: transitive - description: - name: timing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - watcher: - dependency: transitive - description: - name: watcher - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+2" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.0" - yaml: - dependency: transitive - description: - name: yaml - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.1" -sdks: - dart: ">=2.17.0 <3.0.0" - flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 4dd87dd..85d3222 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,10 +15,10 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.9+18 +version: 2.0.0+19 environment: - sdk: ">=2.19.4 <3.0.0" + sdk: ">=3.1.0 <4.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -33,23 +33,24 @@ dependencies: sdk: flutter qr_code_scanner: ^1.0.1 auto_size_text: ^3.0.0 - openapi_generator_cli: ^4.0.0 - openapi_generator: ^4.0.0 - openapi_generator_annotations: ^4.0.0 + openapi_generator_cli: ^5.0.2 + openapi_generator: ^5.0.2 + openapi_generator_annotations: ^5.0.2 sqflite: - provider: ^6.0.5 - carousel_slider: ^4.2.1 + provider: ^6.1.2 + #carousel_slider: ^4.2.1 #flutter_svg_provider: ^1.0.3 - photo_view: ^0.14.0 - intl: ^0.18.0 - flutter_launcher_icons: ^0.10.0 + photo_view: ^0.15.0 + intl: ^0.19.0 + flutter_launcher_icons: ^0.13.1 #audioplayers: ^2.0.0 - just_audio: ^0.9.34 + just_audio: ^0.9.38 + just_audio_cache: ^0.1.2 flutter_beacon: ^0.5.1 - get: ^4.6.5 - permission_handler: ^8.2.4 + get: ^4.6.6 + permission_handler: ^11.3.1 diacritic: ^0.1.3 - flutter_widget_from_html: ^0.10.1 + flutter_widget_from_html: ^0.15.1 manager_api: path: manager_api @@ -61,7 +62,7 @@ dev_dependencies: flutter_test: sdk: flutter build_runner: - openapi_generator: ^4.0.0 + openapi_generator: ^5.0.2 # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is diff --git a/web/favicon.png b/web/favicon.png index de894a0..2122948 100644 Binary files a/web/favicon.png and b/web/favicon.png differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png index d0a44e8..a3d2761 100644 Binary files a/web/icons/Icon-192.png and b/web/icons/Icon-192.png differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png index 949877a..64bc9e1 100644 Binary files a/web/icons/Icon-512.png and b/web/icons/Icon-512.png differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png index d0a44e8..a3d2761 100644 Binary files a/web/icons/Icon-maskable-192.png and b/web/icons/Icon-maskable-192.png differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png index 949877a..64bc9e1 100644 Binary files a/web/icons/Icon-maskable-512.png and b/web/icons/Icon-maskable-512.png differ