new queries y mutuations for hub

This commit is contained in:
José Salazar
2026-01-29 14:18:02 -05:00
parent 761a2a6680
commit 8121912805
11 changed files with 18197 additions and 17627 deletions

View File

@@ -1,16 +1,16 @@
# Basic Usage
```dart
ExampleConnector.instance.listTaxForms(listTaxFormsVariables).execute();
ExampleConnector.instance.getTaxFormById(getTaxFormByIdVariables).execute();
ExampleConnector.instance.getTaxFormsByStaffId(getTaxFormsByStaffIdVariables).execute();
ExampleConnector.instance.listTaxFormsWhere(listTaxFormsWhereVariables).execute();
ExampleConnector.instance.listClientFeedbacks(listClientFeedbacksVariables).execute();
ExampleConnector.instance.getClientFeedbackById(getClientFeedbackByIdVariables).execute();
ExampleConnector.instance.listClientFeedbacksByBusinessId(listClientFeedbacksByBusinessIdVariables).execute();
ExampleConnector.instance.listClientFeedbacksByVendorId(listClientFeedbacksByVendorIdVariables).execute();
ExampleConnector.instance.listClientFeedbacksByBusinessAndVendor(listClientFeedbacksByBusinessAndVendorVariables).execute();
ExampleConnector.instance.filterClientFeedbacks(filterClientFeedbacksVariables).execute();
ExampleConnector.instance.createCourse(createCourseVariables).execute();
ExampleConnector.instance.updateCourse(updateCourseVariables).execute();
ExampleConnector.instance.deleteCourse(deleteCourseVariables).execute();
ExampleConnector.instance.listHubs().execute();
ExampleConnector.instance.getHubById(getHubByIdVariables).execute();
ExampleConnector.instance.getHubsByOwnerId(getHubsByOwnerIdVariables).execute();
ExampleConnector.instance.filterHubs(filterHubsVariables).execute();
ExampleConnector.instance.createLevel(createLevelVariables).execute();
ExampleConnector.instance.updateLevel(updateLevelVariables).execute();
ExampleConnector.instance.deleteLevel(deleteLevelVariables).execute();
```
@@ -23,8 +23,8 @@ Optional fields can be discovered based on classes that have `Optional` object t
This is an example of a mutation with an optional field:
```dart
await ExampleConnector.instance.listStaffDocumentsByStatus({ ... })
.offset(...)
await ExampleConnector.instance.updateVendorBenefitPlan({ ... })
.vendorId(...)
.execute();
```

View File

