-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from uwblueprint/prasanna-karthik/api-constan…
…ts-staff Added API Constants for Staff
- Loading branch information
Showing
3 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import {gql} from "@apollo/client"; | ||
|
||
export const ADD_STAFF = gql` | ||
mutation AddStaff($staff: CreateStaffDTO!) { | ||
addStaff(staff: $staff) { | ||
userId | ||
phoneNumber | ||
firstName | ||
lastName | ||
displayName | ||
profilePictureURL | ||
isActive | ||
isAdmin | ||
} | ||
} | ||
` | ||
; | ||
|
||
export const UPDATE_STAFF = gql` | ||
mutation UpdateStaff($userId: userID!, $staff: UpdateStaffDTO!) { | ||
updateStaff(userId: $userId, staff: $staff) { | ||
userId | ||
phoneNumber | ||
firstName | ||
lastName | ||
displayName | ||
profilePictureURL | ||
isActive | ||
isAdmin | ||
} | ||
} | ||
`; | ||
|
||
export const DELETE_STAFF = gql` | ||
mutation DeleteStaff($userId: ID!) { | ||
deleteStaff(userId: $userId) { | ||
userId | ||
phoneNumber | ||
firstName | ||
lastName | ||
displayName | ||
profilePictureURL | ||
isActive | ||
isAdmin | ||
} | ||
} | ||
`; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import {gql} from "@apollo/client"; | ||
|
||
export const GET_ALL_STAFF = gql` | ||
query GetAllStaff { | ||
getAllStaff { | ||
userId | ||
phoneNumber | ||
firstName | ||
lastName | ||
displayName | ||
profilePictureURL | ||
isActive | ||
isAdmin | ||
} | ||
} | ||
`; | ||
|
||
export const GET_STAFF_BY_IDS = gql` | ||
query GetStaffByIds { | ||
getStaffByIds { | ||
userId | ||
phoneNumber | ||
firstName | ||
lastName | ||
displayName | ||
profilePictureURL | ||
isActive | ||
isAdmin | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
export type UserRequest = { | ||
userId?: string; | ||
email: string; | ||
password: string; | ||
phoneNumber?: string; | ||
firstName: string; | ||
lastName: string; | ||
isAdmin: boolean; | ||
displayName?: string; | ||
profilePictureURL?: string; | ||
isActive: boolean; | ||
}; | ||
|
||
export type UserRequestID = { | ||
userId: string; | ||
email: string; | ||
password: string; | ||
phoneNumber?: string; | ||
firstName: string; | ||
lastName: string; | ||
isAdmin: boolean; | ||
displayName?: string; | ||
profilePictureURL?: string; | ||
isActive: boolean; | ||
}; | ||
|
||
export type UserRequestAdd = { | ||
userId?: number; | ||
email: string; | ||
phoneNumber: string; | ||
firstName: string; | ||
lastName: string; | ||
displayName: string; | ||
profilePictureURL?: string; | ||
isActive: boolean; | ||
isAdmin: boolean; | ||
}; | ||
|
||
export type UserRequestUpdate = { | ||
userId: number; | ||
email?: string; | ||
phoneNumber?: string; | ||
firstName?: string; | ||
lastName?: string; | ||
displayName?: string; | ||
profilePictureURL?: string; | ||
isActive?: boolean; | ||
isAdmin?: boolean; | ||
}; | ||
|
||
export type UserRequestDelete = { | ||
userId: number; | ||
email?: string; | ||
phoneNumber?: string; | ||
firstName?: string; | ||
lastName?: string; | ||
displayName?: string; | ||
profilePictureURL?: string; | ||
isActive?: boolean; | ||
isAdmin?: boolean; | ||
}; |