Merge branch '208-p0-auth-05-get-started-screen' of https://github.com/Oloodi/krow-workforce into 208-p0-auth-05-get-started-screen

This commit is contained in:
Achintha Isuru
2026-01-25 17:01:38 -05:00
28 changed files with 21403 additions and 19444 deletions

View File

@@ -1,16 +1,16 @@
# Basic Usage
```dart
ExampleConnector.instance.getStaffDocumentByKey(getStaffDocumentByKeyVariables).execute();
ExampleConnector.instance.listStaffDocumentsByStaffId(listStaffDocumentsByStaffIdVariables).execute();
ExampleConnector.instance.listStaffDocumentsByDocumentType(listStaffDocumentsByDocumentTypeVariables).execute();
ExampleConnector.instance.listStaffDocumentsByStatus(listStaffDocumentsByStatusVariables).execute();
ExampleConnector.instance.createTeam(createTeamVariables).execute();
ExampleConnector.instance.updateTeam(updateTeamVariables).execute();
ExampleConnector.instance.deleteTeam(deleteTeamVariables).execute();
ExampleConnector.instance.listInvoiceTemplates(listInvoiceTemplatesVariables).execute();
ExampleConnector.instance.getInvoiceTemplateById(getInvoiceTemplateByIdVariables).execute();
ExampleConnector.instance.listInvoiceTemplatesByOwnerId(listInvoiceTemplatesByOwnerIdVariables).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.listActivityLogs(listActivityLogsVariables).execute();
ExampleConnector.instance.getActivityLogById(getActivityLogByIdVariables).execute();
ExampleConnector.instance.listActivityLogsByUserId(listActivityLogsByUserIdVariables).execute();
ExampleConnector.instance.listUnreadActivityLogsByUserId(listUnreadActivityLogsByUserIdVariables).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.updateMessage({ ... })
.conversationId(...)
await ExampleConnector.instance.getRapidOrders({ ... })
.offset(...)
.execute();
```

View File

