coverage working
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
# Basic Usage
|
||||
|
||||
```dart
|
||||
ExampleConnector.instance.createBusiness(createBusinessVariables).execute();
|
||||
ExampleConnector.instance.updateBusiness(updateBusinessVariables).execute();
|
||||
ExampleConnector.instance.deleteBusiness(deleteBusinessVariables).execute();
|
||||
ExampleConnector.instance.listCustomRateCards().execute();
|
||||
ExampleConnector.instance.getCustomRateCardById(getCustomRateCardByIdVariables).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.createStaffRole(createStaffRoleVariables).execute();
|
||||
ExampleConnector.instance.deleteStaffRole(deleteStaffRoleVariables).execute();
|
||||
ExampleConnector.instance.createTeamMember(createTeamMemberVariables).execute();
|
||||
ExampleConnector.instance.updateTeamMember(updateTeamMemberVariables).execute();
|
||||
ExampleConnector.instance.updateTeamMemberInviteStatus(updateTeamMemberInviteStatusVariables).execute();
|
||||
ExampleConnector.instance.acceptInviteByCode(acceptInviteByCodeVariables).execute();
|
||||
ExampleConnector.instance.cancelInviteByCode(cancelInviteByCodeVariables).execute();
|
||||
ExampleConnector.instance.deleteTeamMember(deleteTeamMemberVariables).execute();
|
||||
ExampleConnector.instance.createUserConversation(createUserConversationVariables).execute();
|
||||
ExampleConnector.instance.updateUserConversation(updateUserConversationVariables).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.updateActivityLog({ ... })
|
||||
.userId(...)
|
||||
await ExampleConnector.instance.updateShift({ ... })
|
||||
.title(...)
|
||||
.execute();
|
||||
```
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,388 @@
|
||||
part of 'generated.dart';
|
||||
|
||||
class ListStaffsApplicationsByBusinessForDayVariablesBuilder {
|
||||
String businessId;
|
||||
Timestamp dayStart;
|
||||
Timestamp dayEnd;
|
||||
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
|
||||
|
||||
final FirebaseDataConnect _dataConnect; ListStaffsApplicationsByBusinessForDayVariablesBuilder offset(int? t) {
|
||||
_offset.value = t;
|
||||
return this;
|
||||
}
|
||||
ListStaffsApplicationsByBusinessForDayVariablesBuilder limit(int? t) {
|
||||
_limit.value = t;
|
||||
return this;
|
||||
}
|
||||
|
||||
ListStaffsApplicationsByBusinessForDayVariablesBuilder(this._dataConnect, {required this.businessId,required this.dayStart,required this.dayEnd,});
|
||||
Deserializer<ListStaffsApplicationsByBusinessForDayData> dataDeserializer = (dynamic json) => ListStaffsApplicationsByBusinessForDayData.fromJson(jsonDecode(json));
|
||||
Serializer<ListStaffsApplicationsByBusinessForDayVariables> varsSerializer = (ListStaffsApplicationsByBusinessForDayVariables vars) => jsonEncode(vars.toJson());
|
||||
Future<QueryResult<ListStaffsApplicationsByBusinessForDayData, ListStaffsApplicationsByBusinessForDayVariables>> execute() {
|
||||
return ref().execute();
|
||||
}
|
||||
|
||||
QueryRef<ListStaffsApplicationsByBusinessForDayData, ListStaffsApplicationsByBusinessForDayVariables> ref() {
|
||||
ListStaffsApplicationsByBusinessForDayVariables vars= ListStaffsApplicationsByBusinessForDayVariables(businessId: businessId,dayStart: dayStart,dayEnd: dayEnd,offset: _offset,limit: _limit,);
|
||||
return _dataConnect.query("listStaffsApplicationsByBusinessForDay", dataDeserializer, varsSerializer, vars);
|
||||
}
|
||||
}
|
||||
|
||||
@immutable
|
||||
class ListStaffsApplicationsByBusinessForDayApplications {
|
||||
final String id;
|
||||
final String shiftId;
|
||||
final String roleId;
|
||||
final Timestamp? checkInTime;
|
||||
final Timestamp? checkOutTime;
|
||||
final Timestamp? appliedAt;
|
||||
final EnumValue<ApplicationStatus> status;
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRole shiftRole;
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsStaff staff;
|
||||
ListStaffsApplicationsByBusinessForDayApplications.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
shiftId = nativeFromJson<String>(json['shiftId']),
|
||||
roleId = nativeFromJson<String>(json['roleId']),
|
||||
checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']),
|
||||
checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']),
|
||||
appliedAt = json['appliedAt'] == null ? null : Timestamp.fromJson(json['appliedAt']),
|
||||
status = applicationStatusDeserializer(json['status']),
|
||||
shiftRole = ListStaffsApplicationsByBusinessForDayApplicationsShiftRole.fromJson(json['shiftRole']),
|
||||
staff = ListStaffsApplicationsByBusinessForDayApplicationsStaff.fromJson(json['staff']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ListStaffsApplicationsByBusinessForDayApplications otherTyped = other as ListStaffsApplicationsByBusinessForDayApplications;
|
||||
return id == otherTyped.id &&
|
||||
shiftId == otherTyped.shiftId &&
|
||||
roleId == otherTyped.roleId &&
|
||||
checkInTime == otherTyped.checkInTime &&
|
||||
checkOutTime == otherTyped.checkOutTime &&
|
||||
appliedAt == otherTyped.appliedAt &&
|
||||
status == otherTyped.status &&
|
||||
shiftRole == otherTyped.shiftRole &&
|
||||
staff == otherTyped.staff;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, roleId.hashCode, checkInTime.hashCode, checkOutTime.hashCode, appliedAt.hashCode, status.hashCode, shiftRole.hashCode, staff.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
json['shiftId'] = nativeToJson<String>(shiftId);
|
||||
json['roleId'] = nativeToJson<String>(roleId);
|
||||
if (checkInTime != null) {
|
||||
json['checkInTime'] = checkInTime!.toJson();
|
||||
}
|
||||
if (checkOutTime != null) {
|
||||
json['checkOutTime'] = checkOutTime!.toJson();
|
||||
}
|
||||
if (appliedAt != null) {
|
||||
json['appliedAt'] = appliedAt!.toJson();
|
||||
}
|
||||
json['status'] =
|
||||
applicationStatusSerializer(status)
|
||||
;
|
||||
json['shiftRole'] = shiftRole.toJson();
|
||||
json['staff'] = staff.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListStaffsApplicationsByBusinessForDayApplications({
|
||||
required this.id,
|
||||
required this.shiftId,
|
||||
required this.roleId,
|
||||
this.checkInTime,
|
||||
this.checkOutTime,
|
||||
this.appliedAt,
|
||||
required this.status,
|
||||
required this.shiftRole,
|
||||
required this.staff,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class ListStaffsApplicationsByBusinessForDayApplicationsShiftRole {
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift shift;
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole role;
|
||||
ListStaffsApplicationsByBusinessForDayApplicationsShiftRole.fromJson(dynamic json):
|
||||
|
||||
shift = ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift.fromJson(json['shift']),
|
||||
role = ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole.fromJson(json['role']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRole otherTyped = other as ListStaffsApplicationsByBusinessForDayApplicationsShiftRole;
|
||||
return shift == otherTyped.shift &&
|
||||
role == otherTyped.role;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([shift.hashCode, role.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['shift'] = shift.toJson();
|
||||
json['role'] = role.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListStaffsApplicationsByBusinessForDayApplicationsShiftRole({
|
||||
required this.shift,
|
||||
required this.role,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift {
|
||||
final String? location;
|
||||
ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift.fromJson(dynamic json):
|
||||
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift otherTyped = other as ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift;
|
||||
return location == otherTyped.location;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => location.hashCode;
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleShift({
|
||||
this.location,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole {
|
||||
final String name;
|
||||
ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole.fromJson(dynamic json):
|
||||
|
||||
name = nativeFromJson<String>(json['name']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole otherTyped = other as ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole;
|
||||
return name == otherTyped.name;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => name.hashCode;
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['name'] = nativeToJson<String>(name);
|
||||
return json;
|
||||
}
|
||||
|
||||
ListStaffsApplicationsByBusinessForDayApplicationsShiftRoleRole({
|
||||
required this.name,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class ListStaffsApplicationsByBusinessForDayApplicationsStaff {
|
||||
final String id;
|
||||
final String fullName;
|
||||
final String? email;
|
||||
final String? phone;
|
||||
final String? photoUrl;
|
||||
ListStaffsApplicationsByBusinessForDayApplicationsStaff.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
fullName = nativeFromJson<String>(json['fullName']),
|
||||
email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
|
||||
phone = json['phone'] == null ? null : nativeFromJson<String>(json['phone']),
|
||||
photoUrl = json['photoUrl'] == null ? null : nativeFromJson<String>(json['photoUrl']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ListStaffsApplicationsByBusinessForDayApplicationsStaff otherTyped = other as ListStaffsApplicationsByBusinessForDayApplicationsStaff;
|
||||
return id == otherTyped.id &&
|
||||
fullName == otherTyped.fullName &&
|
||||
email == otherTyped.email &&
|
||||
phone == otherTyped.phone &&
|
||||
photoUrl == otherTyped.photoUrl;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
json['fullName'] = nativeToJson<String>(fullName);
|
||||
if (email != null) {
|
||||
json['email'] = nativeToJson<String?>(email);
|
||||
}
|
||||
if (phone != null) {
|
||||
json['phone'] = nativeToJson<String?>(phone);
|
||||
}
|
||||
if (photoUrl != null) {
|
||||
json['photoUrl'] = nativeToJson<String?>(photoUrl);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
ListStaffsApplicationsByBusinessForDayApplicationsStaff({
|
||||
required this.id,
|
||||
required this.fullName,
|
||||
this.email,
|
||||
this.phone,
|
||||
this.photoUrl,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class ListStaffsApplicationsByBusinessForDayData {
|
||||
final List<ListStaffsApplicationsByBusinessForDayApplications> applications;
|
||||
ListStaffsApplicationsByBusinessForDayData.fromJson(dynamic json):
|
||||
|
||||
applications = (json['applications'] as List<dynamic>)
|
||||
.map((e) => ListStaffsApplicationsByBusinessForDayApplications.fromJson(e))
|
||||
.toList();
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ListStaffsApplicationsByBusinessForDayData otherTyped = other as ListStaffsApplicationsByBusinessForDayData;
|
||||
return applications == otherTyped.applications;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => applications.hashCode;
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['applications'] = applications.map((e) => e.toJson()).toList();
|
||||
return json;
|
||||
}
|
||||
|
||||
ListStaffsApplicationsByBusinessForDayData({
|
||||
required this.applications,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class ListStaffsApplicationsByBusinessForDayVariables {
|
||||
final String businessId;
|
||||
final Timestamp dayStart;
|
||||
final Timestamp dayEnd;
|
||||
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.')
|
||||
ListStaffsApplicationsByBusinessForDayVariables.fromJson(Map<String, dynamic> json):
|
||||
|
||||
businessId = nativeFromJson<String>(json['businessId']),
|
||||
dayStart = Timestamp.fromJson(json['dayStart']),
|
||||
dayEnd = Timestamp.fromJson(json['dayEnd']) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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 ListStaffsApplicationsByBusinessForDayVariables otherTyped = other as ListStaffsApplicationsByBusinessForDayVariables;
|
||||
return businessId == otherTyped.businessId &&
|
||||
dayStart == otherTyped.dayStart &&
|
||||
dayEnd == otherTyped.dayEnd &&
|
||||
offset == otherTyped.offset &&
|
||||
limit == otherTyped.limit;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([businessId.hashCode, dayStart.hashCode, dayEnd.hashCode, offset.hashCode, limit.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['businessId'] = nativeToJson<String>(businessId);
|
||||
json['dayStart'] = dayStart.toJson();
|
||||
json['dayEnd'] = dayEnd.toJson();
|
||||
if(offset.state == OptionalState.set) {
|
||||
json['offset'] = offset.toJson();
|
||||
}
|
||||
if(limit.state == OptionalState.set) {
|
||||
json['limit'] = limit.toJson();
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
ListStaffsApplicationsByBusinessForDayVariables({
|
||||
required this.businessId,
|
||||
required this.dayStart,
|
||||
required this.dayEnd,
|
||||
required this.offset,
|
||||
required this.limit,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user