brakedown by week and month

This commit is contained in:
José Salazar
2026-01-26 17:51:30 -05:00
parent f65121a26f
commit fd06391e63
19 changed files with 18566 additions and 17804 deletions

View File

@@ -1,16 +1,16 @@
# Basic Usage
```dart
ExampleConnector.instance.createWorkforce(createWorkforceVariables).execute();
ExampleConnector.instance.updateWorkforce(updateWorkforceVariables).execute();
ExampleConnector.instance.deactivateWorkforce(deactivateWorkforceVariables).execute();
ExampleConnector.instance.listInvoices(listInvoicesVariables).execute();
ExampleConnector.instance.getInvoiceById(getInvoiceByIdVariables).execute();
ExampleConnector.instance.listInvoicesByVendorId(listInvoicesByVendorIdVariables).execute();
ExampleConnector.instance.listInvoicesByBusinessId(listInvoicesByBusinessIdVariables).execute();
ExampleConnector.instance.listInvoicesByOrderId(listInvoicesByOrderIdVariables).execute();
ExampleConnector.instance.listInvoicesByStatus(listInvoicesByStatusVariables).execute();
ExampleConnector.instance.filterInvoices(filterInvoicesVariables).execute();
ExampleConnector.instance.listBusinesses().execute();
ExampleConnector.instance.getBusinessesByUserId(getBusinessesByUserIdVariables).execute();
ExampleConnector.instance.getBusinessById(getBusinessByIdVariables).execute();
ExampleConnector.instance.createInvoice(createInvoiceVariables).execute();
ExampleConnector.instance.updateInvoice(updateInvoiceVariables).execute();
ExampleConnector.instance.deleteInvoice(deleteInvoiceVariables).execute();
ExampleConnector.instance.listRoles().execute();
ExampleConnector.instance.getRoleById(getRoleByIdVariables).execute();
ExampleConnector.instance.listRolesByVendorId(listRolesByVendorIdVariables).execute();
ExampleConnector.instance.listRolesByroleCategoryId(listRolesByroleCategoryIdVariables).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.updateVendor({ ... })
.companyName(...)
await ExampleConnector.instance.UpdateAssignment({ ... })
.title(...)
.execute();
```

View File

@@ -0,0 +1,229 @@
part of 'generated.dart';
class ListShiftRolesByBusinessAndDatesSummaryVariablesBuilder {
String businessId;
Timestamp start;
Timestamp end;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; ListShiftRolesByBusinessAndDatesSummaryVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListShiftRolesByBusinessAndDatesSummaryVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
ListShiftRolesByBusinessAndDatesSummaryVariablesBuilder(this._dataConnect, {required this.businessId,required this.start,required this.end,});
Deserializer<ListShiftRolesByBusinessAndDatesSummaryData> dataDeserializer = (dynamic json) => ListShiftRolesByBusinessAndDatesSummaryData.fromJson(jsonDecode(json));
Serializer<ListShiftRolesByBusinessAndDatesSummaryVariables> varsSerializer = (ListShiftRolesByBusinessAndDatesSummaryVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<ListShiftRolesByBusinessAndDatesSummaryData, ListShiftRolesByBusinessAndDatesSummaryVariables>> execute() {
return ref().execute();
}
QueryRef<ListShiftRolesByBusinessAndDatesSummaryData, ListShiftRolesByBusinessAndDatesSummaryVariables> ref() {
ListShiftRolesByBusinessAndDatesSummaryVariables vars= ListShiftRolesByBusinessAndDatesSummaryVariables(businessId: businessId,start: start,end: end,offset: _offset,limit: _limit,);
return _dataConnect.query("listShiftRolesByBusinessAndDatesSummary", dataDeserializer, varsSerializer, vars);
}
}
@immutable
class ListShiftRolesByBusinessAndDatesSummaryShiftRoles {
final String roleId;
final double? hours;
final double? totalValue;
final ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole role;
ListShiftRolesByBusinessAndDatesSummaryShiftRoles.fromJson(dynamic json):
roleId = nativeFromJson<String>(json['roleId']),
hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
totalValue = json['totalValue'] == null ? null : nativeFromJson<double>(json['totalValue']),
role = ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole.fromJson(json['role']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndDatesSummaryShiftRoles otherTyped = other as ListShiftRolesByBusinessAndDatesSummaryShiftRoles;
return roleId == otherTyped.roleId &&
hours == otherTyped.hours &&
totalValue == otherTyped.totalValue &&
role == otherTyped.role;
}
@override
int get hashCode => Object.hashAll([roleId.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['roleId'] = nativeToJson<String>(roleId);
if (hours != null) {
json['hours'] = nativeToJson<double?>(hours);
}
if (totalValue != null) {
json['totalValue'] = nativeToJson<double?>(totalValue);
}
json['role'] = role.toJson();
return json;
}
ListShiftRolesByBusinessAndDatesSummaryShiftRoles({
required this.roleId,
this.hours,
this.totalValue,
required this.role,
});
}
@immutable
class ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole {
final String id;
final String name;
ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
name = nativeFromJson<String>(json['name']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole otherTyped = other as ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole;
return id == otherTyped.id &&
name == otherTyped.name;
}
@override
int get hashCode => Object.hashAll([id.hashCode, name.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['name'] = nativeToJson<String>(name);
return json;
}
ListShiftRolesByBusinessAndDatesSummaryShiftRolesRole({
required this.id,
required this.name,
});
}
@immutable
class ListShiftRolesByBusinessAndDatesSummaryData {
final List<ListShiftRolesByBusinessAndDatesSummaryShiftRoles> shiftRoles;
ListShiftRolesByBusinessAndDatesSummaryData.fromJson(dynamic json):
shiftRoles = (json['shiftRoles'] as List<dynamic>)
.map((e) => ListShiftRolesByBusinessAndDatesSummaryShiftRoles.fromJson(e))
.toList();
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndDatesSummaryData otherTyped = other as ListShiftRolesByBusinessAndDatesSummaryData;
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;
}
ListShiftRolesByBusinessAndDatesSummaryData({
required this.shiftRoles,
});
}
@immutable
class ListShiftRolesByBusinessAndDatesSummaryVariables {
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.')
ListShiftRolesByBusinessAndDatesSummaryVariables.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 ListShiftRolesByBusinessAndDatesSummaryVariables otherTyped = other as ListShiftRolesByBusinessAndDatesSummaryVariables;
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;
}
ListShiftRolesByBusinessAndDatesSummaryVariables({
required this.businessId,
required this.start,
required this.end,
required this.offset,
required this.limit,
});
}