@@ -164,6 +164,7 @@ class ListShiftRolesByBusinessAndDateRangeShiftRolesShift {
final String? location;
final String? locationAddress;
final String title;
final EnumValue<ShiftStatus>? status;
final ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder order;
ListShiftRolesByBusinessAndDateRangeShiftRolesShift.fromJson(dynamic json):
@@ -172,6 +173,7 @@ class ListShiftRolesByBusinessAndDateRangeShiftRolesShift {
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
title = nativeFromJson<String>(json['title']),
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
order = ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder.fromJson(json['order']);
@override
bool operator ==(Object other) {
@@ -188,11 +190,12 @@ class ListShiftRolesByBusinessAndDateRangeShiftRolesShift {
location == otherTyped.location &&
locationAddress == otherTyped.locationAddress &&
title == otherTyped.title &&
status == otherTyped.status &&
order == otherTyped.order;
}
@override
int get hashCode => Object.hashAll([id.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, title.hashCode, order.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, title.hashCode, status.hashCode, order.hashCode]);
Map<String, dynamic> toJson() {
@@ -208,6 +211,11 @@ class ListShiftRolesByBusinessAndDateRangeShiftRolesShift {
json['locationAddress'] = nativeToJson<String?>(locationAddress);
}
json['title'] = nativeToJson<String>(title);
if (status != null) {
json['status'] =
shiftStatusSerializer(status!)
;
}
json['order'] = order.toJson();
return json;
}
@@ -218,6 +226,7 @@ class ListShiftRolesByBusinessAndDateRangeShiftRolesShift {
this.location,
this.locationAddress,
required this.title,
this.status,
required this.order,
});
}

View File

@@ -0,0 +1,404 @@
part of 'generated.dart';
class ListShiftRolesByBusinessAndOrderVariablesBuilder {
String businessId;
String orderId;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; ListShiftRolesByBusinessAndOrderVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListShiftRolesByBusinessAndOrderVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
ListShiftRolesByBusinessAndOrderVariablesBuilder(this._dataConnect, {required this.businessId,required this.orderId,});
Deserializer<ListShiftRolesByBusinessAndOrderData> dataDeserializer = (dynamic json) => ListShiftRolesByBusinessAndOrderData.fromJson(jsonDecode(json));
Serializer<ListShiftRolesByBusinessAndOrderVariables> varsSerializer = (ListShiftRolesByBusinessAndOrderVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<ListShiftRolesByBusinessAndOrderData, ListShiftRolesByBusinessAndOrderVariables>> execute() {
return ref().execute();
}
QueryRef<ListShiftRolesByBusinessAndOrderData, ListShiftRolesByBusinessAndOrderVariables> ref() {
ListShiftRolesByBusinessAndOrderVariables vars= ListShiftRolesByBusinessAndOrderVariables(businessId: businessId,orderId: orderId,offset: _offset,limit: _limit,);
return _dataConnect.query("listShiftRolesByBusinessAndOrder", dataDeserializer, varsSerializer, vars);
}
}
@immutable
class ListShiftRolesByBusinessAndOrderShiftRoles {
final String id;
final String shiftId;
final String roleId;
final int count;
final int? assigned;
final Timestamp? startTime;
final Timestamp? endTime;
final double? hours;
final EnumValue<BreakDuration>? breakType;
final double? totalValue;
final Timestamp? createdAt;
final ListShiftRolesByBusinessAndOrderShiftRolesRole role;
final ListShiftRolesByBusinessAndOrderShiftRolesShift shift;
ListShiftRolesByBusinessAndOrderShiftRoles.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
shiftId = nativeFromJson<String>(json['shiftId']),
roleId = nativeFromJson<String>(json['roleId']),
count = nativeFromJson<int>(json['count']),
assigned = json['assigned'] == null ? null : nativeFromJson<int>(json['assigned']),
startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']),
endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
breakType = json['breakType'] == null ? null : breakDurationDeserializer(json['breakType']),
totalValue = json['totalValue'] == null ? null : nativeFromJson<double>(json['totalValue']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
role = ListShiftRolesByBusinessAndOrderShiftRolesRole.fromJson(json['role']),
shift = ListShiftRolesByBusinessAndOrderShiftRolesShift.fromJson(json['shift']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndOrderShiftRoles otherTyped = other as ListShiftRolesByBusinessAndOrderShiftRoles;
return id == otherTyped.id &&
shiftId == otherTyped.shiftId &&
roleId == otherTyped.roleId &&
count == otherTyped.count &&
assigned == otherTyped.assigned &&
startTime == otherTyped.startTime &&
endTime == otherTyped.endTime &&
hours == otherTyped.hours &&
breakType == otherTyped.breakType &&
totalValue == otherTyped.totalValue &&
createdAt == otherTyped.createdAt &&
role == otherTyped.role &&
shift == otherTyped.shift;
}
@override
int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, breakType.hashCode, totalValue.hashCode, createdAt.hashCode, role.hashCode, shift.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['shiftId'] = nativeToJson<String>(shiftId);
json['roleId'] = nativeToJson<String>(roleId);
json['count'] = nativeToJson<int>(count);
if (assigned != null) {
json['assigned'] = nativeToJson<int?>(assigned);
}
if (startTime != null) {
json['startTime'] = startTime!.toJson();
}
if (endTime != null) {
json['endTime'] = endTime!.toJson();
}
if (hours != null) {
json['hours'] = nativeToJson<double?>(hours);
}
if (breakType != null) {
json['breakType'] =
breakDurationSerializer(breakType!)
;
}
if (totalValue != null) {
json['totalValue'] = nativeToJson<double?>(totalValue);
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
json['role'] = role.toJson();
json['shift'] = shift.toJson();
return json;
}
ListShiftRolesByBusinessAndOrderShiftRoles({
required this.id,
required this.shiftId,
required this.roleId,
required this.count,
this.assigned,
this.startTime,
this.endTime,
this.hours,
this.breakType,
this.totalValue,
this.createdAt,
required this.role,
required this.shift,
});
}
@immutable
class ListShiftRolesByBusinessAndOrderShiftRolesRole {
final String id;
final String name;
final double costPerHour;
ListShiftRolesByBusinessAndOrderShiftRolesRole.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
name = nativeFromJson<String>(json['name']),
costPerHour = nativeFromJson<double>(json['costPerHour']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndOrderShiftRolesRole otherTyped = other as ListShiftRolesByBusinessAndOrderShiftRolesRole;
return id == otherTyped.id &&
name == otherTyped.name &&
costPerHour == otherTyped.costPerHour;
}
@override
int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['name'] = nativeToJson<String>(name);
json['costPerHour'] = nativeToJson<double>(costPerHour);
return json;
}
ListShiftRolesByBusinessAndOrderShiftRolesRole({
required this.id,
required this.name,
required this.costPerHour,
});
}
@immutable
class ListShiftRolesByBusinessAndOrderShiftRolesShift {
final String id;
final String title;
final Timestamp? date;
final String orderId;
final String? location;
final String? locationAddress;
final ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder order;
ListShiftRolesByBusinessAndOrderShiftRolesShift.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
title = nativeFromJson<String>(json['title']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
orderId = nativeFromJson<String>(json['orderId']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
order = ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder.fromJson(json['order']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndOrderShiftRolesShift otherTyped = other as ListShiftRolesByBusinessAndOrderShiftRolesShift;
return id == otherTyped.id &&
title == otherTyped.title &&
date == otherTyped.date &&
orderId == otherTyped.orderId &&
location == otherTyped.location &&
locationAddress == otherTyped.locationAddress &&
order == otherTyped.order;
}
@override
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, orderId.hashCode, location.hashCode, locationAddress.hashCode, order.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['title'] = nativeToJson<String>(title);
if (date != null) {
json['date'] = date!.toJson();
}
json['orderId'] = nativeToJson<String>(orderId);
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
if (locationAddress != null) {
json['locationAddress'] = nativeToJson<String?>(locationAddress);
}
json['order'] = order.toJson();
return json;
}
ListShiftRolesByBusinessAndOrderShiftRolesShift({
required this.id,
required this.title,
this.date,
required this.orderId,
this.location,
this.locationAddress,
required this.order,
});
}
@immutable
class ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder {
final String? vendorId;
final Timestamp? date;
final String? location;
ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder.fromJson(dynamic json):
vendorId = json['vendorId'] == null ? null : nativeFromJson<String>(json['vendorId']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
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 ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder otherTyped = other as ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder;
return vendorId == otherTyped.vendorId &&
date == otherTyped.date &&
location == otherTyped.location;
}
@override
int get hashCode => Object.hashAll([vendorId.hashCode, date.hashCode, location.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
if (vendorId != null) {
json['vendorId'] = nativeToJson<String?>(vendorId);
}
if (date != null) {
json['date'] = date!.toJson();
}
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
return json;
}
ListShiftRolesByBusinessAndOrderShiftRolesShiftOrder({
this.vendorId,
this.date,
this.location,
});
}
@immutable
class ListShiftRolesByBusinessAndOrderData {
final List<ListShiftRolesByBusinessAndOrderShiftRoles> shiftRoles;
ListShiftRolesByBusinessAndOrderData.fromJson(dynamic json):
shiftRoles = (json['shiftRoles'] as List<dynamic>)
.map((e) => ListShiftRolesByBusinessAndOrderShiftRoles.fromJson(e))
.toList();
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndOrderData otherTyped = other as ListShiftRolesByBusinessAndOrderData;
return shiftRoles == otherTyped.shiftRoles;
}
@override
int get hashCode => shiftRoles.hashCode;
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['shiftRoles'] = shiftRoles.map((e) => e.toJson()).toList();
return json;
}
ListShiftRolesByBusinessAndOrderData({
required this.shiftRoles,
});
}
@immutable
class ListShiftRolesByBusinessAndOrderVariables {
final String businessId;
final String orderId;
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.')
ListShiftRolesByBusinessAndOrderVariables.fromJson(Map<String, dynamic> json):
businessId = nativeFromJson<String>(json['businessId']),
orderId = nativeFromJson<String>(json['orderId']) {
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 ListShiftRolesByBusinessAndOrderVariables otherTyped = other as ListShiftRolesByBusinessAndOrderVariables;
return businessId == otherTyped.businessId &&
orderId == otherTyped.orderId &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => Object.hashAll([businessId.hashCode, orderId.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['businessId'] = nativeToJson<String>(businessId);
json['orderId'] = nativeToJson<String>(orderId);
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
ListShiftRolesByBusinessAndOrderVariables({
required this.businessId,
required this.orderId,
required this.offset,
required this.limit,
});
}

View File

@@ -0,0 +1,385 @@
part of 'generated.dart';
class ListShiftRolesByBusinessDateRangeCompletedOrdersVariablesBuilder {
String businessId;
Timestamp start;
Timestamp end;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; ListShiftRolesByBusinessDateRangeCompletedOrdersVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListShiftRolesByBusinessDateRangeCompletedOrdersVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
ListShiftRolesByBusinessDateRangeCompletedOrdersVariablesBuilder(this._dataConnect, {required this.businessId,required this.start,required this.end,});
Deserializer<ListShiftRolesByBusinessDateRangeCompletedOrdersData> dataDeserializer = (dynamic json) => ListShiftRolesByBusinessDateRangeCompletedOrdersData.fromJson(jsonDecode(json));
Serializer<ListShiftRolesByBusinessDateRangeCompletedOrdersVariables> varsSerializer = (ListShiftRolesByBusinessDateRangeCompletedOrdersVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<ListShiftRolesByBusinessDateRangeCompletedOrdersData, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables>> execute() {
return ref().execute();
}
QueryRef<ListShiftRolesByBusinessDateRangeCompletedOrdersData, ListShiftRolesByBusinessDateRangeCompletedOrdersVariables> ref() {
ListShiftRolesByBusinessDateRangeCompletedOrdersVariables vars= ListShiftRolesByBusinessDateRangeCompletedOrdersVariables(businessId: businessId,start: start,end: end,offset: _offset,limit: _limit,);
return _dataConnect.query("listShiftRolesByBusinessDateRangeCompletedOrders", dataDeserializer, varsSerializer, vars);
}
}
@immutable
class ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRoles {
final String shiftId;
final String roleId;
final int count;
final int? assigned;
final double? hours;
final Timestamp? startTime;
final Timestamp? endTime;
final double? totalValue;
final ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesRole role;
final ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShift shift;
ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRoles.fromJson(dynamic json):
shiftId = nativeFromJson<String>(json['shiftId']),
roleId = nativeFromJson<String>(json['roleId']),
count = nativeFromJson<int>(json['count']),
assigned = json['assigned'] == null ? null : nativeFromJson<int>(json['assigned']),
hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']),
endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
totalValue = json['totalValue'] == null ? null : nativeFromJson<double>(json['totalValue']),
role = ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesRole.fromJson(json['role']),
shift = ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShift.fromJson(json['shift']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRoles otherTyped = other as ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRoles;
return shiftId == otherTyped.shiftId &&
roleId == otherTyped.roleId &&
count == otherTyped.count &&
assigned == otherTyped.assigned &&
hours == otherTyped.hours &&
startTime == otherTyped.startTime &&
endTime == otherTyped.endTime &&
totalValue == otherTyped.totalValue &&
role == otherTyped.role &&
shift == otherTyped.shift;
}
@override
int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, hours.hashCode, startTime.hashCode, endTime.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['shiftId'] = nativeToJson<String>(shiftId);
json['roleId'] = nativeToJson<String>(roleId);
json['count'] = nativeToJson<int>(count);
if (assigned != null) {
json['assigned'] = nativeToJson<int?>(assigned);
}
if (hours != null) {
json['hours'] = nativeToJson<double?>(hours);
}
if (startTime != null) {
json['startTime'] = startTime!.toJson();
}
if (endTime != null) {
json['endTime'] = endTime!.toJson();
}
if (totalValue != null) {
json['totalValue'] = nativeToJson<double?>(totalValue);
}
json['role'] = role.toJson();
json['shift'] = shift.toJson();
return json;
}
ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRoles({
required this.shiftId,
required this.roleId,
required this.count,
this.assigned,
this.hours,
this.startTime,
this.endTime,
this.totalValue,
required this.role,
required this.shift,
});
}
@immutable
class ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesRole {
final String id;
final String name;
final double costPerHour;
ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesRole.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
name = nativeFromJson<String>(json['name']),
costPerHour = nativeFromJson<double>(json['costPerHour']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesRole otherTyped = other as ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesRole;
return id == otherTyped.id &&
name == otherTyped.name &&
costPerHour == otherTyped.costPerHour;
}
@override
int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['name'] = nativeToJson<String>(name);
json['costPerHour'] = nativeToJson<double>(costPerHour);
return json;
}
ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesRole({
required this.id,
required this.name,
required this.costPerHour,
});
}
@immutable
class ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShift {
final String id;
final Timestamp? date;
final String? location;
final String? locationAddress;
final String title;
final EnumValue<ShiftStatus>? status;
final ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShiftOrder order;
ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShift.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
title = nativeFromJson<String>(json['title']),
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
order = ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShiftOrder.fromJson(json['order']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShift otherTyped = other as ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShift;
return id == otherTyped.id &&
date == otherTyped.date &&
location == otherTyped.location &&
locationAddress == otherTyped.locationAddress &&
title == otherTyped.title &&
status == otherTyped.status &&
order == otherTyped.order;
}
@override
int get hashCode => Object.hashAll([id.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, title.hashCode, status.hashCode, order.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
if (date != null) {
json['date'] = date!.toJson();
}
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
if (locationAddress != null) {
json['locationAddress'] = nativeToJson<String?>(locationAddress);
}
json['title'] = nativeToJson<String>(title);
if (status != null) {
json['status'] =
shiftStatusSerializer(status!)
;
}
json['order'] = order.toJson();
return json;
}
ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShift({
required this.id,
this.date,
this.location,
this.locationAddress,
required this.title,
this.status,
required this.order,
});
}
@immutable
class ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShiftOrder {
final String id;
final EnumValue<OrderType> orderType;
ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShiftOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
orderType = orderTypeDeserializer(json['orderType']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShiftOrder otherTyped = other as ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShiftOrder;
return id == otherTyped.id &&
orderType == otherTyped.orderType;
}
@override
int get hashCode => Object.hashAll([id.hashCode, orderType.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['orderType'] =
orderTypeSerializer(orderType)
;
return json;
}
ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRolesShiftOrder({
required this.id,
required this.orderType,
});
}
@immutable
class ListShiftRolesByBusinessDateRangeCompletedOrdersData {
final List<ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRoles> shiftRoles;
ListShiftRolesByBusinessDateRangeCompletedOrdersData.fromJson(dynamic json):
shiftRoles = (json['shiftRoles'] as List<dynamic>)
.map((e) => ListShiftRolesByBusinessDateRangeCompletedOrdersShiftRoles.fromJson(e))
.toList();
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessDateRangeCompletedOrdersData otherTyped = other as ListShiftRolesByBusinessDateRangeCompletedOrdersData;
return shiftRoles == otherTyped.shiftRoles;
}
@override
int get hashCode => shiftRoles.hashCode;
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['shiftRoles'] = shiftRoles.map((e) => e.toJson()).toList();
return json;
}
ListShiftRolesByBusinessDateRangeCompletedOrdersData({
required this.shiftRoles,
});
}
@immutable
class ListShiftRolesByBusinessDateRangeCompletedOrdersVariables {
final String businessId;
final Timestamp start;
final Timestamp end;
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.')
ListShiftRolesByBusinessDateRangeCompletedOrdersVariables.fromJson(Map<String, dynamic> json):
businessId = nativeFromJson<String>(json['businessId']),
start = Timestamp.fromJson(json['start']),
end = Timestamp.fromJson(json['end']) {
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 ListShiftRolesByBusinessDateRangeCompletedOrdersVariables otherTyped = other as ListShiftRolesByBusinessDateRangeCompletedOrdersVariables;
return businessId == otherTyped.businessId &&
start == otherTyped.start &&
end == otherTyped.end &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => Object.hashAll([businessId.hashCode, start.hashCode, end.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['businessId'] = nativeToJson<String>(businessId);
json['start'] = start.toJson();
json['end'] = end.toJson();
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
ListShiftRolesByBusinessDateRangeCompletedOrdersVariables({
required this.businessId,
required this.start,
required this.end,
required this.offset,
required this.limit,
});
}

View File

@@ -6,6 +6,7 @@ class UpdateOrderVariablesBuilder {
Optional<String> _businessId = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _location = Optional.optional(nativeFromJson, nativeToJson);
Optional<OrderStatus> _status = Optional.optional((data) => OrderStatus.values.byName(data), enumSerializer);
Optional<Timestamp> _date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer);
Optional<Timestamp> _startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer);
Optional<Timestamp> _endDate = Optional.optional((json) => json['endDate'] = Timestamp.fromJson(json['endDate']), defaultSerializer);
Optional<double> _total = Optional.optional(nativeFromJson, nativeToJson);
@@ -36,6 +37,10 @@ class UpdateOrderVariablesBuilder {
_status.value = t;
return this;
}
UpdateOrderVariablesBuilder date(Timestamp? t) {
_date.value = t;
return this;
}
UpdateOrderVariablesBuilder startDate(Timestamp? t) {
_startDate.value = t;
return this;
@@ -97,7 +102,7 @@ class UpdateOrderVariablesBuilder {
}
MutationRef<UpdateOrderData, UpdateOrderVariables> ref() {
UpdateOrderVariables vars= UpdateOrderVariables(id: id,vendorId: _vendorId,businessId: _businessId,location: _location,status: _status,startDate: _startDate,endDate: _endDate,total: _total,eventName: _eventName,assignedStaff: _assignedStaff,shifts: _shifts,requested: _requested,hub: _hub,recurringDays: _recurringDays,permanentDays: _permanentDays,notes: _notes,detectedConflicts: _detectedConflicts,poReference: _poReference,);
UpdateOrderVariables vars= UpdateOrderVariables(id: id,vendorId: _vendorId,businessId: _businessId,location: _location,status: _status,date: _date,startDate: _startDate,endDate: _endDate,total: _total,eventName: _eventName,assignedStaff: _assignedStaff,shifts: _shifts,requested: _requested,hub: _hub,recurringDays: _recurringDays,permanentDays: _permanentDays,notes: _notes,detectedConflicts: _detectedConflicts,poReference: _poReference,);
return _dataConnect.mutation("updateOrder", dataDeserializer, varsSerializer, vars);
}
}
@@ -179,6 +184,7 @@ class UpdateOrderVariables {
late final Optional<String>businessId;
late final Optional<String>location;
late final Optional<OrderStatus>status;
late final Optional<Timestamp>date;
late final Optional<Timestamp>startDate;
late final Optional<Timestamp>endDate;
late final Optional<double>total;
@@ -215,6 +221,10 @@ class UpdateOrderVariables {
status.value = json['status'] == null ? null : OrderStatus.values.byName(json['status']);
date = Optional.optional((json) => json['date'] = Timestamp.fromJson(json['date']), defaultSerializer);
date.value = json['date'] == null ? null : Timestamp.fromJson(json['date']);
startDate = Optional.optional((json) => json['startDate'] = Timestamp.fromJson(json['startDate']), defaultSerializer);
startDate.value = json['startDate'] == null ? null : Timestamp.fromJson(json['startDate']);
@@ -282,6 +292,7 @@ class UpdateOrderVariables {
businessId == otherTyped.businessId &&
location == otherTyped.location &&
status == otherTyped.status &&
date == otherTyped.date &&
startDate == otherTyped.startDate &&
endDate == otherTyped.endDate &&
total == otherTyped.total &&
@@ -298,7 +309,7 @@ class UpdateOrderVariables {
}
@override
int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, businessId.hashCode, location.hashCode, status.hashCode, startDate.hashCode, endDate.hashCode, total.hashCode, eventName.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, detectedConflicts.hashCode, poReference.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, vendorId.hashCode, businessId.hashCode, location.hashCode, status.hashCode, date.hashCode, startDate.hashCode, endDate.hashCode, total.hashCode, eventName.hashCode, assignedStaff.hashCode, shifts.hashCode, requested.hashCode, hub.hashCode, recurringDays.hashCode, permanentDays.hashCode, notes.hashCode, detectedConflicts.hashCode, poReference.hashCode]);
Map<String, dynamic> toJson() {
@@ -316,6 +327,9 @@ class UpdateOrderVariables {
if(status.state == OptionalState.set) {
json['status'] = status.toJson();
}
if(date.state == OptionalState.set) {
json['date'] = date.toJson();
}
if(startDate.state == OptionalState.set) {
json['startDate'] = startDate.toJson();
}
@@ -364,6 +378,7 @@ class UpdateOrderVariables {
required this.businessId,
required this.location,
required this.status,
required this.date,
required this.startDate,
required this.endDate,
required this.total,

View File

@@ -48,6 +48,7 @@ class OrderRepositoryMock {
return <OrderItem>[
OrderItem(
id: '1',
orderId: 'order_1',
title: 'Server - Wedding',
clientName: 'Grand Plaza Hotel',
status: 'filled',
@@ -75,6 +76,7 @@ class OrderRepositoryMock {
),
OrderItem(
id: '2',
orderId: 'order_2',
title: 'Bartender - Private Event',
clientName: 'Taste of the Town',
status: 'open',
@@ -101,6 +103,7 @@ class OrderRepositoryMock {
),
OrderItem(
id: '3',
orderId: 'order_3',
title: 'Event Staff',
clientName: 'City Center',
status: 'in_progress',
@@ -125,6 +128,7 @@ class OrderRepositoryMock {
),
OrderItem(
id: '4',
orderId: 'order_4',
title: 'Coat Check',
clientName: 'The Met Museum',
status: 'completed',