@@ -4,14 +4,31 @@ class CreateTeamHubVariablesBuilder {
String teamId;
String hubName;
String address;
Optional<String> _placeId = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _latitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _longitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _street = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _country = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _zipCode = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _managerName = Optional.optional(nativeFromJson, nativeToJson);
Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson);
Optional<AnyValue> _departments = Optional.optional(AnyValue.fromJson, defaultSerializer);
final FirebaseDataConnect _dataConnect; CreateTeamHubVariablesBuilder city(String? t) {
final FirebaseDataConnect _dataConnect; CreateTeamHubVariablesBuilder placeId(String? t) {
_placeId.value = t;
return this;
}
CreateTeamHubVariablesBuilder latitude(double? t) {
_latitude.value = t;
return this;
}
CreateTeamHubVariablesBuilder longitude(double? t) {
_longitude.value = t;
return this;
}
CreateTeamHubVariablesBuilder city(String? t) {
_city.value = t;
return this;
}
@@ -19,6 +36,14 @@ class CreateTeamHubVariablesBuilder {
_state.value = t;
return this;
}
CreateTeamHubVariablesBuilder street(String? t) {
_street.value = t;
return this;
}
CreateTeamHubVariablesBuilder country(String? t) {
_country.value = t;
return this;
}
CreateTeamHubVariablesBuilder zipCode(String? t) {
_zipCode.value = t;
return this;
@@ -44,7 +69,7 @@ class CreateTeamHubVariablesBuilder {
}
MutationRef<CreateTeamHubData, CreateTeamHubVariables> ref() {
CreateTeamHubVariables vars= CreateTeamHubVariables(teamId: teamId,hubName: hubName,address: address,city: _city,state: _state,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,);
CreateTeamHubVariables vars= CreateTeamHubVariables(teamId: teamId,hubName: hubName,address: address,placeId: _placeId,latitude: _latitude,longitude: _longitude,city: _city,state: _state,street: _street,country: _country,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,);
return _dataConnect.mutation("createTeamHub", dataDeserializer, varsSerializer, vars);
}
}
@@ -122,8 +147,13 @@ class CreateTeamHubVariables {
final String teamId;
final String hubName;
final String address;
late final Optional<String>placeId;
late final Optional<double>latitude;
late final Optional<double>longitude;
late final Optional<String>city;
late final Optional<String>state;
late final Optional<String>street;
late final Optional<String>country;
late final Optional<String>zipCode;
late final Optional<String>managerName;
late final Optional<bool>isActive;
@@ -139,6 +169,18 @@ class CreateTeamHubVariables {
placeId = Optional.optional(nativeFromJson, nativeToJson);
placeId.value = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']);
latitude = Optional.optional(nativeFromJson, nativeToJson);
latitude.value = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']);
longitude = Optional.optional(nativeFromJson, nativeToJson);
longitude.value = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']);
city = Optional.optional(nativeFromJson, nativeToJson);
city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']);
@@ -147,6 +189,14 @@ class CreateTeamHubVariables {
state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']);
street = Optional.optional(nativeFromJson, nativeToJson);
street.value = json['street'] == null ? null : nativeFromJson<String>(json['street']);
country = Optional.optional(nativeFromJson, nativeToJson);
country.value = json['country'] == null ? null : nativeFromJson<String>(json['country']);
zipCode = Optional.optional(nativeFromJson, nativeToJson);
zipCode.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']);
@@ -176,8 +226,13 @@ class CreateTeamHubVariables {
return teamId == otherTyped.teamId &&
hubName == otherTyped.hubName &&
address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName &&
isActive == otherTyped.isActive &&
@@ -185,7 +240,7 @@ class CreateTeamHubVariables {
}
@override
int get hashCode => Object.hashAll([teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
int get hashCode => Object.hashAll([teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() {
@@ -193,12 +248,27 @@ class CreateTeamHubVariables {
json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address);
if(placeId.state == OptionalState.set) {
json['placeId'] = placeId.toJson();
}
if(latitude.state == OptionalState.set) {
json['latitude'] = latitude.toJson();
}
if(longitude.state == OptionalState.set) {
json['longitude'] = longitude.toJson();
}
if(city.state == OptionalState.set) {
json['city'] = city.toJson();
}
if(state.state == OptionalState.set) {
json['state'] = state.toJson();
}
if(street.state == OptionalState.set) {
json['street'] = street.toJson();
}
if(country.state == OptionalState.set) {
json['country'] = country.toJson();
}
if(zipCode.state == OptionalState.set) {
json['zipCode'] = zipCode.toJson();
}
@@ -218,8 +288,13 @@ class CreateTeamHubVariables {
required this.teamId,
required this.hubName,
required this.address,
required this.placeId,
required this.latitude,
required this.longitude,
required this.city,
required this.state,
required this.street,
required this.country,
required this.zipCode,
required this.managerName,
required this.isActive,

View File

@@ -23,30 +23,34 @@ class GetTeamHubByIdTeamHub {
final String teamId;
final String hubName;
final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city;
final String? state;
final String? street;
final String? country;
final String? zipCode;
final String? managerName;
final bool isActive;
final AnyValue? departments;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
GetTeamHubByIdTeamHub.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
teamId = nativeFromJson<String>(json['teamId']),
hubName = nativeFromJson<String>(json['hubName']),
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
isActive = nativeFromJson<bool>(json['isActive']),
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -61,19 +65,21 @@ class GetTeamHubByIdTeamHub {
teamId == otherTyped.teamId &&
hubName == otherTyped.hubName &&
address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName &&
isActive == otherTyped.isActive &&
departments == otherTyped.departments &&
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
departments == otherTyped.departments;
}
@override
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() {
@@ -82,12 +88,27 @@ class GetTeamHubByIdTeamHub {
json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (latitude != null) {
json['latitude'] = nativeToJson<double?>(latitude);
}
if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude);
}
if (city != null) {
json['city'] = nativeToJson<String?>(city);
}
if (state != null) {
json['state'] = nativeToJson<String?>(state);
}
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (zipCode != null) {
json['zipCode'] = nativeToJson<String?>(zipCode);
}
@@ -98,15 +119,6 @@ class GetTeamHubByIdTeamHub {
if (departments != null) {
json['departments'] = departments!.toJson();
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json;
}
@@ -115,15 +127,17 @@ class GetTeamHubByIdTeamHub {
required this.teamId,
required this.hubName,
required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city,
this.state,
this.street,
this.country,
this.zipCode,
this.managerName,
required this.isActive,
this.departments,
this.createdAt,
this.updatedAt,
this.createdBy,
});
}

View File

@@ -2,8 +2,18 @@ part of 'generated.dart';
class GetTeamHubsByTeamIdVariablesBuilder {
String teamId;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; GetTeamHubsByTeamIdVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
GetTeamHubsByTeamIdVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
final FirebaseDataConnect _dataConnect;
GetTeamHubsByTeamIdVariablesBuilder(this._dataConnect, {required this.teamId,});
Deserializer<GetTeamHubsByTeamIdData> dataDeserializer = (dynamic json) => GetTeamHubsByTeamIdData.fromJson(jsonDecode(json));
Serializer<GetTeamHubsByTeamIdVariables> varsSerializer = (GetTeamHubsByTeamIdVariables vars) => jsonEncode(vars.toJson());
@@ -12,7 +22,7 @@ class GetTeamHubsByTeamIdVariablesBuilder {
}
QueryRef<GetTeamHubsByTeamIdData, GetTeamHubsByTeamIdVariables> ref() {
GetTeamHubsByTeamIdVariables vars= GetTeamHubsByTeamIdVariables(teamId: teamId,);
GetTeamHubsByTeamIdVariables vars= GetTeamHubsByTeamIdVariables(teamId: teamId,offset: _offset,limit: _limit,);
return _dataConnect.query("getTeamHubsByTeamId", dataDeserializer, varsSerializer, vars);
}
}
@@ -23,30 +33,34 @@ class GetTeamHubsByTeamIdTeamHubs {
final String teamId;
final String hubName;
final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city;
final String? state;
final String? street;
final String? country;
final String? zipCode;
final String? managerName;
final bool isActive;
final AnyValue? departments;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
GetTeamHubsByTeamIdTeamHubs.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
teamId = nativeFromJson<String>(json['teamId']),
hubName = nativeFromJson<String>(json['hubName']),
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
isActive = nativeFromJson<bool>(json['isActive']),
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -61,19 +75,21 @@ class GetTeamHubsByTeamIdTeamHubs {
teamId == otherTyped.teamId &&
hubName == otherTyped.hubName &&
address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName &&
isActive == otherTyped.isActive &&
departments == otherTyped.departments &&
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
departments == otherTyped.departments;
}
@override
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() {
@@ -82,12 +98,27 @@ class GetTeamHubsByTeamIdTeamHubs {
json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (latitude != null) {
json['latitude'] = nativeToJson<double?>(latitude);
}
if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude);
}
if (city != null) {
json['city'] = nativeToJson<String?>(city);
}
if (state != null) {
json['state'] = nativeToJson<String?>(state);
}
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (zipCode != null) {
json['zipCode'] = nativeToJson<String?>(zipCode);
}
@@ -98,15 +129,6 @@ class GetTeamHubsByTeamIdTeamHubs {
if (departments != null) {
json['departments'] = departments!.toJson();
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json;
}
@@ -115,15 +137,17 @@ class GetTeamHubsByTeamIdTeamHubs {
required this.teamId,
required this.hubName,
required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city,
this.state,
this.street,
this.country,
this.zipCode,
this.managerName,
required this.isActive,
this.departments,
this.createdAt,
this.updatedAt,
this.createdBy,
});
}
@@ -166,10 +190,23 @@ class GetTeamHubsByTeamIdData {
@immutable
class GetTeamHubsByTeamIdVariables {
final String teamId;
late final Optional<int>offset;
late final Optional<int>limit;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
GetTeamHubsByTeamIdVariables.fromJson(Map<String, dynamic> json):
teamId = nativeFromJson<String>(json['teamId']);
teamId = nativeFromJson<String>(json['teamId']) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -180,21 +217,31 @@ class GetTeamHubsByTeamIdVariables {
}
final GetTeamHubsByTeamIdVariables otherTyped = other as GetTeamHubsByTeamIdVariables;
return teamId == otherTyped.teamId;
return teamId == otherTyped.teamId &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => teamId.hashCode;
int get hashCode => Object.hashAll([teamId.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['teamId'] = nativeToJson<String>(teamId);
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
GetTeamHubsByTeamIdVariables({
required this.teamId,
required this.offset,
required this.limit,
});
}

View File

@@ -1,18 +1,29 @@
part of 'generated.dart';
class ListTeamHubsVariablesBuilder {
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect;
ListTeamHubsVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListTeamHubsVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
ListTeamHubsVariablesBuilder(this._dataConnect, );
Deserializer<ListTeamHubsData> dataDeserializer = (dynamic json) => ListTeamHubsData.fromJson(jsonDecode(json));
Future<QueryResult<ListTeamHubsData, void>> execute() {
Serializer<ListTeamHubsVariables> varsSerializer = (ListTeamHubsVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<ListTeamHubsData, ListTeamHubsVariables>> execute() {
return ref().execute();
}
QueryRef<ListTeamHubsData, void> ref() {
return _dataConnect.query("listTeamHubs", dataDeserializer, emptySerializer, null);
QueryRef<ListTeamHubsData, ListTeamHubsVariables> ref() {
ListTeamHubsVariables vars= ListTeamHubsVariables(offset: _offset,limit: _limit,);
return _dataConnect.query("listTeamHubs", dataDeserializer, varsSerializer, vars);
}
}
@@ -22,30 +33,34 @@ class ListTeamHubsTeamHubs {
final String teamId;
final String hubName;
final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city;
final String? state;
final String? street;
final String? country;
final String? zipCode;
final String? managerName;
final bool isActive;
final AnyValue? departments;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
ListTeamHubsTeamHubs.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
teamId = nativeFromJson<String>(json['teamId']),
hubName = nativeFromJson<String>(json['hubName']),
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
isActive = nativeFromJson<bool>(json['isActive']),
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
updatedAt = json['updatedAt'] == null ? null : Timestamp.fromJson(json['updatedAt']),
createdBy = json['createdBy'] == null ? null : nativeFromJson<String>(json['createdBy']);
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -60,19 +75,21 @@ class ListTeamHubsTeamHubs {
teamId == otherTyped.teamId &&
hubName == otherTyped.hubName &&
address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName &&
isActive == otherTyped.isActive &&
departments == otherTyped.departments &&
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
departments == otherTyped.departments;
}
@override
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() {
@@ -81,12 +98,27 @@ class ListTeamHubsTeamHubs {
json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (latitude != null) {
json['latitude'] = nativeToJson<double?>(latitude);
}
if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude);
}
if (city != null) {
json['city'] = nativeToJson<String?>(city);
}
if (state != null) {
json['state'] = nativeToJson<String?>(state);
}
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (zipCode != null) {
json['zipCode'] = nativeToJson<String?>(zipCode);
}
@@ -97,15 +129,6 @@ class ListTeamHubsTeamHubs {
if (departments != null) {
json['departments'] = departments!.toJson();
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json;
}
@@ -114,15 +137,17 @@ class ListTeamHubsTeamHubs {
required this.teamId,
required this.hubName,
required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city,
this.state,
this.street,
this.country,
this.zipCode,
this.managerName,
required this.isActive,
this.departments,
this.createdAt,
this.updatedAt,
this.createdBy,
});
}
@@ -162,3 +187,54 @@ class ListTeamHubsData {
});
}
@immutable
class ListTeamHubsVariables {
late final Optional<int>offset;
late final Optional<int>limit;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
ListTeamHubsVariables.fromJson(Map<String, dynamic> json) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListTeamHubsVariables otherTyped = other as ListTeamHubsVariables;
return offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => Object.hashAll([offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
ListTeamHubsVariables({
required this.offset,
required this.limit,
});
}

View File

@@ -2,8 +2,18 @@ part of 'generated.dart';
class ListTeamHubsByOwnerIdVariablesBuilder {
String ownerId;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; ListTeamHubsByOwnerIdVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListTeamHubsByOwnerIdVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
final FirebaseDataConnect _dataConnect;
ListTeamHubsByOwnerIdVariablesBuilder(this._dataConnect, {required this.ownerId,});
Deserializer<ListTeamHubsByOwnerIdData> dataDeserializer = (dynamic json) => ListTeamHubsByOwnerIdData.fromJson(jsonDecode(json));
Serializer<ListTeamHubsByOwnerIdVariables> varsSerializer = (ListTeamHubsByOwnerIdVariables vars) => jsonEncode(vars.toJson());
@@ -12,7 +22,7 @@ class ListTeamHubsByOwnerIdVariablesBuilder {
}
QueryRef<ListTeamHubsByOwnerIdData, ListTeamHubsByOwnerIdVariables> ref() {
ListTeamHubsByOwnerIdVariables vars= ListTeamHubsByOwnerIdVariables(ownerId: ownerId,);
ListTeamHubsByOwnerIdVariables vars= ListTeamHubsByOwnerIdVariables(ownerId: ownerId,offset: _offset,limit: _limit,);
return _dataConnect.query("listTeamHubsByOwnerId", dataDeserializer, varsSerializer, vars);
}
}
@@ -23,26 +33,34 @@ class ListTeamHubsByOwnerIdTeamHubs {
final String teamId;
final String hubName;
final String address;
final String? placeId;
final double? latitude;
final double? longitude;
final String? city;
final String? state;
final String? street;
final String? country;
final String? zipCode;
final String? managerName;
final bool isActive;
final AnyValue? departments;
final Timestamp? createdAt;
ListTeamHubsByOwnerIdTeamHubs.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
teamId = nativeFromJson<String>(json['teamId']),
hubName = nativeFromJson<String>(json['hubName']),
address = nativeFromJson<String>(json['address']),
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
latitude = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']),
longitude = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']),
city = json['city'] == null ? null : nativeFromJson<String>(json['city']),
state = json['state'] == null ? null : nativeFromJson<String>(json['state']),
street = json['street'] == null ? null : nativeFromJson<String>(json['street']),
country = json['country'] == null ? null : nativeFromJson<String>(json['country']),
zipCode = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']),
managerName = json['managerName'] == null ? null : nativeFromJson<String>(json['managerName']),
isActive = nativeFromJson<bool>(json['isActive']),
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
departments = json['departments'] == null ? null : AnyValue.fromJson(json['departments']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -57,17 +75,21 @@ class ListTeamHubsByOwnerIdTeamHubs {
teamId == otherTyped.teamId &&
hubName == otherTyped.hubName &&
address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName &&
isActive == otherTyped.isActive &&
departments == otherTyped.departments &&
createdAt == otherTyped.createdAt;
departments == otherTyped.departments;
}
@override
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode, createdAt.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() {
@@ -76,12 +98,27 @@ class ListTeamHubsByOwnerIdTeamHubs {
json['teamId'] = nativeToJson<String>(teamId);
json['hubName'] = nativeToJson<String>(hubName);
json['address'] = nativeToJson<String>(address);
if (placeId != null) {
json['placeId'] = nativeToJson<String?>(placeId);
}
if (latitude != null) {
json['latitude'] = nativeToJson<double?>(latitude);
}
if (longitude != null) {
json['longitude'] = nativeToJson<double?>(longitude);
}
if (city != null) {
json['city'] = nativeToJson<String?>(city);
}
if (state != null) {
json['state'] = nativeToJson<String?>(state);
}
if (street != null) {
json['street'] = nativeToJson<String?>(street);
}
if (country != null) {
json['country'] = nativeToJson<String?>(country);
}
if (zipCode != null) {
json['zipCode'] = nativeToJson<String?>(zipCode);
}
@@ -92,9 +129,6 @@ class ListTeamHubsByOwnerIdTeamHubs {
if (departments != null) {
json['departments'] = departments!.toJson();
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
return json;
}
@@ -103,13 +137,17 @@ class ListTeamHubsByOwnerIdTeamHubs {
required this.teamId,
required this.hubName,
required this.address,
this.placeId,
this.latitude,
this.longitude,
this.city,
this.state,
this.street,
this.country,
this.zipCode,
this.managerName,
required this.isActive,
this.departments,
this.createdAt,
});
}
@@ -152,10 +190,23 @@ class ListTeamHubsByOwnerIdData {
@immutable
class ListTeamHubsByOwnerIdVariables {
final String ownerId;
late final Optional<int>offset;
late final Optional<int>limit;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
ListTeamHubsByOwnerIdVariables.fromJson(Map<String, dynamic> json):
ownerId = nativeFromJson<String>(json['ownerId']);
ownerId = nativeFromJson<String>(json['ownerId']) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -166,21 +217,31 @@ class ListTeamHubsByOwnerIdVariables {
}
final ListTeamHubsByOwnerIdVariables otherTyped = other as ListTeamHubsByOwnerIdVariables;
return ownerId == otherTyped.ownerId;
return ownerId == otherTyped.ownerId &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => ownerId.hashCode;
int get hashCode => Object.hashAll([ownerId.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['ownerId'] = nativeToJson<String>(ownerId);
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
ListTeamHubsByOwnerIdVariables({
required this.ownerId,
required this.offset,
required this.limit,
});
}

View File

@@ -2,16 +2,26 @@ part of 'generated.dart';
class UpdateTeamHubVariablesBuilder {
String id;
Optional<String> _teamId = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _hubName = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _address = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _placeId = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _latitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<double> _longitude = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _city = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _state = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _street = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _country = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _zipCode = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _managerName = Optional.optional(nativeFromJson, nativeToJson);
Optional<bool> _isActive = Optional.optional(nativeFromJson, nativeToJson);
Optional<AnyValue> _departments = Optional.optional(AnyValue.fromJson, defaultSerializer);
final FirebaseDataConnect _dataConnect; UpdateTeamHubVariablesBuilder hubName(String? t) {
final FirebaseDataConnect _dataConnect; UpdateTeamHubVariablesBuilder teamId(String? t) {
_teamId.value = t;
return this;
}
UpdateTeamHubVariablesBuilder hubName(String? t) {
_hubName.value = t;
return this;
}
@@ -19,6 +29,18 @@ class UpdateTeamHubVariablesBuilder {
_address.value = t;
return this;
}
UpdateTeamHubVariablesBuilder placeId(String? t) {
_placeId.value = t;
return this;
}
UpdateTeamHubVariablesBuilder latitude(double? t) {
_latitude.value = t;
return this;
}
UpdateTeamHubVariablesBuilder longitude(double? t) {
_longitude.value = t;
return this;
}
UpdateTeamHubVariablesBuilder city(String? t) {
_city.value = t;
return this;
@@ -27,6 +49,14 @@ class UpdateTeamHubVariablesBuilder {
_state.value = t;
return this;
}
UpdateTeamHubVariablesBuilder street(String? t) {
_street.value = t;
return this;
}
UpdateTeamHubVariablesBuilder country(String? t) {
_country.value = t;
return this;
}
UpdateTeamHubVariablesBuilder zipCode(String? t) {
_zipCode.value = t;
return this;
@@ -52,7 +82,7 @@ class UpdateTeamHubVariablesBuilder {
}
MutationRef<UpdateTeamHubData, UpdateTeamHubVariables> ref() {
UpdateTeamHubVariables vars= UpdateTeamHubVariables(id: id,hubName: _hubName,address: _address,city: _city,state: _state,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,);
UpdateTeamHubVariables vars= UpdateTeamHubVariables(id: id,teamId: _teamId,hubName: _hubName,address: _address,placeId: _placeId,latitude: _latitude,longitude: _longitude,city: _city,state: _state,street: _street,country: _country,zipCode: _zipCode,managerName: _managerName,isActive: _isActive,departments: _departments,);
return _dataConnect.mutation("updateTeamHub", dataDeserializer, varsSerializer, vars);
}
}
@@ -130,10 +160,16 @@ class UpdateTeamHubData {
@immutable
class UpdateTeamHubVariables {
final String id;
late final Optional<String>teamId;
late final Optional<String>hubName;
late final Optional<String>address;
late final Optional<String>placeId;
late final Optional<double>latitude;
late final Optional<double>longitude;
late final Optional<String>city;
late final Optional<String>state;
late final Optional<String>street;
late final Optional<String>country;
late final Optional<String>zipCode;
late final Optional<String>managerName;
late final Optional<bool>isActive;
@@ -145,6 +181,10 @@ class UpdateTeamHubVariables {
teamId = Optional.optional(nativeFromJson, nativeToJson);
teamId.value = json['teamId'] == null ? null : nativeFromJson<String>(json['teamId']);
hubName = Optional.optional(nativeFromJson, nativeToJson);
hubName.value = json['hubName'] == null ? null : nativeFromJson<String>(json['hubName']);
@@ -153,6 +193,18 @@ class UpdateTeamHubVariables {
address.value = json['address'] == null ? null : nativeFromJson<String>(json['address']);
placeId = Optional.optional(nativeFromJson, nativeToJson);
placeId.value = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']);
latitude = Optional.optional(nativeFromJson, nativeToJson);
latitude.value = json['latitude'] == null ? null : nativeFromJson<double>(json['latitude']);
longitude = Optional.optional(nativeFromJson, nativeToJson);
longitude.value = json['longitude'] == null ? null : nativeFromJson<double>(json['longitude']);
city = Optional.optional(nativeFromJson, nativeToJson);
city.value = json['city'] == null ? null : nativeFromJson<String>(json['city']);
@@ -161,6 +213,14 @@ class UpdateTeamHubVariables {
state.value = json['state'] == null ? null : nativeFromJson<String>(json['state']);
street = Optional.optional(nativeFromJson, nativeToJson);
street.value = json['street'] == null ? null : nativeFromJson<String>(json['street']);
country = Optional.optional(nativeFromJson, nativeToJson);
country.value = json['country'] == null ? null : nativeFromJson<String>(json['country']);
zipCode = Optional.optional(nativeFromJson, nativeToJson);
zipCode.value = json['zipCode'] == null ? null : nativeFromJson<String>(json['zipCode']);
@@ -188,10 +248,16 @@ class UpdateTeamHubVariables {
final UpdateTeamHubVariables otherTyped = other as UpdateTeamHubVariables;
return id == otherTyped.id &&
teamId == otherTyped.teamId &&
hubName == otherTyped.hubName &&
address == otherTyped.address &&
placeId == otherTyped.placeId &&
latitude == otherTyped.latitude &&
longitude == otherTyped.longitude &&
city == otherTyped.city &&
state == otherTyped.state &&
street == otherTyped.street &&
country == otherTyped.country &&
zipCode == otherTyped.zipCode &&
managerName == otherTyped.managerName &&
isActive == otherTyped.isActive &&
@@ -199,24 +265,42 @@ class UpdateTeamHubVariables {
}
@override
int get hashCode => Object.hashAll([id.hashCode, hubName.hashCode, address.hashCode, city.hashCode, state.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, hubName.hashCode, address.hashCode, placeId.hashCode, latitude.hashCode, longitude.hashCode, city.hashCode, state.hashCode, street.hashCode, country.hashCode, zipCode.hashCode, managerName.hashCode, isActive.hashCode, departments.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
if(teamId.state == OptionalState.set) {
json['teamId'] = teamId.toJson();
}
if(hubName.state == OptionalState.set) {
json['hubName'] = hubName.toJson();
}
if(address.state == OptionalState.set) {
json['address'] = address.toJson();
}
if(placeId.state == OptionalState.set) {
json['placeId'] = placeId.toJson();
}
if(latitude.state == OptionalState.set) {
json['latitude'] = latitude.toJson();
}
if(longitude.state == OptionalState.set) {
json['longitude'] = longitude.toJson();
}
if(city.state == OptionalState.set) {
json['city'] = city.toJson();
}
if(state.state == OptionalState.set) {
json['state'] = state.toJson();
}
if(street.state == OptionalState.set) {
json['street'] = street.toJson();
}
if(country.state == OptionalState.set) {
json['country'] = country.toJson();
}
if(zipCode.state == OptionalState.set) {
json['zipCode'] = zipCode.toJson();
}
@@ -234,10 +318,16 @@ class UpdateTeamHubVariables {
UpdateTeamHubVariables({
required this.id,
required this.teamId,
required this.hubName,
required this.address,
required this.placeId,
required this.latitude,
required this.longitude,
required this.city,
required this.state,
required this.street,
required this.country,
required this.zipCode,
required this.managerName,
required this.isActive,

View File

@@ -2,9 +2,17 @@ mutation createTeamHub(
$teamId: UUID!
$hubName: String!
$address: String!
$placeId: String
$latitude: Float
$longitude: Float
$city: String
$state: String
$street: String
$country: String
$zipCode: String
$managerName: String
$isActive: Boolean
$departments: Any
@@ -14,42 +22,72 @@ mutation createTeamHub(
teamId: $teamId
hubName: $hubName
address: $address
placeId: $placeId
latitude: $latitude
longitude: $longitude
city: $city
state: $state
street: $street
country: $country
zipCode: $zipCode
managerName: $managerName
isActive: $isActive
departments: $departments
}
)
)
}
mutation updateTeamHub(
$id: UUID!
$teamId: UUID
$hubName: String
$address: String
$placeId: String
$latitude: Float
$longitude: Float
$city: String
$state: String
$street: String
$country: String
$zipCode: String
$managerName: String
$isActive: Boolean
$departments: Any
) @auth(level: USER) {
teamHub_update(
id: $id
data: {
teamId: $teamId
hubName: $hubName
address: $address
placeId: $placeId
latitude: $latitude
longitude: $longitude
city: $city
state: $state
street: $street
country: $country
zipCode: $zipCode
managerName: $managerName
isActive: $isActive
departments: $departments
}
)
)
}
mutation deleteTeamHub($id: UUID!) @auth(level: USER) {
teamHub_delete(id: $id)
}
teamHub_delete(id: $id)
}

View File

@@ -1,18 +1,30 @@
query listTeamHubs @auth(level: USER) {
teamHubs {
# ==========================================================
# TEAM HUB - QUERIES (USE where, NOT filter)
# Include ALL fields in TeamHub
# ==========================================================
query listTeamHubs($offset: Int, $limit: Int) @auth(level: USER) {
teamHubs(offset: $offset, limit: $limit, orderBy: { createdAt: DESC }) {
id
teamId
hubName
address
placeId
latitude
longitude
city
state
street
country
zipCode
managerName
isActive
departments
createdAt
updatedAt
createdBy
}
}
@@ -21,34 +33,55 @@ query getTeamHubById($id: UUID!) @auth(level: USER) {
id
teamId
hubName
address
placeId
latitude
longitude
city
state
street
country
zipCode
managerName
isActive
departments
createdAt
updatedAt
createdBy
}
}
query getTeamHubsByTeamId($teamId: UUID!) @auth(level: USER) {
teamHubs(where: { teamId: { eq: $teamId } }) {
query getTeamHubsByTeamId(
$teamId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
teamHubs(
where: { teamId: { eq: $teamId } }
offset: $offset
limit: $limit
orderBy: { createdAt: DESC }
) {
id
teamId
hubName
address
placeId
latitude
longitude
city
state
street
country
zipCode
managerName
isActive
departments
createdAt
updatedAt
createdBy
}
}
@@ -57,6 +90,8 @@ query getTeamHubsByTeamId($teamId: UUID!) @auth(level: USER) {
# ------------------------------------------------------------
query listTeamHubsByOwnerId(
$ownerId: UUID!
$offset: Int
$limit: Int
) @auth(level: USER) {
teamHubs(
where: {
@@ -64,17 +99,28 @@ query listTeamHubsByOwnerId(
ownerId: { eq: $ownerId }
}
}
offset: $offset
limit: $limit
orderBy: { createdAt: DESC }
) {
id
teamId
hubName
address
placeId
latitude
longitude
city
state
street
country
zipCode
managerName
isActive
departments
createdAt
}
}
}