chore(legacy): relocate v1 dataconnect source

This commit is contained in:
zouantchaw
2026-03-18 15:04:18 +01:00
parent c9e917bed5
commit 1d850811c4
164 changed files with 55 additions and 26 deletions

View File

@@ -0,0 +1,225 @@
mutation CreateStaff(
$userId: String!
$fullName: String!
$level: String
$role: String
$phone: String
$email: String
$photoUrl: String
$totalShifts: Int
$averageRating: Float
$onTimeRate: Int
$noShowCount: Int
$cancellationCount: Int
$reliabilityScore: Int
$bio: String
$skills: [String!]
$industries: [String!]
$preferredLocations: [String!]
$maxDistanceMiles: Int
$languages: Any
$itemsAttire: Any
$xp: Int
$badges: Any
$isRecommended: Boolean
$ownerId: UUID
$department: DepartmentType
$hubId: UUID
$manager: UUID
$english: EnglishProficiency
$backgroundCheckStatus: BackgroundCheckStatus
$employmentType: EmploymentType
$initial: String
$englishRequired: Boolean
$isProfileVisible: Boolean
$city: String
$addres: String
$placeId: String
$latitude: Float
$longitude: Float
$state: String
$street: String
$country: String
$zipCode: String
) @auth(level: USER) {
staff_insert(
data: {
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
isProfileVisible: $isProfileVisible
city: $city
addres: $addres
placeId: $placeId
latitude: $latitude
longitude: $longitude
state: $state
street: $street
country: $country
zipCode: $zipCode
}
)
}
mutation UpdateStaff(
$id: UUID!
$userId: String
$fullName: String
$level: String
$role: String
$phone: String
$email: String
$photoUrl: String
$totalShifts: Int
$averageRating: Float
$onTimeRate: Int
$noShowCount: Int
$cancellationCount: Int
$reliabilityScore: Int
$bio: String
$skills: [String!]
$industries: [String!]
$preferredLocations: [String!]
$maxDistanceMiles: Int
$languages: Any
$itemsAttire: Any
$xp: Int
$badges: Any
$isRecommended: Boolean
$ownerId: UUID
$department: DepartmentType
$hubId: UUID
$manager: UUID
$english: EnglishProficiency
$backgroundCheckStatus: BackgroundCheckStatus
$employmentType: EmploymentType
$initial: String
$englishRequired: Boolean
$isProfileVisible: Boolean
$city: String
$addres: String
$placeId: String
$latitude: Float
$longitude: Float
$state: String
$street: String
$country: String
$zipCode: String
) @auth(level: USER) {
staff_update(
id: $id
data: {
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
isProfileVisible: $isProfileVisible
city: $city
addres: $addres
placeId: $placeId
latitude: $latitude
longitude: $longitude
state: $state
street: $street
country: $country
zipCode: $zipCode
}
)
}
mutation DeleteStaff($id: UUID!) @auth(level: USER) {
staff_delete(id: $id)
}
mutation UpdateStaffProfileVisibility($id: UUID!, $isProfileVisible: Boolean!) @auth(level: USER) {
staff_update(
id: $id
data: {
isProfileVisible: $isProfileVisible
}
)
}

View File

@@ -0,0 +1,50 @@
# ==========================================================
# STAFF PROFILE COMPLETION - QUERIES
# ==========================================================
query getStaffProfileCompletion($id: UUID!) @auth(level: USER) {
staff(id: $id) {
id
fullName
email
phone
preferredLocations
industries
skills
}
emergencyContacts(where: { staffId: { eq: $id } }) {
id
}
}
query getStaffPersonalInfoCompletion($id: UUID!) @auth(level: USER) {
staff(id: $id) {
id
fullName
email
phone
preferredLocations
}
}
query getStaffEmergencyProfileCompletion($id: UUID!) @auth(level: USER) {
emergencyContacts(where: { staffId: { eq: $id } }) {
id
}
}
query getStaffExperienceProfileCompletion($id: UUID!) @auth(level: USER) {
staff(id: $id) {
id
industries
skills
}
}
query getStaffTaxFormsProfileCompletion($id: UUID!) @auth(level: USER) {
taxForms(where: { staffId: { eq: $id } }) {
id
formType
status
}
}

View File

@@ -0,0 +1,213 @@
query listStaff @auth(level: USER) {
staffs {
id
userId
fullName
level
role
phone
email
photoUrl
isProfileVisible
totalShifts
averageRating
onTimeRate
noShowCount
cancellationCount
reliabilityScore
xp
badges
isRecommended
bio
skills
industries
preferredLocations
maxDistanceMiles
languages
itemsAttire
ownerId
createdAt
department
hubId
manager
english
backgroundCheckStatus
employmentType
initial
englishRequired
city
addres
placeId
latitude
longitude
state
street
country
zipCode
}
}
query getStaffById($id: UUID!) @auth(level: USER) {
staff(id: $id) {
id
userId
fullName
role
level
phone
email
photoUrl
isProfileVisible
totalShifts
averageRating
onTimeRate
noShowCount
cancellationCount
reliabilityScore
xp
badges
isRecommended
bio
skills
industries
preferredLocations
maxDistanceMiles
languages
itemsAttire
ownerId
createdAt
updatedAt
createdBy
department
hubId
manager
english
backgroundCheckStatus
employmentType
initial
englishRequired
city
addres
placeId
latitude
longitude
state
street
country
zipCode
}
}
query getStaffByUserId($userId: String!) @auth(level: USER) {
staffs(where: { userId: { eq: $userId } }) {
id
userId
fullName
level
phone
email
photoUrl
isProfileVisible
totalShifts
averageRating
onTimeRate
noShowCount
cancellationCount
reliabilityScore
xp
badges
isRecommended
bio
skills
industries
preferredLocations
maxDistanceMiles
languages
itemsAttire
ownerId
createdAt
updatedAt
createdBy
department
hubId
manager
english
backgroundCheckStatus
employmentType
initial
englishRequired
city
addres
placeId
latitude
longitude
state
street
country
zipCode
}
}
query filterStaff(
$ownerId: UUID
$fullName: String
$level: String
$email: String
) @auth(level: USER) {
staffs(
where: {
ownerId: { eq: $ownerId }
fullName: { eq: $fullName }
level: { eq: $level }
email: { eq: $email }
}
) {
id
userId
fullName
level
phone
email
photoUrl
isProfileVisible
averageRating
reliabilityScore
totalShifts
ownerId
isRecommended
skills
industries
backgroundCheckStatus
employmentType
initial
englishRequired
city
addres
placeId
latitude
longitude
state
street
country
zipCode
}
}
query getStaffProfileVisibility($staffId: UUID!) @auth(level: USER) {
staff(id: $staffId) {
id
isProfileVisible
}
}