registration and login ready, with some validations

This commit is contained in:
José Salazar
2026-01-26 10:48:33 -05:00
parent 7bd276269b
commit 0ba5a9ae16
23 changed files with 21278 additions and 21055 deletions

View File

@@ -1,16 +1,16 @@
# Basic Usage
```dart
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();
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();
```
@@ -23,7 +23,7 @@ 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.getRapidOrders({ ... })
await ExampleConnector.instance.listStaffAvailabilitiesByDay({ ... })
.offset(...)
.execute();
```

View File

@@ -15,6 +15,7 @@ class CreateStaffVariablesBuilder {
Optional<int> _cancellationCount = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _reliabilityScore = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _bio = Optional.optional(nativeFromJson, nativeToJson);
Optional<AnyValue> _skills = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<AnyValue> _industries = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<AnyValue> _preferredLocations = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<int> _maxDistanceMiles = Optional.optional(nativeFromJson, nativeToJson);
@@ -83,6 +84,10 @@ class CreateStaffVariablesBuilder {
_bio.value = t;
return this;
}
CreateStaffVariablesBuilder skills(AnyValue? t) {
_skills.value = t;
return this;
}
CreateStaffVariablesBuilder industries(AnyValue? t) {
_industries.value = t;
return this;
@@ -168,7 +173,7 @@ class CreateStaffVariablesBuilder {
}
MutationRef<CreateStaffData, CreateStaffVariables> ref() {
CreateStaffVariables vars= CreateStaffVariables(userId: userId,fullName: fullName,level: _level,role: _role,phone: _phone,email: _email,photoUrl: _photoUrl,totalShifts: _totalShifts,averageRating: _averageRating,onTimeRate: _onTimeRate,noShowCount: _noShowCount,cancellationCount: _cancellationCount,reliabilityScore: _reliabilityScore,bio: _bio,industries: _industries,preferredLocations: _preferredLocations,maxDistanceMiles: _maxDistanceMiles,languages: _languages,itemsAttire: _itemsAttire,xp: _xp,badges: _badges,isRecommended: _isRecommended,ownerId: _ownerId,department: _department,hubId: _hubId,manager: _manager,english: _english,backgroundCheckStatus: _backgroundCheckStatus,employmentType: _employmentType,initial: _initial,englishRequired: _englishRequired,city: _city,addres: _addres,);
CreateStaffVariables vars= CreateStaffVariables(userId: userId,fullName: fullName,level: _level,role: _role,phone: _phone,email: _email,photoUrl: _photoUrl,totalShifts: _totalShifts,averageRating: _averageRating,onTimeRate: _onTimeRate,noShowCount: _noShowCount,cancellationCount: _cancellationCount,reliabilityScore: _reliabilityScore,bio: _bio,skills: _skills,industries: _industries,preferredLocations: _preferredLocations,maxDistanceMiles: _maxDistanceMiles,languages: _languages,itemsAttire: _itemsAttire,xp: _xp,badges: _badges,isRecommended: _isRecommended,ownerId: _ownerId,department: _department,hubId: _hubId,manager: _manager,english: _english,backgroundCheckStatus: _backgroundCheckStatus,employmentType: _employmentType,initial: _initial,englishRequired: _englishRequired,city: _city,addres: _addres,);
return _dataConnect.mutation("CreateStaff", dataDeserializer, varsSerializer, vars);
}
}
@@ -257,6 +262,7 @@ class CreateStaffVariables {
late final Optional<int>cancellationCount;
late final Optional<int>reliabilityScore;
late final Optional<String>bio;
late final Optional<AnyValue>skills;
late final Optional<AnyValue>industries;
late final Optional<AnyValue>preferredLocations;
late final Optional<int>maxDistanceMiles;
@@ -333,6 +339,10 @@ class CreateStaffVariables {
bio.value = json['bio'] == null ? null : nativeFromJson<String>(json['bio']);
skills = Optional.optional(AnyValue.fromJson, defaultSerializer);
skills.value = json['skills'] == null ? null : AnyValue.fromJson(json['skills']);
industries = Optional.optional(AnyValue.fromJson, defaultSerializer);
industries.value = json['industries'] == null ? null : AnyValue.fromJson(json['industries']);
@@ -433,6 +443,7 @@ class CreateStaffVariables {
cancellationCount == otherTyped.cancellationCount &&
reliabilityScore == otherTyped.reliabilityScore &&
bio == otherTyped.bio &&
skills == otherTyped.skills &&
industries == otherTyped.industries &&
preferredLocations == otherTyped.preferredLocations &&
maxDistanceMiles == otherTyped.maxDistanceMiles &&
@@ -455,7 +466,7 @@ class CreateStaffVariables {
}
@override
int get hashCode => Object.hashAll([userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, ownerId.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
int get hashCode => Object.hashAll([userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, bio.hashCode, skills.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, ownerId.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
Map<String, dynamic> toJson() {
@@ -498,6 +509,9 @@ class CreateStaffVariables {
if(bio.state == OptionalState.set) {
json['bio'] = bio.toJson();
}
if(skills.state == OptionalState.set) {
json['skills'] = skills.toJson();
}
if(industries.state == OptionalState.set) {
json['industries'] = industries.toJson();
}
@@ -573,6 +587,7 @@ class CreateStaffVariables {
required this.cancellationCount,
required this.reliabilityScore,
required this.bio,
required this.skills,
required this.industries,
required this.preferredLocations,
required this.maxDistanceMiles,

View File

@@ -51,6 +51,7 @@ class FilterStaffStaffs {
final int? totalShifts;
final String? ownerId;
final bool? isRecommended;
final AnyValue? skills;
final EnumValue<BackgroundCheckStatus>? backgroundCheckStatus;
final EnumValue<EmploymentType>? employmentType;
final String? initial;
@@ -71,6 +72,7 @@ class FilterStaffStaffs {
totalShifts = json['totalShifts'] == null ? null : nativeFromJson<int>(json['totalShifts']),
ownerId = json['ownerId'] == null ? null : nativeFromJson<String>(json['ownerId']),
isRecommended = json['isRecommended'] == null ? null : nativeFromJson<bool>(json['isRecommended']),
skills = json['skills'] == null ? null : AnyValue.fromJson(json['skills']),
backgroundCheckStatus = json['backgroundCheckStatus'] == null ? null : backgroundCheckStatusDeserializer(json['backgroundCheckStatus']),
employmentType = json['employmentType'] == null ? null : employmentTypeDeserializer(json['employmentType']),
initial = json['initial'] == null ? null : nativeFromJson<String>(json['initial']),
@@ -99,6 +101,7 @@ class FilterStaffStaffs {
totalShifts == otherTyped.totalShifts &&
ownerId == otherTyped.ownerId &&
isRecommended == otherTyped.isRecommended &&
skills == otherTyped.skills &&
backgroundCheckStatus == otherTyped.backgroundCheckStatus &&
employmentType == otherTyped.employmentType &&
initial == otherTyped.initial &&
@@ -108,7 +111,7 @@ class FilterStaffStaffs {
}
@override
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, averageRating.hashCode, reliabilityScore.hashCode, totalShifts.hashCode, ownerId.hashCode, isRecommended.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, averageRating.hashCode, reliabilityScore.hashCode, totalShifts.hashCode, ownerId.hashCode, isRecommended.hashCode, skills.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
Map<String, dynamic> toJson() {
@@ -143,6 +146,9 @@ class FilterStaffStaffs {
if (isRecommended != null) {
json['isRecommended'] = nativeToJson<bool?>(isRecommended);
}
if (skills != null) {
json['skills'] = skills!.toJson();
}
if (backgroundCheckStatus != null) {
json['backgroundCheckStatus'] =
backgroundCheckStatusSerializer(backgroundCheckStatus!)
@@ -181,6 +187,7 @@ class FilterStaffStaffs {
this.totalShifts,
this.ownerId,
this.isRecommended,
this.skills,
this.backgroundCheckStatus,
this.employmentType,
this.initial,

View File

@@ -37,6 +37,7 @@ class GetStaffByIdStaff {
final AnyValue? badges;
final bool? isRecommended;
final String? bio;
final AnyValue? skills;
final AnyValue? industries;
final AnyValue? preferredLocations;
final int? maxDistanceMiles;
@@ -76,6 +77,7 @@ class GetStaffByIdStaff {
badges = json['badges'] == null ? null : AnyValue.fromJson(json['badges']),
isRecommended = json['isRecommended'] == null ? null : nativeFromJson<bool>(json['isRecommended']),
bio = json['bio'] == null ? null : nativeFromJson<String>(json['bio']),
skills = json['skills'] == null ? null : AnyValue.fromJson(json['skills']),
industries = json['industries'] == null ? null : AnyValue.fromJson(json['industries']),
preferredLocations = json['preferredLocations'] == null ? null : AnyValue.fromJson(json['preferredLocations']),
maxDistanceMiles = json['maxDistanceMiles'] == null ? null : nativeFromJson<int>(json['maxDistanceMiles']),
@@ -123,6 +125,7 @@ class GetStaffByIdStaff {
badges == otherTyped.badges &&
isRecommended == otherTyped.isRecommended &&
bio == otherTyped.bio &&
skills == otherTyped.skills &&
industries == otherTyped.industries &&
preferredLocations == otherTyped.preferredLocations &&
maxDistanceMiles == otherTyped.maxDistanceMiles &&
@@ -145,7 +148,7 @@ class GetStaffByIdStaff {
}
@override
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, role.hashCode, level.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, role.hashCode, level.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, skills.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
Map<String, dynamic> toJson() {
@@ -198,6 +201,9 @@ class GetStaffByIdStaff {
if (bio != null) {
json['bio'] = nativeToJson<String?>(bio);
}
if (skills != null) {
json['skills'] = skills!.toJson();
}
if (industries != null) {
json['industries'] = industries!.toJson();
}
@@ -285,6 +291,7 @@ class GetStaffByIdStaff {
this.badges,
this.isRecommended,
this.bio,
this.skills,
this.industries,
this.preferredLocations,
this.maxDistanceMiles,

View File

@@ -36,6 +36,7 @@ class GetStaffByUserIdStaffs {
final AnyValue? badges;
final bool? isRecommended;
final String? bio;
final AnyValue? skills;
final AnyValue? industries;
final AnyValue? preferredLocations;
final int? maxDistanceMiles;
@@ -74,6 +75,7 @@ class GetStaffByUserIdStaffs {
badges = json['badges'] == null ? null : AnyValue.fromJson(json['badges']),
isRecommended = json['isRecommended'] == null ? null : nativeFromJson<bool>(json['isRecommended']),
bio = json['bio'] == null ? null : nativeFromJson<String>(json['bio']),
skills = json['skills'] == null ? null : AnyValue.fromJson(json['skills']),
industries = json['industries'] == null ? null : AnyValue.fromJson(json['industries']),
preferredLocations = json['preferredLocations'] == null ? null : AnyValue.fromJson(json['preferredLocations']),
maxDistanceMiles = json['maxDistanceMiles'] == null ? null : nativeFromJson<int>(json['maxDistanceMiles']),
@@ -120,6 +122,7 @@ class GetStaffByUserIdStaffs {
badges == otherTyped.badges &&
isRecommended == otherTyped.isRecommended &&
bio == otherTyped.bio &&
skills == otherTyped.skills &&
industries == otherTyped.industries &&
preferredLocations == otherTyped.preferredLocations &&
maxDistanceMiles == otherTyped.maxDistanceMiles &&
@@ -142,7 +145,7 @@ class GetStaffByUserIdStaffs {
}
@override
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, skills.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, updatedAt.hashCode, createdBy.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
Map<String, dynamic> toJson() {
@@ -192,6 +195,9 @@ class GetStaffByUserIdStaffs {
if (bio != null) {
json['bio'] = nativeToJson<String?>(bio);
}
if (skills != null) {
json['skills'] = skills!.toJson();
}
if (industries != null) {
json['industries'] = industries!.toJson();
}
@@ -278,6 +284,7 @@ class GetStaffByUserIdStaffs {
this.badges,
this.isRecommended,
this.bio,
this.skills,
this.industries,
this.preferredLocations,
this.maxDistanceMiles,

View File

@@ -36,6 +36,7 @@ class ListStaffStaffs {
final AnyValue? badges;
final bool? isRecommended;
final String? bio;
final AnyValue? skills;
final AnyValue? industries;
final AnyValue? preferredLocations;
final int? maxDistanceMiles;
@@ -73,6 +74,7 @@ class ListStaffStaffs {
badges = json['badges'] == null ? null : AnyValue.fromJson(json['badges']),
isRecommended = json['isRecommended'] == null ? null : nativeFromJson<bool>(json['isRecommended']),
bio = json['bio'] == null ? null : nativeFromJson<String>(json['bio']),
skills = json['skills'] == null ? null : AnyValue.fromJson(json['skills']),
industries = json['industries'] == null ? null : AnyValue.fromJson(json['industries']),
preferredLocations = json['preferredLocations'] == null ? null : AnyValue.fromJson(json['preferredLocations']),
maxDistanceMiles = json['maxDistanceMiles'] == null ? null : nativeFromJson<int>(json['maxDistanceMiles']),
@@ -118,6 +120,7 @@ class ListStaffStaffs {
badges == otherTyped.badges &&
isRecommended == otherTyped.isRecommended &&
bio == otherTyped.bio &&
skills == otherTyped.skills &&
industries == otherTyped.industries &&
preferredLocations == otherTyped.preferredLocations &&
maxDistanceMiles == otherTyped.maxDistanceMiles &&
@@ -138,7 +141,7 @@ class ListStaffStaffs {
}
@override
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, bio.hashCode, skills.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, ownerId.hashCode, createdAt.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
Map<String, dynamic> toJson() {
@@ -191,6 +194,9 @@ class ListStaffStaffs {
if (bio != null) {
json['bio'] = nativeToJson<String?>(bio);
}
if (skills != null) {
json['skills'] = skills!.toJson();
}
if (industries != null) {
json['industries'] = industries!.toJson();
}
@@ -272,6 +278,7 @@ class ListStaffStaffs {
this.badges,
this.isRecommended,
this.bio,
this.skills,
this.industries,
this.preferredLocations,
this.maxDistanceMiles,

View File

@@ -16,6 +16,7 @@ class UpdateStaffVariablesBuilder {
Optional<int> _cancellationCount = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _reliabilityScore = Optional.optional(nativeFromJson, nativeToJson);
Optional<String> _bio = Optional.optional(nativeFromJson, nativeToJson);
Optional<AnyValue> _skills = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<AnyValue> _industries = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<AnyValue> _preferredLocations = Optional.optional(AnyValue.fromJson, defaultSerializer);
Optional<int> _maxDistanceMiles = Optional.optional(nativeFromJson, nativeToJson);
@@ -92,6 +93,10 @@ class UpdateStaffVariablesBuilder {
_bio.value = t;
return this;
}
UpdateStaffVariablesBuilder skills(AnyValue? t) {
_skills.value = t;
return this;
}
UpdateStaffVariablesBuilder industries(AnyValue? t) {
_industries.value = t;
return this;
@@ -177,7 +182,7 @@ class UpdateStaffVariablesBuilder {
}
MutationRef<UpdateStaffData, UpdateStaffVariables> ref() {
UpdateStaffVariables vars= UpdateStaffVariables(id: id,userId: _userId,fullName: _fullName,level: _level,role: _role,phone: _phone,email: _email,photoUrl: _photoUrl,totalShifts: _totalShifts,averageRating: _averageRating,onTimeRate: _onTimeRate,noShowCount: _noShowCount,cancellationCount: _cancellationCount,reliabilityScore: _reliabilityScore,bio: _bio,industries: _industries,preferredLocations: _preferredLocations,maxDistanceMiles: _maxDistanceMiles,languages: _languages,itemsAttire: _itemsAttire,xp: _xp,badges: _badges,isRecommended: _isRecommended,ownerId: _ownerId,department: _department,hubId: _hubId,manager: _manager,english: _english,backgroundCheckStatus: _backgroundCheckStatus,employmentType: _employmentType,initial: _initial,englishRequired: _englishRequired,city: _city,addres: _addres,);
UpdateStaffVariables vars= UpdateStaffVariables(id: id,userId: _userId,fullName: _fullName,level: _level,role: _role,phone: _phone,email: _email,photoUrl: _photoUrl,totalShifts: _totalShifts,averageRating: _averageRating,onTimeRate: _onTimeRate,noShowCount: _noShowCount,cancellationCount: _cancellationCount,reliabilityScore: _reliabilityScore,bio: _bio,skills: _skills,industries: _industries,preferredLocations: _preferredLocations,maxDistanceMiles: _maxDistanceMiles,languages: _languages,itemsAttire: _itemsAttire,xp: _xp,badges: _badges,isRecommended: _isRecommended,ownerId: _ownerId,department: _department,hubId: _hubId,manager: _manager,english: _english,backgroundCheckStatus: _backgroundCheckStatus,employmentType: _employmentType,initial: _initial,englishRequired: _englishRequired,city: _city,addres: _addres,);
return _dataConnect.mutation("UpdateStaff", dataDeserializer, varsSerializer, vars);
}
}
@@ -269,6 +274,7 @@ class UpdateStaffVariables {
late final Optional<int>cancellationCount;
late final Optional<int>reliabilityScore;
late final Optional<String>bio;
late final Optional<AnyValue>skills;
late final Optional<AnyValue>industries;
late final Optional<AnyValue>preferredLocations;
late final Optional<int>maxDistanceMiles;
@@ -351,6 +357,10 @@ class UpdateStaffVariables {
bio.value = json['bio'] == null ? null : nativeFromJson<String>(json['bio']);
skills = Optional.optional(AnyValue.fromJson, defaultSerializer);
skills.value = json['skills'] == null ? null : AnyValue.fromJson(json['skills']);
industries = Optional.optional(AnyValue.fromJson, defaultSerializer);
industries.value = json['industries'] == null ? null : AnyValue.fromJson(json['industries']);
@@ -452,6 +462,7 @@ class UpdateStaffVariables {
cancellationCount == otherTyped.cancellationCount &&
reliabilityScore == otherTyped.reliabilityScore &&
bio == otherTyped.bio &&
skills == otherTyped.skills &&
industries == otherTyped.industries &&
preferredLocations == otherTyped.preferredLocations &&
maxDistanceMiles == otherTyped.maxDistanceMiles &&
@@ -474,7 +485,7 @@ class UpdateStaffVariables {
}
@override
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, bio.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, ownerId.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
int get hashCode => Object.hashAll([id.hashCode, userId.hashCode, fullName.hashCode, level.hashCode, role.hashCode, phone.hashCode, email.hashCode, photoUrl.hashCode, totalShifts.hashCode, averageRating.hashCode, onTimeRate.hashCode, noShowCount.hashCode, cancellationCount.hashCode, reliabilityScore.hashCode, bio.hashCode, skills.hashCode, industries.hashCode, preferredLocations.hashCode, maxDistanceMiles.hashCode, languages.hashCode, itemsAttire.hashCode, xp.hashCode, badges.hashCode, isRecommended.hashCode, ownerId.hashCode, department.hashCode, hubId.hashCode, manager.hashCode, english.hashCode, backgroundCheckStatus.hashCode, employmentType.hashCode, initial.hashCode, englishRequired.hashCode, city.hashCode, addres.hashCode]);
Map<String, dynamic> toJson() {
@@ -522,6 +533,9 @@ class UpdateStaffVariables {
if(bio.state == OptionalState.set) {
json['bio'] = bio.toJson();
}
if(skills.state == OptionalState.set) {
json['skills'] = skills.toJson();
}
if(industries.state == OptionalState.set) {
json['industries'] = industries.toJson();
}
@@ -598,6 +612,7 @@ class UpdateStaffVariables {
required this.cancellationCount,
required this.reliabilityScore,
required this.bio,
required this.skills,
required this.industries,
required this.preferredLocations,
required this.maxDistanceMiles,

View File

@@ -0,0 +1,29 @@
import 'package:krow_domain/krow_domain.dart' as domain;
class StaffSession {
final domain.User user;
final domain.Staff? staff;
const StaffSession({
required this.user,
this.staff,
});
}
class StaffSessionStore {
StaffSession? _session;
StaffSession? get session => _session;
void setSession(StaffSession session) {
_session = session;
}
void clear() {
_session = null;
}
static final StaffSessionStore instance = StaffSessionStore._();
StaffSessionStore._();
}