Add pinCode to manager + show devices tab (fort logic)
This commit is contained in:
parent
39bc7ca20e
commit
ff18f37b1b
@ -8,6 +8,7 @@ class ManagerAppContext with ChangeNotifier{
|
|||||||
String? instanceId;
|
String? instanceId;
|
||||||
String? host;
|
String? host;
|
||||||
String? accessToken;
|
String? accessToken;
|
||||||
|
int? pinCode;
|
||||||
Client? clientAPI;
|
Client? clientAPI;
|
||||||
String? currentRoute;
|
String? currentRoute;
|
||||||
ConfigurationDTO? selectedConfiguration;
|
ConfigurationDTO? selectedConfiguration;
|
||||||
|
|||||||
@ -34,8 +34,8 @@ class _DeviceElementState extends State<DeviceElement> {
|
|||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 10,
|
top: 0,
|
||||||
right: 10,
|
right: 0,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 15,
|
width: 15,
|
||||||
height: 15,
|
height: 15,
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:manager_app/Components/loading_common.dart';
|
import 'package:manager_app/Components/loading_common.dart';
|
||||||
import 'package:manager_app/Models/managerContext.dart';
|
import 'package:manager_app/Models/managerContext.dart';
|
||||||
@ -19,17 +20,33 @@ class _DevicesScreenState extends State<DevicesScreen> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final appContext = Provider.of<AppContext>(context);
|
final appContext = Provider.of<AppContext>(context);
|
||||||
Size size = MediaQuery.of(context).size;
|
Size size = MediaQuery.of(context).size;
|
||||||
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
return Container(
|
return Container(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: AlignmentDirectional.topCenter,
|
alignment: AlignmentDirectional.topCenter,
|
||||||
child: FutureBuilder(
|
child: Column(
|
||||||
|
children: [
|
||||||
|
if(managerAppContext.pinCode != null)
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(10.0),
|
||||||
|
child: Align(
|
||||||
|
alignment: AlignmentDirectional.centerStart,
|
||||||
|
child: AutoSizeText(
|
||||||
|
"PinCode: " + managerAppContext.pinCode.toString(),
|
||||||
|
style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.w300),
|
||||||
|
maxLines: 2,
|
||||||
|
maxFontSize: 25.0,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
FutureBuilder(
|
||||||
future: getDevices(appContext),
|
future: getDevices(appContext),
|
||||||
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4),
|
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 6),
|
||||||
itemCount: snapshot.data.length,
|
itemCount: snapshot.data.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return Container(
|
return Container(
|
||||||
@ -55,6 +72,8 @@ class _DevicesScreenState extends State<DevicesScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,10 +15,15 @@ import 'package:manager_app/constants.dart';
|
|||||||
import 'package:manager_app/main.dart';
|
import 'package:manager_app/main.dart';
|
||||||
import 'package:manager_api_new/api.dart';
|
import 'package:manager_api_new/api.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:responsive_framework/responsive_breakpoints.dart';
|
||||||
|
|
||||||
|
|
||||||
class Body extends StatefulWidget {
|
class Body extends StatefulWidget {
|
||||||
Body({Key? key}) : super(key: key);
|
final bool showDevice;
|
||||||
|
Body({
|
||||||
|
Key? key,
|
||||||
|
required this.showDevice
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_BodyState createState() => _BodyState();
|
_BodyState createState() => _BodyState();
|
||||||
@ -28,20 +33,34 @@ class _BodyState extends State<Body> {
|
|||||||
bool isChecked = false;
|
bool isChecked = false;
|
||||||
int currentPosition = 0;
|
int currentPosition = 0;
|
||||||
var selectedElement;
|
var selectedElement;
|
||||||
|
late MenuSection devices;
|
||||||
//MenuSection devices = new MenuSection(name: "Test", type: "devices", order: 0);
|
late MenuSection configurations;
|
||||||
MenuSection configurations = new MenuSection(name: "Visites", type: "configurations", order: 0);
|
late MenuSection resources;
|
||||||
MenuSection resources = new MenuSection(name: "Ressources", type: "resources", order: 1);
|
|
||||||
|
|
||||||
Menu menu = new Menu(title: "MyMuseum");
|
Menu menu = new Menu(title: "MyMuseum");
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
devices = new MenuSection(name: "Appareils", type: "devices", order: 0);
|
||||||
|
configurations = new MenuSection(name: "Visites", type: "configurations", order: widget.showDevice ? 1 : 0);
|
||||||
|
resources = new MenuSection(name: "Ressources", type: "resources", order: widget.showDevice ? 2 : 1);
|
||||||
|
//tabsToShow.add(new Tab(text: "Vidéo en ligne"));
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final appContext = Provider.of<AppContext>(context);
|
final appContext = Provider.of<AppContext>(context);
|
||||||
Size size = MediaQuery.of(context).size;
|
Size size = MediaQuery.of(context).size;
|
||||||
|
|
||||||
menu.sections = <MenuSection>[];
|
menu.sections = <MenuSection>[];
|
||||||
//menu.sections.add(devices);
|
|
||||||
|
if(widget.showDevice) // pour ne pas perturber francoise
|
||||||
|
{
|
||||||
|
menu.sections!.add(devices);
|
||||||
|
}
|
||||||
|
|
||||||
menu.sections!.add(configurations);
|
menu.sections!.add(configurations);
|
||||||
menu.sections!.add(resources);
|
menu.sections!.add(resources);
|
||||||
|
|
||||||
@ -50,6 +69,7 @@ class _BodyState extends State<Body> {
|
|||||||
return Background(
|
return Background(
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
if(!ResponsiveBreakpoints.of(context).equals(TABLET))
|
||||||
// MENU
|
// MENU
|
||||||
Container(
|
Container(
|
||||||
width: size.width * 0.15,
|
width: size.width * 0.15,
|
||||||
@ -165,7 +185,7 @@ class _BodyState extends State<Body> {
|
|||||||
),
|
),
|
||||||
// Main Container
|
// Main Container
|
||||||
Container(
|
Container(
|
||||||
width: size.width * 0.85,
|
width: !ResponsiveBreakpoints.of(context).equals(TABLET) ? size.width * 0.85 : size.width,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(0.0),
|
padding: const EdgeInsets.all(0.0),
|
||||||
child: selectedElement),
|
child: selectedElement),
|
||||||
@ -185,13 +205,11 @@ class _BodyState extends State<Body> {
|
|||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: DevicesScreen()
|
child: DevicesScreen()
|
||||||
);
|
);
|
||||||
break;
|
|
||||||
case 'configurations' :
|
case 'configurations' :
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: ConfigurationsScreen()
|
child: ConfigurationsScreen()
|
||||||
);
|
);
|
||||||
break;
|
|
||||||
case 'resources' :
|
case 'resources' :
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
@ -203,9 +221,7 @@ class _BodyState extends State<Body> {
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return Text('Hellow default');
|
return Text('Hellow default');
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,8 +1,11 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:manager_app/Models/managerContext.dart';
|
||||||
import 'package:manager_app/Models/menu.dart';
|
import 'package:manager_app/Models/menu.dart';
|
||||||
import 'package:manager_app/Models/menuSection.dart';
|
import 'package:manager_app/Models/menuSection.dart';
|
||||||
import 'package:manager_app/Screens/Main/components/body.dart';
|
import 'package:manager_app/Screens/Main/components/body.dart';
|
||||||
|
import 'package:manager_app/app_context.dart';
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
import 'package:responsive_framework/responsive_breakpoints.dart';
|
import 'package:responsive_framework/responsive_breakpoints.dart';
|
||||||
|
|
||||||
class MainScreen extends StatefulWidget {
|
class MainScreen extends StatefulWidget {
|
||||||
@ -15,26 +18,33 @@ class MainScreen extends StatefulWidget {
|
|||||||
class _MainScreenState extends State<MainScreen> {
|
class _MainScreenState extends State<MainScreen> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if(ResponsiveBreakpoints.of(context).equals(DESKTOP)) {
|
final appContext = Provider.of<AppContext>(context);
|
||||||
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
|
|
||||||
|
print(managerAppContext.instanceId);
|
||||||
|
|
||||||
|
var isFortSt = managerAppContext.instanceId == "633ee379d9405f32f166f047";
|
||||||
|
|
||||||
|
if(!ResponsiveBreakpoints.of(context).equals(TABLET) || isFortSt) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Body(),
|
body: Body(showDevice: !isFortSt),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: Text("MyMuseum - Manager tablet and mobile mode"), backgroundColor: kPrimaryColor),
|
appBar: AppBar(title: Text("MyMuseum", style: new TextStyle(color: kPrimaryColor, fontSize: 30, fontWeight: FontWeight.w400, fontFamily: "Helvetica")), backgroundColor: kSecond.withOpacity(0.3), iconTheme: IconThemeData(color: kPrimaryColor)),
|
||||||
drawer: Drawer(
|
drawer: Drawer(
|
||||||
child: getMenu()
|
child: getMenu()
|
||||||
),
|
),
|
||||||
body: Body(),
|
body: Body(showDevice: isFortSt),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getMenu() {
|
getMenu() {
|
||||||
//MenuSection devices = new MenuSection(name: "Test", type: "devices", order: 0);
|
MenuSection devices = new MenuSection(name: "Appareils", type: "devices", order: 0);
|
||||||
MenuSection configurations = new MenuSection(name: "Visites", type: "configurations", order: 0);
|
MenuSection configurations = new MenuSection(name: "Visites", type: "configurations", order: 1);
|
||||||
MenuSection resources = new MenuSection(name: "Ressources", type: "resources", order: 1);
|
MenuSection resources = new MenuSection(name: "Ressources", type: "resources", order: 2);
|
||||||
|
|
||||||
Menu menu = new Menu(title: "MyMuseum");
|
Menu menu = new Menu(title: "MyMuseum");
|
||||||
|
|
||||||
@ -48,6 +58,12 @@ class _MainScreenState extends State<MainScreen> {
|
|||||||
),
|
),
|
||||||
child: Text(menu.title),
|
child: Text(menu.title),
|
||||||
),
|
),
|
||||||
|
ListTile(
|
||||||
|
title: Text(devices.name),
|
||||||
|
onTap: () {
|
||||||
|
// TODO Navigate to configurations screen (by route if possible)
|
||||||
|
},
|
||||||
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(configurations.name),
|
title: Text(configurations.name),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
@ -38,6 +38,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
String pageTitle = "MyMuseum";
|
String pageTitle = "MyMuseum";
|
||||||
String? token;
|
String? token;
|
||||||
String? instanceId;
|
String? instanceId;
|
||||||
|
int? pinCode;
|
||||||
Storage localStorage = window.localStorage;
|
Storage localStorage = window.localStorage;
|
||||||
|
|
||||||
void authenticateTRY(AppContext appContext, bool fromClick) async {
|
void authenticateTRY(AppContext appContext, bool fromClick) async {
|
||||||
@ -63,6 +64,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
|
|
||||||
var accessToken = this.token;
|
var accessToken = this.token;
|
||||||
var instanceId = this.instanceId;
|
var instanceId = this.instanceId;
|
||||||
|
var pinCode = this.pinCode;
|
||||||
print("accessToken");
|
print("accessToken");
|
||||||
print(accessToken);
|
print(accessToken);
|
||||||
if(accessToken == null) {
|
if(accessToken == null) {
|
||||||
@ -79,6 +81,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
if(token != null) {
|
if(token != null) {
|
||||||
accessToken = token.accessToken!;
|
accessToken = token.accessToken!;
|
||||||
instanceId = token.instanceId!;
|
instanceId = token.instanceId!;
|
||||||
|
pinCode = token.pinCode;
|
||||||
|
|
||||||
showNotification(
|
showNotification(
|
||||||
kSuccess, kWhite, 'Connexion réussie', context, null);
|
kSuccess, kWhite, 'Connexion réussie', context, null);
|
||||||
@ -92,8 +95,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
!localStorage.containsKey("token")) {
|
!localStorage.containsKey("token")) {
|
||||||
localStorage.addEntries({"email": email}.entries);
|
localStorage.addEntries({"email": email}.entries);
|
||||||
localStorage.addEntries({"token": token.accessToken!}.entries);
|
localStorage.addEntries({"token": token.accessToken!}.entries);
|
||||||
localStorage.addEntries(
|
localStorage.addEntries({"instanceId": token.instanceId!}.entries);
|
||||||
{"instanceId": token.instanceId!}.entries);
|
if(token.pinCode != null) {
|
||||||
|
localStorage.addEntries({"pinCode": token.pinCode!.toString()}.entries);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
@ -113,6 +118,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
managerAppContext.email = email;
|
managerAppContext.email = email;
|
||||||
managerAppContext.host = host;
|
managerAppContext.host = host;
|
||||||
managerAppContext.instanceId = instanceId;
|
managerAppContext.instanceId = instanceId;
|
||||||
|
managerAppContext.pinCode = pinCode;
|
||||||
managerAppContext.accessToken = accessToken;
|
managerAppContext.accessToken = accessToken;
|
||||||
managerAppContext.clientAPI = clientAPI;
|
managerAppContext.clientAPI = clientAPI;
|
||||||
setAccessToken(accessToken);
|
setAccessToken(accessToken);
|
||||||
@ -184,6 +190,9 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
if(localStorage.containsKey("instanceId")) {
|
if(localStorage.containsKey("instanceId")) {
|
||||||
this.instanceId = localStorage.entries.where((element) => element.key == "instanceId").first.value;
|
this.instanceId = localStorage.entries.where((element) => element.key == "instanceId").first.value;
|
||||||
}
|
}
|
||||||
|
if(localStorage.containsKey("pinCode")) {
|
||||||
|
this.pinCode = int.tryParse(localStorage.entries.where((element) => element.key == "pinCode").first.value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -112,6 +112,39 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
security:
|
security:
|
||||||
- bearer: []
|
- 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}:
|
/api/Configuration/{id}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -670,6 +703,37 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
security:
|
security:
|
||||||
- bearer: []
|
- 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:
|
/api/Resource:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -1211,24 +1275,19 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
security:
|
security:
|
||||||
- bearer: []
|
- bearer: []
|
||||||
/api/Section/beacons/{id}:
|
/api/Section/beacons/{instanceId}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Section
|
- Section
|
||||||
operationId: Section_GetAllBeaconsForInstance
|
operationId: Section_GetAllBeaconsForInstance
|
||||||
parameters:
|
parameters:
|
||||||
- name: instanceId
|
- name: instanceId
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
nullable: true
|
|
||||||
x-position: 1
|
|
||||||
- name: id
|
|
||||||
in: path
|
in: path
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
x-position: 2
|
nullable: true
|
||||||
|
x-position: 1
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: ''
|
description: ''
|
||||||
@ -1704,6 +1763,9 @@ components:
|
|||||||
nullable: true
|
nullable: true
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
pinCode:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
TranslationDTO:
|
TranslationDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -1928,6 +1990,10 @@ components:
|
|||||||
dateCreation:
|
dateCreation:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
pinCode:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
nullable: true
|
||||||
InstanceDTO:
|
InstanceDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -1941,6 +2007,10 @@ components:
|
|||||||
dateCreation:
|
dateCreation:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
pinCode:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
nullable: true
|
||||||
MapDTO:
|
MapDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
@ -2251,6 +2321,10 @@ components:
|
|||||||
instanceId:
|
instanceId:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
pinCode:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
nullable: true
|
||||||
LoginDTO:
|
LoginDTO:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
|||||||
@ -70,6 +70,7 @@ Class | Method | HTTP request | Description
|
|||||||
*ConfigurationApi* | [**configurationDelete**](doc\/ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} |
|
*ConfigurationApi* | [**configurationDelete**](doc\/ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} |
|
||||||
*ConfigurationApi* | [**configurationExport**](doc\/ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export |
|
*ConfigurationApi* | [**configurationExport**](doc\/ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export |
|
||||||
*ConfigurationApi* | [**configurationGet**](doc\/ConfigurationApi.md#configurationget) | **GET** /api/Configuration |
|
*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* | [**configurationGetDetail**](doc\/ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} |
|
||||||
*ConfigurationApi* | [**configurationImport**](doc\/ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import |
|
*ConfigurationApi* | [**configurationImport**](doc\/ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import |
|
||||||
*ConfigurationApi* | [**configurationUpdate**](doc\/ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration |
|
*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* | [**instanceDeleteInstance**](doc\/InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} |
|
||||||
*InstanceApi* | [**instanceGet**](doc\/InstanceApi.md#instanceget) | **GET** /api/Instance |
|
*InstanceApi* | [**instanceGet**](doc\/InstanceApi.md#instanceget) | **GET** /api/Instance |
|
||||||
*InstanceApi* | [**instanceGetDetail**](doc\/InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} |
|
*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 |
|
*InstanceApi* | [**instanceUpdateinstance**](doc\/InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance |
|
||||||
*ResourceApi* | [**resourceCreate**](doc\/ResourceApi.md#resourcecreate) | **POST** /api/Resource |
|
*ResourceApi* | [**resourceCreate**](doc\/ResourceApi.md#resourcecreate) | **POST** /api/Resource |
|
||||||
*ResourceApi* | [**resourceDelete**](doc\/ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} |
|
*ResourceApi* | [**resourceDelete**](doc\/ResourceApi.md#resourcedelete) | **DELETE** /api/Resource/{id} |
|
||||||
@ -95,7 +97,7 @@ Class | Method | HTTP request | Description
|
|||||||
*SectionApi* | [**sectionDelete**](doc\/SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
*SectionApi* | [**sectionDelete**](doc\/SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
||||||
*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
*SectionApi* | [**sectionDeleteAllForConfiguration**](doc\/SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
||||||
*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section |
|
*SectionApi* | [**sectionGet**](doc\/SectionApi.md#sectionget) | **GET** /api/Section |
|
||||||
*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc\/SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{id} |
|
*SectionApi* | [**sectionGetAllBeaconsForInstance**](doc\/SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} |
|
||||||
*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
*SectionApi* | [**sectionGetAllSectionSubSections**](doc\/SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
||||||
*SectionApi* | [**sectionGetArticleDTO**](doc\/SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
*SectionApi* | [**sectionGetArticleDTO**](doc\/SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
||||||
*SectionApi* | [**sectionGetDetail**](doc\/SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
|
*SectionApi* | [**sectionGetDetail**](doc\/SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
|
||||||
|
|||||||
@ -13,6 +13,7 @@ Method | HTTP request | Description
|
|||||||
[**configurationDelete**](ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} |
|
[**configurationDelete**](ConfigurationApi.md#configurationdelete) | **DELETE** /api/Configuration/{id} |
|
||||||
[**configurationExport**](ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export |
|
[**configurationExport**](ConfigurationApi.md#configurationexport) | **GET** /api/Configuration/{id}/export |
|
||||||
[**configurationGet**](ConfigurationApi.md#configurationget) | **GET** /api/Configuration |
|
[**configurationGet**](ConfigurationApi.md#configurationget) | **GET** /api/Configuration |
|
||||||
|
[**configurationGetConfigurationsByPinCode**](ConfigurationApi.md#configurationgetconfigurationsbypincode) | **GET** /api/Configuration/byPin |
|
||||||
[**configurationGetDetail**](ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} |
|
[**configurationGetDetail**](ConfigurationApi.md#configurationgetdetail) | **GET** /api/Configuration/{id} |
|
||||||
[**configurationImport**](ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import |
|
[**configurationImport**](ConfigurationApi.md#configurationimport) | **POST** /api/Configuration/import |
|
||||||
[**configurationUpdate**](ConfigurationApi.md#configurationupdate) | **PUT** /api/Configuration |
|
[**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)
|
[[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<ConfigurationDTO> configurationGetConfigurationsByPinCode(pinCode)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:manager_api_new/api.dart';
|
||||||
|
// TODO Configure OAuth2 access token for authorization: bearer
|
||||||
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
|
final api_instance = 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>**](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**
|
# **configurationGetDetail**
|
||||||
> ConfigurationDTO configurationGetDetail(id)
|
> ConfigurationDTO configurationGetDetail(id)
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,7 @@ Name | Type | Description | Notes
|
|||||||
**isOffline** | **bool** | | [optional]
|
**isOffline** | **bool** | | [optional]
|
||||||
**instanceId** | **String** | | [optional]
|
**instanceId** | **String** | | [optional]
|
||||||
**sectionIds** | **List<String>** | | [optional] [default to const []]
|
**sectionIds** | **List<String>** | | [optional] [default to const []]
|
||||||
|
**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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,7 @@ Name | Type | Description | Notes
|
|||||||
**isOffline** | **bool** | | [optional]
|
**isOffline** | **bool** | | [optional]
|
||||||
**instanceId** | **String** | | [optional]
|
**instanceId** | **String** | | [optional]
|
||||||
**sectionIds** | **List<String>** | | [optional] [default to const []]
|
**sectionIds** | **List<String>** | | [optional] [default to const []]
|
||||||
|
**pinCode** | **int** | | [optional]
|
||||||
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
|
**sections** | [**List<SectionDTO>**](SectionDTO.md) | | [optional] [default to const []]
|
||||||
**resources** | [**List<ResourceDTO>**](ResourceDTO.md) | | [optional] [default to const []]
|
**resources** | [**List<ResourceDTO>**](ResourceDTO.md) | | [optional] [default to const []]
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ Name | Type | Description | Notes
|
|||||||
**id** | **String** | | [optional]
|
**id** | **String** | | [optional]
|
||||||
**name** | **String** | | [optional]
|
**name** | **String** | | [optional]
|
||||||
**dateCreation** | [**DateTime**](DateTime.md) | | [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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ Method | HTTP request | Description
|
|||||||
[**instanceDeleteInstance**](InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} |
|
[**instanceDeleteInstance**](InstanceApi.md#instancedeleteinstance) | **DELETE** /api/Instance/{id} |
|
||||||
[**instanceGet**](InstanceApi.md#instanceget) | **GET** /api/Instance |
|
[**instanceGet**](InstanceApi.md#instanceget) | **GET** /api/Instance |
|
||||||
[**instanceGetDetail**](InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} |
|
[**instanceGetDetail**](InstanceApi.md#instancegetdetail) | **GET** /api/Instance/{id} |
|
||||||
|
[**instanceGetInstanceByPinCode**](InstanceApi.md#instancegetinstancebypincode) | **GET** /api/Instance/byPin |
|
||||||
[**instanceUpdateinstance**](InstanceApi.md#instanceupdateinstance) | **PUT** /api/Instance |
|
[**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)
|
[[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_new/api.dart';
|
||||||
|
// TODO Configure OAuth2 access token for authorization: bearer
|
||||||
|
//defaultApiClient.getAuthentication<OAuth>('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**
|
# **instanceUpdateinstance**
|
||||||
> InstanceDTO instanceUpdateinstance(instance)
|
> InstanceDTO instanceUpdateinstance(instance)
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ Name | Type | Description | Notes
|
|||||||
**id** | **String** | | [optional]
|
**id** | **String** | | [optional]
|
||||||
**name** | **String** | | [optional]
|
**name** | **String** | | [optional]
|
||||||
**dateCreation** | [**DateTime**](DateTime.md) | | [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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ Method | HTTP request | Description
|
|||||||
[**sectionDelete**](SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
[**sectionDelete**](SectionApi.md#sectiondelete) | **DELETE** /api/Section/{id} |
|
||||||
[**sectionDeleteAllForConfiguration**](SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
[**sectionDeleteAllForConfiguration**](SectionApi.md#sectiondeleteallforconfiguration) | **DELETE** /api/Section/configuration/{id} |
|
||||||
[**sectionGet**](SectionApi.md#sectionget) | **GET** /api/Section |
|
[**sectionGet**](SectionApi.md#sectionget) | **GET** /api/Section |
|
||||||
[**sectionGetAllBeaconsForInstance**](SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{id} |
|
[**sectionGetAllBeaconsForInstance**](SectionApi.md#sectiongetallbeaconsforinstance) | **GET** /api/Section/beacons/{instanceId} |
|
||||||
[**sectionGetAllSectionSubSections**](SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
[**sectionGetAllSectionSubSections**](SectionApi.md#sectiongetallsectionsubsections) | **GET** /api/Section/{id}/subsections |
|
||||||
[**sectionGetArticleDTO**](SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
[**sectionGetArticleDTO**](SectionApi.md#sectiongetarticledto) | **GET** /api/Section/ArticleDTO |
|
||||||
[**sectionGetDetail**](SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
|
[**sectionGetDetail**](SectionApi.md#sectiongetdetail) | **GET** /api/Section/{id} |
|
||||||
@ -202,7 +202,7 @@ Name | Type | Description | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[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**
|
# **sectionGetAllBeaconsForInstance**
|
||||||
> List<SectionDTO> sectionGetAllBeaconsForInstance(id, instanceId)
|
> List<SectionDTO> sectionGetAllBeaconsForInstance(instanceId)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -213,11 +213,10 @@ import 'package:manager_api_new/api.dart';
|
|||||||
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
final api_instance = SectionApi();
|
final api_instance = SectionApi();
|
||||||
final id = id_example; // String |
|
|
||||||
final instanceId = instanceId_example; // String |
|
final instanceId = instanceId_example; // String |
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final result = api_instance.sectionGetAllBeaconsForInstance(id, instanceId);
|
final result = api_instance.sectionGetAllBeaconsForInstance(instanceId);
|
||||||
print(result);
|
print(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Exception when calling SectionApi->sectionGetAllBeaconsForInstance: $e\n');
|
print('Exception when calling SectionApi->sectionGetAllBeaconsForInstance: $e\n');
|
||||||
@ -228,8 +227,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**id** | **String**| |
|
**instanceId** | **String**| |
|
||||||
**instanceId** | **String**| | [optional]
|
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ Name | Type | Description | Notes
|
|||||||
**expiresIn** | **int** | | [optional]
|
**expiresIn** | **int** | | [optional]
|
||||||
**expiration** | [**DateTime**](DateTime.md) | | [optional]
|
**expiration** | [**DateTime**](DateTime.md) | | [optional]
|
||||||
**instanceId** | **String** | | [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)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|||||||
@ -219,6 +219,60 @@ class ConfigurationApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Performs an HTTP 'GET /api/Configuration/byPin' operation and returns the [Response].
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [int] pinCode:
|
||||||
|
Future<Response> configurationGetConfigurationsByPinCodeWithHttpInfo({ int? pinCode, }) async {
|
||||||
|
// ignore: prefer_const_declarations
|
||||||
|
final path = r'/api/Configuration/byPin';
|
||||||
|
|
||||||
|
// ignore: prefer_final_locals
|
||||||
|
Object? postBody;
|
||||||
|
|
||||||
|
final queryParams = <QueryParam>[];
|
||||||
|
final headerParams = <String, String>{};
|
||||||
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
|
if (pinCode != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'pinCode', pinCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
const contentTypes = <String>[];
|
||||||
|
|
||||||
|
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
path,
|
||||||
|
'GET',
|
||||||
|
queryParams,
|
||||||
|
postBody,
|
||||||
|
headerParams,
|
||||||
|
formParams,
|
||||||
|
contentTypes.isEmpty ? null : contentTypes.first,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [int] pinCode:
|
||||||
|
Future<List<ConfigurationDTO>?> 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<ConfigurationDTO>') as List)
|
||||||
|
.cast<ConfigurationDTO>()
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /api/Configuration/{id}' operation and returns the [Response].
|
/// Performs an HTTP 'GET /api/Configuration/{id}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
|
|||||||
@ -203,6 +203,57 @@ class InstanceApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Performs an HTTP 'GET /api/Instance/byPin' operation and returns the [Response].
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [int] pinCode:
|
||||||
|
Future<Response> instanceGetInstanceByPinCodeWithHttpInfo({ int? pinCode, }) async {
|
||||||
|
// ignore: prefer_const_declarations
|
||||||
|
final path = r'/api/Instance/byPin';
|
||||||
|
|
||||||
|
// ignore: prefer_final_locals
|
||||||
|
Object? postBody;
|
||||||
|
|
||||||
|
final queryParams = <QueryParam>[];
|
||||||
|
final headerParams = <String, String>{};
|
||||||
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
|
if (pinCode != null) {
|
||||||
|
queryParams.addAll(_queryParams('', 'pinCode', pinCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
const contentTypes = <String>[];
|
||||||
|
|
||||||
|
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
path,
|
||||||
|
'GET',
|
||||||
|
queryParams,
|
||||||
|
postBody,
|
||||||
|
headerParams,
|
||||||
|
formParams,
|
||||||
|
contentTypes.isEmpty ? null : contentTypes.first,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Parameters:
|
||||||
|
///
|
||||||
|
/// * [int] pinCode:
|
||||||
|
Future<InstanceDTO?> 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].
|
/// Performs an HTTP 'PUT /api/Instance' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
|
|||||||
@ -213,16 +213,14 @@ class SectionApi {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs an HTTP 'GET /api/Section/beacons/{id}' operation and returns the [Response].
|
/// Performs an HTTP 'GET /api/Section/beacons/{instanceId}' operation and returns the [Response].
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] id (required):
|
/// * [String] instanceId (required):
|
||||||
///
|
Future<Response> sectionGetAllBeaconsForInstanceWithHttpInfo(String instanceId,) async {
|
||||||
/// * [String] instanceId:
|
|
||||||
Future<Response> sectionGetAllBeaconsForInstanceWithHttpInfo(String id, { String? instanceId, }) async {
|
|
||||||
// ignore: prefer_const_declarations
|
// ignore: prefer_const_declarations
|
||||||
final path = r'/api/Section/beacons/{id}'
|
final path = r'/api/Section/beacons/{instanceId}'
|
||||||
.replaceAll('{id}', id);
|
.replaceAll('{instanceId}', instanceId);
|
||||||
|
|
||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
Object? postBody;
|
Object? postBody;
|
||||||
@ -231,10 +229,6 @@ class SectionApi {
|
|||||||
final headerParams = <String, String>{};
|
final headerParams = <String, String>{};
|
||||||
final formParams = <String, String>{};
|
final formParams = <String, String>{};
|
||||||
|
|
||||||
if (instanceId != null) {
|
|
||||||
queryParams.addAll(_queryParams('', 'instanceId', instanceId));
|
|
||||||
}
|
|
||||||
|
|
||||||
const contentTypes = <String>[];
|
const contentTypes = <String>[];
|
||||||
|
|
||||||
|
|
||||||
@ -251,11 +245,9 @@ class SectionApi {
|
|||||||
|
|
||||||
/// Parameters:
|
/// Parameters:
|
||||||
///
|
///
|
||||||
/// * [String] id (required):
|
/// * [String] instanceId (required):
|
||||||
///
|
Future<List<SectionDTO>?> sectionGetAllBeaconsForInstance(String instanceId,) async {
|
||||||
/// * [String] instanceId:
|
final response = await sectionGetAllBeaconsForInstanceWithHttpInfo(instanceId,);
|
||||||
Future<List<SectionDTO>?> sectionGetAllBeaconsForInstance(String id, { String? instanceId, }) async {
|
|
||||||
final response = await sectionGetAllBeaconsForInstanceWithHttpInfo(id, instanceId: instanceId, );
|
|
||||||
if (response.statusCode >= HttpStatus.badRequest) {
|
if (response.statusCode >= HttpStatus.badRequest) {
|
||||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class ConfigurationDTO {
|
|||||||
this.isOffline,
|
this.isOffline,
|
||||||
this.instanceId,
|
this.instanceId,
|
||||||
this.sectionIds = const [],
|
this.sectionIds = const [],
|
||||||
|
this.pinCode,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? id;
|
String? id;
|
||||||
@ -81,6 +82,14 @@ class ConfigurationDTO {
|
|||||||
|
|
||||||
List<String>? sectionIds;
|
List<String>? sectionIds;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? pinCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is ConfigurationDTO &&
|
||||||
other.id == id &&
|
other.id == id &&
|
||||||
@ -96,7 +105,8 @@ class ConfigurationDTO {
|
|||||||
other.isTablet == isTablet &&
|
other.isTablet == isTablet &&
|
||||||
other.isOffline == isOffline &&
|
other.isOffline == isOffline &&
|
||||||
other.instanceId == instanceId &&
|
other.instanceId == instanceId &&
|
||||||
other.sectionIds == sectionIds;
|
other.sectionIds == sectionIds &&
|
||||||
|
other.pinCode == pinCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -114,10 +124,11 @@ class ConfigurationDTO {
|
|||||||
(isTablet == null ? 0 : isTablet!.hashCode) +
|
(isTablet == null ? 0 : isTablet!.hashCode) +
|
||||||
(isOffline == null ? 0 : isOffline!.hashCode) +
|
(isOffline == null ? 0 : isOffline!.hashCode) +
|
||||||
(instanceId == null ? 0 : instanceId!.hashCode) +
|
(instanceId == null ? 0 : instanceId!.hashCode) +
|
||||||
(sectionIds == null ? 0 : sectionIds!.hashCode);
|
(sectionIds == null ? 0 : sectionIds!.hashCode) +
|
||||||
|
(pinCode == null ? 0 : pinCode!.hashCode);
|
||||||
|
|
||||||
@override
|
@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, pinCode=$pinCode]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -191,6 +202,11 @@ class ConfigurationDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'sectionIds'] = null;
|
json[r'sectionIds'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.pinCode != null) {
|
||||||
|
json[r'pinCode'] = this.pinCode;
|
||||||
|
} else {
|
||||||
|
json[r'pinCode'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,6 +247,7 @@ class ConfigurationDTO {
|
|||||||
sectionIds: json[r'sectionIds'] is List
|
sectionIds: json[r'sectionIds'] is List
|
||||||
? (json[r'sectionIds'] as List).cast<String>()
|
? (json[r'sectionIds'] as List).cast<String>()
|
||||||
: const [],
|
: const [],
|
||||||
|
pinCode: mapValueOfType<int>(json, r'pinCode'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -27,6 +27,7 @@ class ExportConfigurationDTO {
|
|||||||
this.isOffline,
|
this.isOffline,
|
||||||
this.instanceId,
|
this.instanceId,
|
||||||
this.sectionIds = const [],
|
this.sectionIds = const [],
|
||||||
|
this.pinCode,
|
||||||
this.sections = const [],
|
this.sections = const [],
|
||||||
this.resources = const [],
|
this.resources = const [],
|
||||||
});
|
});
|
||||||
@ -83,6 +84,14 @@ class ExportConfigurationDTO {
|
|||||||
|
|
||||||
List<String>? sectionIds;
|
List<String>? sectionIds;
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? pinCode;
|
||||||
|
|
||||||
List<SectionDTO>? sections;
|
List<SectionDTO>? sections;
|
||||||
|
|
||||||
List<ResourceDTO>? resources;
|
List<ResourceDTO>? resources;
|
||||||
@ -103,6 +112,7 @@ class ExportConfigurationDTO {
|
|||||||
other.isOffline == isOffline &&
|
other.isOffline == isOffline &&
|
||||||
other.instanceId == instanceId &&
|
other.instanceId == instanceId &&
|
||||||
other.sectionIds == sectionIds &&
|
other.sectionIds == sectionIds &&
|
||||||
|
other.pinCode == pinCode &&
|
||||||
other.sections == sections &&
|
other.sections == sections &&
|
||||||
other.resources == resources;
|
other.resources == resources;
|
||||||
|
|
||||||
@ -123,11 +133,12 @@ class ExportConfigurationDTO {
|
|||||||
(isOffline == null ? 0 : isOffline!.hashCode) +
|
(isOffline == null ? 0 : isOffline!.hashCode) +
|
||||||
(instanceId == null ? 0 : instanceId!.hashCode) +
|
(instanceId == null ? 0 : instanceId!.hashCode) +
|
||||||
(sectionIds == null ? 0 : sectionIds!.hashCode) +
|
(sectionIds == null ? 0 : sectionIds!.hashCode) +
|
||||||
|
(pinCode == null ? 0 : pinCode!.hashCode) +
|
||||||
(sections == null ? 0 : sections!.hashCode) +
|
(sections == null ? 0 : sections!.hashCode) +
|
||||||
(resources == null ? 0 : resources!.hashCode);
|
(resources == null ? 0 : resources!.hashCode);
|
||||||
|
|
||||||
@override
|
@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, pinCode=$pinCode, sections=$sections, resources=$resources]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -201,6 +212,11 @@ class ExportConfigurationDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'sectionIds'] = null;
|
json[r'sectionIds'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.pinCode != null) {
|
||||||
|
json[r'pinCode'] = this.pinCode;
|
||||||
|
} else {
|
||||||
|
json[r'pinCode'] = null;
|
||||||
|
}
|
||||||
if (this.sections != null) {
|
if (this.sections != null) {
|
||||||
json[r'sections'] = this.sections;
|
json[r'sections'] = this.sections;
|
||||||
} else {
|
} else {
|
||||||
@ -251,6 +267,7 @@ class ExportConfigurationDTO {
|
|||||||
sectionIds: json[r'sectionIds'] is List
|
sectionIds: json[r'sectionIds'] is List
|
||||||
? (json[r'sectionIds'] as List).cast<String>()
|
? (json[r'sectionIds'] as List).cast<String>()
|
||||||
: const [],
|
: const [],
|
||||||
|
pinCode: mapValueOfType<int>(json, r'pinCode'),
|
||||||
sections: SectionDTO.listFromJson(json[r'sections']),
|
sections: SectionDTO.listFromJson(json[r'sections']),
|
||||||
resources: ResourceDTO.listFromJson(json[r'resources']),
|
resources: ResourceDTO.listFromJson(json[r'resources']),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -16,6 +16,7 @@ class Instance {
|
|||||||
this.id,
|
this.id,
|
||||||
this.name,
|
this.name,
|
||||||
this.dateCreation,
|
this.dateCreation,
|
||||||
|
this.pinCode,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? id;
|
String? id;
|
||||||
@ -30,21 +31,25 @@ class Instance {
|
|||||||
///
|
///
|
||||||
DateTime? dateCreation;
|
DateTime? dateCreation;
|
||||||
|
|
||||||
|
int? pinCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is Instance &&
|
bool operator ==(Object other) => identical(this, other) || other is Instance &&
|
||||||
other.id == id &&
|
other.id == id &&
|
||||||
other.name == name &&
|
other.name == name &&
|
||||||
other.dateCreation == dateCreation;
|
other.dateCreation == dateCreation &&
|
||||||
|
other.pinCode == pinCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(id == null ? 0 : id!.hashCode) +
|
(id == null ? 0 : id!.hashCode) +
|
||||||
(name == null ? 0 : name!.hashCode) +
|
(name == null ? 0 : name!.hashCode) +
|
||||||
(dateCreation == null ? 0 : dateCreation!.hashCode);
|
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
||||||
|
(pinCode == null ? 0 : pinCode!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation]';
|
String toString() => 'Instance[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -63,6 +68,11 @@ class Instance {
|
|||||||
} else {
|
} else {
|
||||||
json[r'dateCreation'] = null;
|
json[r'dateCreation'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.pinCode != null) {
|
||||||
|
json[r'pinCode'] = this.pinCode;
|
||||||
|
} else {
|
||||||
|
json[r'pinCode'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,6 +98,7 @@ class Instance {
|
|||||||
id: mapValueOfType<String>(json, r'id'),
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
name: mapValueOfType<String>(json, r'name'),
|
name: mapValueOfType<String>(json, r'name'),
|
||||||
dateCreation: mapDateTime(json, r'dateCreation', ''),
|
dateCreation: mapDateTime(json, r'dateCreation', ''),
|
||||||
|
pinCode: mapValueOfType<int>(json, r'pinCode'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -16,6 +16,7 @@ class InstanceDTO {
|
|||||||
this.id,
|
this.id,
|
||||||
this.name,
|
this.name,
|
||||||
this.dateCreation,
|
this.dateCreation,
|
||||||
|
this.pinCode,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? id;
|
String? id;
|
||||||
@ -30,21 +31,25 @@ class InstanceDTO {
|
|||||||
///
|
///
|
||||||
DateTime? dateCreation;
|
DateTime? dateCreation;
|
||||||
|
|
||||||
|
int? pinCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is InstanceDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is InstanceDTO &&
|
||||||
other.id == id &&
|
other.id == id &&
|
||||||
other.name == name &&
|
other.name == name &&
|
||||||
other.dateCreation == dateCreation;
|
other.dateCreation == dateCreation &&
|
||||||
|
other.pinCode == pinCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
// ignore: unnecessary_parenthesis
|
// ignore: unnecessary_parenthesis
|
||||||
(id == null ? 0 : id!.hashCode) +
|
(id == null ? 0 : id!.hashCode) +
|
||||||
(name == null ? 0 : name!.hashCode) +
|
(name == null ? 0 : name!.hashCode) +
|
||||||
(dateCreation == null ? 0 : dateCreation!.hashCode);
|
(dateCreation == null ? 0 : dateCreation!.hashCode) +
|
||||||
|
(pinCode == null ? 0 : pinCode!.hashCode);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation]';
|
String toString() => 'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode]';
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -63,6 +68,11 @@ class InstanceDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'dateCreation'] = null;
|
json[r'dateCreation'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.pinCode != null) {
|
||||||
|
json[r'pinCode'] = this.pinCode;
|
||||||
|
} else {
|
||||||
|
json[r'pinCode'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,6 +98,7 @@ class InstanceDTO {
|
|||||||
id: mapValueOfType<String>(json, r'id'),
|
id: mapValueOfType<String>(json, r'id'),
|
||||||
name: mapValueOfType<String>(json, r'name'),
|
name: mapValueOfType<String>(json, r'name'),
|
||||||
dateCreation: mapDateTime(json, r'dateCreation', ''),
|
dateCreation: mapDateTime(json, r'dateCreation', ''),
|
||||||
|
pinCode: mapValueOfType<int>(json, r'pinCode'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -20,6 +20,7 @@ class TokenDTO {
|
|||||||
this.expiresIn,
|
this.expiresIn,
|
||||||
this.expiration,
|
this.expiration,
|
||||||
this.instanceId,
|
this.instanceId,
|
||||||
|
this.pinCode,
|
||||||
});
|
});
|
||||||
|
|
||||||
String? accessToken;
|
String? accessToken;
|
||||||
@ -48,6 +49,8 @@ class TokenDTO {
|
|||||||
|
|
||||||
String? instanceId;
|
String? instanceId;
|
||||||
|
|
||||||
|
int? pinCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is TokenDTO &&
|
bool operator ==(Object other) => identical(this, other) || other is TokenDTO &&
|
||||||
other.accessToken == accessToken &&
|
other.accessToken == accessToken &&
|
||||||
@ -56,7 +59,8 @@ class TokenDTO {
|
|||||||
other.tokenType == tokenType &&
|
other.tokenType == tokenType &&
|
||||||
other.expiresIn == expiresIn &&
|
other.expiresIn == expiresIn &&
|
||||||
other.expiration == expiration &&
|
other.expiration == expiration &&
|
||||||
other.instanceId == instanceId;
|
other.instanceId == instanceId &&
|
||||||
|
other.pinCode == pinCode;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
@ -67,10 +71,11 @@ class TokenDTO {
|
|||||||
(tokenType == null ? 0 : tokenType!.hashCode) +
|
(tokenType == null ? 0 : tokenType!.hashCode) +
|
||||||
(expiresIn == null ? 0 : expiresIn!.hashCode) +
|
(expiresIn == null ? 0 : expiresIn!.hashCode) +
|
||||||
(expiration == null ? 0 : expiration!.hashCode) +
|
(expiration == null ? 0 : expiration!.hashCode) +
|
||||||
(instanceId == null ? 0 : instanceId!.hashCode);
|
(instanceId == null ? 0 : instanceId!.hashCode) +
|
||||||
|
(pinCode == null ? 0 : pinCode!.hashCode);
|
||||||
|
|
||||||
@override
|
@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<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
final json = <String, dynamic>{};
|
final json = <String, dynamic>{};
|
||||||
@ -109,6 +114,11 @@ class TokenDTO {
|
|||||||
} else {
|
} else {
|
||||||
json[r'instanceId'] = null;
|
json[r'instanceId'] = null;
|
||||||
}
|
}
|
||||||
|
if (this.pinCode != null) {
|
||||||
|
json[r'pinCode'] = this.pinCode;
|
||||||
|
} else {
|
||||||
|
json[r'pinCode'] = null;
|
||||||
|
}
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,6 +148,7 @@ class TokenDTO {
|
|||||||
expiresIn: mapValueOfType<int>(json, r'expires_in'),
|
expiresIn: mapValueOfType<int>(json, r'expires_in'),
|
||||||
expiration: mapDateTime(json, r'expiration', ''),
|
expiration: mapDateTime(json, r'expiration', ''),
|
||||||
instanceId: mapValueOfType<String>(json, r'instanceId'),
|
instanceId: mapValueOfType<String>(json, r'instanceId'),
|
||||||
|
pinCode: mapValueOfType<int>(json, r'pinCode'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user