account working

This commit is contained in:
José Salazar
2026-01-26 13:57:04 -05:00
parent 42a11590f1
commit 1934d4caab
13 changed files with 19419 additions and 19282 deletions

View File

@@ -1,16 +1,16 @@
# Basic Usage
```dart
ExampleConnector.instance.CreateUser(createUserVariables).execute();
ExampleConnector.instance.UpdateUser(updateUserVariables).execute();
ExampleConnector.instance.DeleteUser(deleteUserVariables).execute();
ExampleConnector.instance.listVendorRates().execute();
ExampleConnector.instance.getVendorRateById(getVendorRateByIdVariables).execute();
ExampleConnector.instance.listApplications().execute();
ExampleConnector.instance.getApplicationById(getApplicationByIdVariables).execute();
ExampleConnector.instance.getApplicationsByShiftId(getApplicationsByShiftIdVariables).execute();
ExampleConnector.instance.getApplicationsByShiftIdAndStatus(getApplicationsByShiftIdAndStatusVariables).execute();
ExampleConnector.instance.getApplicationsByStaffId(getApplicationsByStaffIdVariables).execute();
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();
```
@@ -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.listStaffAvailabilitiesByDay({ ... })
.offset(...)
await ExampleConnector.instance.updateVendor({ ... })
.companyName(...)
.execute();
```

View File

@@ -6,11 +6,21 @@ class CreateAccountVariablesBuilder {
String last4;
Optional<bool> _isPrimary = Optional.optional(nativeFromJson, nativeToJson);
String ownerId;
Optional<String> _accountNumber = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _routeNumber = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; CreateAccountVariablesBuilder isPrimary(bool? t) {
_isPrimary.value = t;
return this;
}
CreateAccountVariablesBuilder accountNumber(String? t) {
_accountNumber.value = t;
return this;
}
CreateAccountVariablesBuilder routeNumber(String? t) {
_routeNumber.value = t;
return this;
}
CreateAccountVariablesBuilder(this._dataConnect, {required this.bank,required this.type,required this.last4,required this.ownerId,});
Deserializer<CreateAccountData> dataDeserializer = (dynamic json) => CreateAccountData.fromJson(jsonDecode(json));
@@ -20,7 +30,7 @@ class CreateAccountVariablesBuilder {
}
MutationRef<CreateAccountData, CreateAccountVariables> ref() {
CreateAccountVariables vars= CreateAccountVariables(bank: bank,type: type,last4: last4,isPrimary: _isPrimary,ownerId: ownerId,);
CreateAccountVariables vars= CreateAccountVariables(bank: bank,type: type,last4: last4,isPrimary: _isPrimary,ownerId: ownerId,accountNumber: _accountNumber,routeNumber: _routeNumber,);
return _dataConnect.mutation("createAccount", dataDeserializer, varsSerializer, vars);
}
}
@@ -100,6 +110,8 @@ class CreateAccountVariables {
final String last4;
late final Optional<bool>isPrimary;
final String ownerId;
late final Optional<String>accountNumber;
late final Optional<String>routeNumber;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
CreateAccountVariables.fromJson(Map<String, dynamic> json):
@@ -116,6 +128,14 @@ class CreateAccountVariables {
isPrimary.value = json['isPrimary'] == null ? null : nativeFromJson<bool>(json['isPrimary']);
accountNumber = Optional.optional(nativeFromJson, nativeToJson);
accountNumber.value = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']);
routeNumber = Optional.optional(nativeFromJson, nativeToJson);
routeNumber.value = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']);
}
@override
bool operator ==(Object other) {
@@ -131,11 +151,13 @@ class CreateAccountVariables {
type == otherTyped.type &&
last4 == otherTyped.last4 &&
isPrimary == otherTyped.isPrimary &&
ownerId == otherTyped.ownerId;
ownerId == otherTyped.ownerId &&
accountNumber == otherTyped.accountNumber &&
routeNumber == otherTyped.routeNumber;
}
@override
int get hashCode => Object.hashAll([bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode]);
int get hashCode => Object.hashAll([bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode]);
Map<String, dynamic> toJson() {
@@ -149,6 +171,12 @@ class CreateAccountVariables {
json['isPrimary'] = isPrimary.toJson();
}
json['ownerId'] = nativeToJson<String>(ownerId);
if(accountNumber.state == OptionalState.set) {
json['accountNumber'] = accountNumber.toJson();
}
if(routeNumber.state == OptionalState.set) {
json['routeNumber'] = routeNumber.toJson();
}
return json;
}
@@ -158,6 +186,8 @@ class CreateAccountVariables {
required this.last4,
required this.isPrimary,
required this.ownerId,
required this.accountNumber,
required this.routeNumber,
});
}

View File

@@ -45,6 +45,8 @@ class FilterAccountsAccounts {
final String last4;
final bool? isPrimary;
final String ownerId;
final String? accountNumber;
final String? routeNumber;
FilterAccountsAccounts.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
@@ -52,7 +54,9 @@ class FilterAccountsAccounts {
type = accountTypeDeserializer(json['type']),
last4 = nativeFromJson<String>(json['last4']),
isPrimary = json['isPrimary'] == null ? null : nativeFromJson<bool>(json['isPrimary']),
ownerId = nativeFromJson<String>(json['ownerId']);
ownerId = nativeFromJson<String>(json['ownerId']),
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -68,11 +72,13 @@ class FilterAccountsAccounts {
type == otherTyped.type &&
last4 == otherTyped.last4 &&
isPrimary == otherTyped.isPrimary &&
ownerId == otherTyped.ownerId;
ownerId == otherTyped.ownerId &&
accountNumber == otherTyped.accountNumber &&
routeNumber == otherTyped.routeNumber;
}
@override
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode]);
Map<String, dynamic> toJson() {
@@ -87,6 +93,12 @@ class FilterAccountsAccounts {
json['isPrimary'] = nativeToJson<bool?>(isPrimary);
}
json['ownerId'] = nativeToJson<String>(ownerId);
if (accountNumber != null) {
json['accountNumber'] = nativeToJson<String?>(accountNumber);
}
if (routeNumber != null) {
json['routeNumber'] = nativeToJson<String?>(routeNumber);
}
return json;
}
@@ -97,6 +109,8 @@ class FilterAccountsAccounts {
required this.last4,
this.isPrimary,
required this.ownerId,
this.accountNumber,
this.routeNumber,
});
}

View File

@@ -25,9 +25,9 @@ class GetAccountByIdAccount {
final String last4;
final bool? isPrimary;
final String ownerId;
final String? accountNumber;
final String? routeNumber;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
GetAccountByIdAccount.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
@@ -36,9 +36,9 @@ class GetAccountByIdAccount {
last4 = nativeFromJson<String>(json['last4']),
isPrimary = json['isPrimary'] == null ? null : nativeFromJson<bool>(json['isPrimary']),
ownerId = nativeFromJson<String>(json['ownerId']),
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']);
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -55,13 +55,13 @@ class GetAccountByIdAccount {
last4 == otherTyped.last4 &&
isPrimary == otherTyped.isPrimary &&
ownerId == otherTyped.ownerId &&
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
accountNumber == otherTyped.accountNumber &&
routeNumber == otherTyped.routeNumber &&
createdAt == otherTyped.createdAt;
}
@override
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, createdAt.hashCode]);
Map<String, dynamic> toJson() {
@@ -76,15 +76,15 @@ class GetAccountByIdAccount {
json['isPrimary'] = nativeToJson<bool?>(isPrimary);
}
json['ownerId'] = nativeToJson<String>(ownerId);
if (accountNumber != null) {
json['accountNumber'] = nativeToJson<String?>(accountNumber);
}
if (routeNumber != null) {
json['routeNumber'] = nativeToJson<String?>(routeNumber);
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json;
}
@@ -95,9 +95,9 @@ class GetAccountByIdAccount {
required this.last4,
this.isPrimary,
required this.ownerId,
this.accountNumber,
this.routeNumber,
this.createdAt,
this.updatedAt,
this.createdBy,
});
}

View File

@@ -25,9 +25,9 @@ class GetAccountsByOwnerIdAccounts {
final String last4;
final bool? isPrimary;
final String ownerId;
final String? accountNumber;
final String? routeNumber;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
GetAccountsByOwnerIdAccounts.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
@@ -36,9 +36,9 @@ class GetAccountsByOwnerIdAccounts {
last4 = nativeFromJson<String>(json['last4']),
isPrimary = json['isPrimary'] == null ? null : nativeFromJson<bool>(json['isPrimary']),
ownerId = nativeFromJson<String>(json['ownerId']),
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']);
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -55,13 +55,13 @@ class GetAccountsByOwnerIdAccounts {
last4 == otherTyped.last4 &&
isPrimary == otherTyped.isPrimary &&
ownerId == otherTyped.ownerId &&
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
accountNumber == otherTyped.accountNumber &&
routeNumber == otherTyped.routeNumber &&
createdAt == otherTyped.createdAt;
}
@override
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, createdAt.hashCode]);
Map<String, dynamic> toJson() {
@@ -76,15 +76,15 @@ class GetAccountsByOwnerIdAccounts {
json['isPrimary'] = nativeToJson<bool?>(isPrimary);
}
json['ownerId'] = nativeToJson<String>(ownerId);
if (accountNumber != null) {
json['accountNumber'] = nativeToJson<String?>(accountNumber);
}
if (routeNumber != null) {
json['routeNumber'] = nativeToJson<String?>(routeNumber);
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json;
}
@@ -95,9 +95,9 @@ class GetAccountsByOwnerIdAccounts {
required this.last4,
this.isPrimary,
required this.ownerId,
this.accountNumber,
this.routeNumber,
this.createdAt,
this.updatedAt,
this.createdBy,
});
}

View File

@@ -24,9 +24,9 @@ class ListAccountsAccounts {
final String last4;
final bool? isPrimary;
final String ownerId;
final String? accountNumber;
final String? routeNumber;
final Timestamp? createdAt;
final Timestamp? updatedAt;
final String? createdBy;
ListAccountsAccounts.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
@@ -35,9 +35,9 @@ class ListAccountsAccounts {
last4 = nativeFromJson<String>(json['last4']),
isPrimary = json['isPrimary'] == null ? null : nativeFromJson<bool>(json['isPrimary']),
ownerId = nativeFromJson<String>(json['ownerId']),
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']);
accountNumber = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']),
routeNumber = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']),
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
@@ -54,13 +54,13 @@ class ListAccountsAccounts {
last4 == otherTyped.last4 &&
isPrimary == otherTyped.isPrimary &&
ownerId == otherTyped.ownerId &&
createdAt == otherTyped.createdAt &&
updatedAt == otherTyped.updatedAt &&
createdBy == otherTyped.createdBy;
accountNumber == otherTyped.accountNumber &&
routeNumber == otherTyped.routeNumber &&
createdAt == otherTyped.createdAt;
}
@override
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, ownerId.hashCode, accountNumber.hashCode, routeNumber.hashCode, createdAt.hashCode]);
Map<String, dynamic> toJson() {
@@ -75,15 +75,15 @@ class ListAccountsAccounts {
json['isPrimary'] = nativeToJson<bool?>(isPrimary);
}
json['ownerId'] = nativeToJson<String>(ownerId);
if (accountNumber != null) {
json['accountNumber'] = nativeToJson<String?>(accountNumber);
}
if (routeNumber != null) {
json['routeNumber'] = nativeToJson<String?>(routeNumber);
}
if (createdAt != null) {
json['createdAt'] = createdAt!.toJson();
}
if (updatedAt != null) {
json['updatedAt'] = updatedAt!.toJson();
}
if (createdBy != null) {
json['createdBy'] = nativeToJson<String?>(createdBy);
}
return json;
}
@@ -94,9 +94,9 @@ class ListAccountsAccounts {
required this.last4,
this.isPrimary,
required this.ownerId,
this.accountNumber,
this.routeNumber,
this.createdAt,
this.updatedAt,
this.createdBy,
});
}

View File

@@ -6,6 +6,8 @@ class UpdateAccountVariablesBuilder {
Optional<AccountType> _type = Optional.optional((data) => AccountType.values.byName(data), enumSerializer);
Optional<String> _last4 = Optional.optional(nativeFromJson, nativeToJson);
Optional<bool> _isPrimary = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _accountNumber = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _routeNumber = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; UpdateAccountVariablesBuilder bank(String? t) {
_bank.value = t;
@@ -23,6 +25,14 @@ class UpdateAccountVariablesBuilder {
_isPrimary.value = t;
return this;
}
UpdateAccountVariablesBuilder accountNumber(String? t) {
_accountNumber.value = t;
return this;
}
UpdateAccountVariablesBuilder routeNumber(String? t) {
_routeNumber.value = t;
return this;
}
UpdateAccountVariablesBuilder(this._dataConnect, {required this.id,});
Deserializer<UpdateAccountData> dataDeserializer = (dynamic json) => UpdateAccountData.fromJson(jsonDecode(json));
@@ -32,7 +42,7 @@ class UpdateAccountVariablesBuilder {
}
MutationRef<UpdateAccountData, UpdateAccountVariables> ref() {
UpdateAccountVariables vars= UpdateAccountVariables(id: id,bank: _bank,type: _type,last4: _last4,isPrimary: _isPrimary,);
UpdateAccountVariables vars= UpdateAccountVariables(id: id,bank: _bank,type: _type,last4: _last4,isPrimary: _isPrimary,accountNumber: _accountNumber,routeNumber: _routeNumber,);
return _dataConnect.mutation("updateAccount", dataDeserializer, varsSerializer, vars);
}
}
@@ -114,6 +124,8 @@ class UpdateAccountVariables {
late final Optional<AccountType>type;
late final Optional<String>last4;
late final Optional<bool>isPrimary;
late final Optional<String>accountNumber;
late final Optional<String>routeNumber;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
UpdateAccountVariables.fromJson(Map<String, dynamic> json):
@@ -136,6 +148,14 @@ class UpdateAccountVariables {
isPrimary = Optional.optional(nativeFromJson, nativeToJson);
isPrimary.value = json['isPrimary'] == null ? null : nativeFromJson<bool>(json['isPrimary']);
accountNumber = Optional.optional(nativeFromJson, nativeToJson);
accountNumber.value = json['accountNumber'] == null ? null : nativeFromJson<String>(json['accountNumber']);
routeNumber = Optional.optional(nativeFromJson, nativeToJson);
routeNumber.value = json['routeNumber'] == null ? null : nativeFromJson<String>(json['routeNumber']);
}
@override
bool operator ==(Object other) {
@@ -151,11 +171,13 @@ class UpdateAccountVariables {
bank == otherTyped.bank &&
type == otherTyped.type &&
last4 == otherTyped.last4 &&
isPrimary == otherTyped.isPrimary;
isPrimary == otherTyped.isPrimary &&
accountNumber == otherTyped.accountNumber &&
routeNumber == otherTyped.routeNumber;
}
@override
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, bank.hashCode, type.hashCode, last4.hashCode, isPrimary.hashCode, accountNumber.hashCode, routeNumber.hashCode]);
Map<String, dynamic> toJson() {
@@ -173,6 +195,12 @@ class UpdateAccountVariables {
if(isPrimary.state == OptionalState.set) {
json['isPrimary'] = isPrimary.toJson();
}
if(accountNumber.state == OptionalState.set) {
json['accountNumber'] = accountNumber.toJson();
}
if(routeNumber.state == OptionalState.set) {
json['routeNumber'] = routeNumber.toJson();
}
return json;
}
@@ -182,6 +210,8 @@ class UpdateAccountVariables {
required this.type,
required this.last4,
required this.isPrimary,
required this.accountNumber,
required this.routeNumber,
});
}