Created
December 11, 2019 04:19
-
-
Save tabvn/62a3b44e8d284d01af40308fa1d4b205 to your computer and use it in GitHub Desktop.
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
using System; | |
using Newtonsoft.Json; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace bha | |
{ | |
public class GraphQL | |
{ | |
static HttpClient Client = new HttpClient(); | |
public string Token { get; set; } | |
public GraphQL() | |
{ | |
} | |
public async Task<string> Execute(dynamic data) | |
{ | |
var json = JsonConvert.SerializeObject(data); | |
if (Token != null && Token != "") | |
{ | |
Client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Token); | |
} | |
var url = "https://api.cloud.bodyhealthanalyzer.com/query"; | |
var response = await Client.PostAsync(url, new StringContent(json, Encoding.UTF8, "application/json")); | |
string result = response.Content.ReadAsStringAsync().Result; | |
Console.WriteLine(result); | |
return result; | |
} | |
public partial class NewClient | |
{ | |
[JsonProperty("caregiverRegistrationNumber")] | |
public string CaregiverRegistrationNumber { get; set; } | |
[JsonProperty("caregiverInviteToken")] | |
public string CaregiverInviteToken { get; set; } | |
[JsonProperty("gender")] | |
public string Gender { get; set; } | |
[JsonProperty("dateOfBirth")] | |
public string DateOfBirth { get; set; } | |
[JsonProperty("healthNotes")] | |
public string HealthNotes { get; set; } | |
[JsonProperty("guideId")] | |
public long? GuideId { get; set; } | |
[JsonProperty("preferredBreathRate")] | |
public string PreferredBreathRate { get; set; } | |
[JsonProperty("audioGuide")] | |
public bool? AudioGuide { get; set; } | |
[JsonProperty("audioType")] | |
public string AudioType { get; set; } | |
[JsonProperty("audioFile")] | |
public string AudioFile { get; set; } | |
[JsonProperty("disclaimerAccepted")] | |
public bool? DisclaimerAccepted { get; set; } | |
} | |
public partial class NewCaregiverClient | |
{ | |
[JsonProperty("firstName")] | |
public string FirstName { get; set; } | |
[JsonProperty("lastName")] | |
public string LastName { get; set; } | |
[JsonProperty("namePrefix")] | |
public string NamePrefix { get; set; } | |
[JsonProperty("nameSuffix")] | |
public string NameSuffix { get; set; } | |
[JsonProperty("phone")] | |
public string Phone { get; set; } | |
[JsonProperty("email")] | |
public string Email { get; set; } | |
[JsonProperty("username")] | |
public string Username { get; set; } | |
[JsonProperty("gender")] | |
public string Gender { get; set; } | |
[JsonProperty("dateOfBirth")] | |
public string DateOfBirth { get; set; } | |
[JsonProperty("heathNotes")] | |
public string HeathNotes { get; set; } | |
} | |
public partial class Login | |
{ | |
[JsonProperty("username")] | |
public string Username { get; set; } | |
[JsonProperty("email")] | |
public string Email { get; set; } | |
[JsonProperty("password")] | |
public string Password { get; set; } | |
} | |
public partial class UpdateUser | |
{ | |
[JsonProperty("id")] | |
public long Id { get; set; } | |
[JsonProperty("firstName")] | |
public string FirstName { get; set; } | |
[JsonProperty("lastName")] | |
public string LastName { get; set; } | |
[JsonProperty("namePrefix")] | |
public string NamePrefix { get; set; } | |
[JsonProperty("nameSuffix")] | |
public string NameSuffix { get; set; } | |
[JsonProperty("phone")] | |
public string Phone { get; set; } | |
[JsonProperty("email")] | |
public string Email { get; set; } | |
[JsonProperty("username")] | |
public string Username { get; set; } | |
[JsonProperty("address")] | |
public string Address { get; set; } | |
[JsonProperty("status")] | |
public string Status { get; set; } | |
[JsonProperty("roles")] | |
public string[] Roles { get; set; } | |
[JsonProperty("newPassword")] | |
public string NewPassword { get; set; } | |
[JsonProperty("isPasswordExpired")] | |
public bool? IsPasswordExpired { get; set; } | |
} | |
public partial class UpdateGuide | |
{ | |
[JsonProperty("id")] | |
public long Id { get; set; } | |
[JsonProperty("name")] | |
public string Name { get; set; } | |
[JsonProperty("inhaleTime")] | |
public double? InhaleTime { get; set; } | |
[JsonProperty("holdTime")] | |
public double? HoldTime { get; set; } | |
[JsonProperty("exhaleTime")] | |
public double? ExhaleTime { get; set; } | |
[JsonProperty("pauseTime")] | |
public double? PauseTime { get; set; } | |
} | |
public partial class NewAccount | |
{ | |
[JsonProperty("userType")] | |
public string UserType { get; set; } | |
[JsonProperty("firstName")] | |
public string FirstName { get; set; } | |
[JsonProperty("lastName")] | |
public string LastName { get; set; } | |
[JsonProperty("namePrefix")] | |
public string NamePrefix { get; set; } | |
[JsonProperty("nameSuffix")] | |
public string NameSuffix { get; set; } | |
[JsonProperty("phone")] | |
public string Phone { get; set; } | |
[JsonProperty("email")] | |
public string Email { get; set; } | |
[JsonProperty("username")] | |
public string Username { get; set; } | |
[JsonProperty("password")] | |
public string Password { get; set; } | |
[JsonProperty("address")] | |
public string Address { get; set; } | |
[JsonProperty("language")] | |
public string Language { get; set; } | |
[JsonProperty("measuringSystem")] | |
public string MeasuringSystem { get; set; } | |
} | |
public partial class NewCaregiver | |
{ | |
[JsonProperty("businessName")] | |
public string BusinessName { get; set; } | |
} | |
public partial class NewData | |
{ | |
[JsonProperty("procedureId")] | |
public long ProcedureId { get; set; } | |
[JsonProperty("clientId")] | |
public long? ClientId { get; set; } | |
[JsonProperty("procedureComment")] | |
public string ProcedureComment { get; set; } | |
[JsonProperty("data")] | |
public string Data { get; set; } | |
[JsonProperty("rawData1")] | |
public string RawData1 { get; set; } | |
[JsonProperty("rawData2")] | |
public string RawData2 { get; set; } | |
} | |
public partial class FindFilter | |
{ | |
[JsonProperty("search")] | |
public string Search { get; set; } | |
[JsonProperty("limit")] | |
public long? Limit { get; set; } | |
[JsonProperty("offset")] | |
public long? Offset { get; set; } | |
} | |
public partial class UpdateEnableProcedures | |
{ | |
[JsonProperty("userId")] | |
public long? UserId { get; set; } | |
[JsonProperty("procedures")] | |
public UpdateEnableProcedure[] Procedures { get; set; } | |
} | |
public partial class UpdateProcedure | |
{ | |
[JsonProperty("id")] | |
public long Id { get; set; } | |
[JsonProperty("name")] | |
public string Name { get; set; } | |
} | |
public partial class DataFilter | |
{ | |
[JsonProperty("search")] | |
public string Search { get; set; } | |
[JsonProperty("procedureId")] | |
public long? ProcedureId { get; set; } | |
[JsonProperty("clientId")] | |
public long? ClientId { get; set; } | |
[JsonProperty("limit")] | |
public long? Limit { get; set; } | |
[JsonProperty("offset")] | |
public long? Offset { get; set; } | |
} | |
public partial class RequestResetPassword | |
{ | |
[JsonProperty("email")] | |
public string Email { get; set; } | |
[JsonProperty("username")] | |
public string Username { get; set; } | |
} | |
public partial class UpdateData | |
{ | |
[JsonProperty("id")] | |
public long Id { get; set; } | |
[JsonProperty("procedureComment")] | |
public string ProcedureComment { get; set; } | |
} | |
public partial class NewUser | |
{ | |
[JsonProperty("account")] | |
public NewAccount Account { get; set; } | |
[JsonProperty("client")] | |
public NewClient Client { get; set; } | |
[JsonProperty("caregiver")] | |
public NewCaregiver Caregiver { get; set; } | |
} | |
public partial class UpdateEnableProcedure | |
{ | |
[JsonProperty("procedureId")] | |
public long ProcedureId { get; set; } | |
[JsonProperty("isEnabled")] | |
public bool IsEnabled { get; set; } | |
} | |
public partial class NewGuide | |
{ | |
[JsonProperty("name")] | |
public string Name { get; set; } | |
[JsonProperty("inhaleTime")] | |
public double? InhaleTime { get; set; } | |
[JsonProperty("holdTime")] | |
public double? HoldTime { get; set; } | |
[JsonProperty("exhaleTime")] | |
public double? ExhaleTime { get; set; } | |
[JsonProperty("pauseTime")] | |
public double? PauseTime { get; set; } | |
} | |
public partial class ResetPassword | |
{ | |
[JsonProperty("newPassword")] | |
public string NewPassword { get; set; } | |
[JsonProperty("token")] | |
public string Token { get; set; } | |
} | |
public partial class RegisterMutation | |
{ | |
public RegisterMutation() | |
{ | |
Query = @"mutation register($input:NewUser!) { register(input: $input){id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public RegisterVariables Variables { get; set; } | |
} | |
public partial class RegisterVariables | |
{ | |
[JsonProperty("input")] | |
public NewUser Input { get; set; } | |
} | |
public partial class LoginMutation | |
{ | |
public LoginMutation() | |
{ | |
Query = @"mutation login($input:Login!) { login(input: $input){id user {id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}expiredAt }}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public LoginVariables Variables { get; set; } | |
} | |
public partial class LoginVariables | |
{ | |
[JsonProperty("input")] | |
public Login Input { get; set; } | |
} | |
public partial class LogoutMutation | |
{ | |
public LogoutMutation() | |
{ | |
Query = @"mutation logout"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public LogoutVariables Variables { get; set; } | |
} | |
public partial class LogoutVariables | |
{ | |
} | |
public partial class UpdateUserMutation | |
{ | |
public UpdateUserMutation() | |
{ | |
Query = @"mutation updateUser($input:UpdateUser!) { updateUser(input: $input){id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public UpdateUserVariables Variables { get; set; } | |
} | |
public partial class UpdateUserVariables | |
{ | |
[JsonProperty("input")] | |
public UpdateUser Input { get; set; } | |
} | |
public partial class RequestResetPasswordMutation | |
{ | |
public RequestResetPasswordMutation() | |
{ | |
Query = @"mutation requestResetPassword($input:RequestResetPassword!) { requestResetPassword(input: $input)"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public RequestResetPasswordVariables Variables { get; set; } | |
} | |
public partial class RequestResetPasswordVariables | |
{ | |
[JsonProperty("input")] | |
public RequestResetPassword Input { get; set; } | |
} | |
public partial class ResetPasswordMutation | |
{ | |
public ResetPasswordMutation() | |
{ | |
Query = @"mutation resetPassword($input:ResetPassword!) { resetPassword(input: $input)"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public ResetPasswordVariables Variables { get; set; } | |
} | |
public partial class ResetPasswordVariables | |
{ | |
[JsonProperty("input")] | |
public ResetPassword Input { get; set; } | |
} | |
public partial class EnableUserProceduresMutation | |
{ | |
public EnableUserProceduresMutation() | |
{ | |
Query = @"mutation enableUserProcedures($input:UpdateEnableProcedures!) { enableUserProcedures(input: $input)"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public EnableUserProceduresVariables Variables { get; set; } | |
} | |
public partial class EnableUserProceduresVariables | |
{ | |
[JsonProperty("input")] | |
public UpdateEnableProcedures Input { get; set; } | |
} | |
public partial class UpdateProcedureMutation | |
{ | |
public UpdateProcedureMutation() | |
{ | |
Query = @"mutation updateProcedure($input:UpdateProcedure!) { updateProcedure(input: $input){id name createdAt }}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public UpdateProcedureVariables Variables { get; set; } | |
} | |
public partial class UpdateProcedureVariables | |
{ | |
[JsonProperty("input")] | |
public UpdateProcedure Input { get; set; } | |
} | |
public partial class DeleteProcedureMutation | |
{ | |
public DeleteProcedureMutation() | |
{ | |
Query = @"mutation deleteProcedure($id:ID!) { deleteProcedure(id: $id)"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public DeleteProcedureVariables Variables { get; set; } | |
} | |
public partial class DeleteProcedureVariables | |
{ | |
[JsonProperty("id")] | |
public long Id { get; set; } | |
} | |
public partial class InviteClientMutation | |
{ | |
public InviteClientMutation() | |
{ | |
Query = @"mutation inviteClient($email:String!) { inviteClient(email: $email)"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public InviteClientVariables Variables { get; set; } | |
} | |
public partial class InviteClientVariables | |
{ | |
[JsonProperty("email")] | |
public string Email { get; set; } | |
} | |
public partial class StopShareWithCaregiverMutation | |
{ | |
public StopShareWithCaregiverMutation() | |
{ | |
Query = @"mutation stopShareWithCaregiver($caregiverId:ID!) { stopShareWithCaregiver(caregiverId: $caregiverId)"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public StopShareWithCaregiverVariables Variables { get; set; } | |
} | |
public partial class StopShareWithCaregiverVariables | |
{ | |
[JsonProperty("caregiverId")] | |
public long CaregiverId { get; set; } | |
} | |
public partial class AcceptCaregiverInviteMutation | |
{ | |
public AcceptCaregiverInviteMutation() | |
{ | |
Query = @"mutation acceptCaregiverInvite($token:String!) { acceptCaregiverInvite(token: $token)"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public AcceptCaregiverInviteVariables Variables { get; set; } | |
} | |
public partial class AcceptCaregiverInviteVariables | |
{ | |
[JsonProperty("token")] | |
public string Token { get; set; } | |
} | |
public partial class CreateGuideMutation | |
{ | |
public CreateGuideMutation() | |
{ | |
Query = @"mutation createGuide($input:NewGuide!) { createGuide(input: $input){id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public CreateGuideVariables Variables { get; set; } | |
} | |
public partial class CreateGuideVariables | |
{ | |
[JsonProperty("input")] | |
public NewGuide Input { get; set; } | |
} | |
public partial class UpdateGuideMutation | |
{ | |
public UpdateGuideMutation() | |
{ | |
Query = @"mutation updateGuide($input:UpdateGuide!) { updateGuide(input: $input){id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public UpdateGuideVariables Variables { get; set; } | |
} | |
public partial class UpdateGuideVariables | |
{ | |
[JsonProperty("input")] | |
public UpdateGuide Input { get; set; } | |
} | |
public partial class DeleteGuideMutation | |
{ | |
public DeleteGuideMutation() | |
{ | |
Query = @"mutation deleteGuide($id:ID!) { deleteGuide(id: $id)"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public DeleteGuideVariables Variables { get; set; } | |
} | |
public partial class DeleteGuideVariables | |
{ | |
[JsonProperty("id")] | |
public long Id { get; set; } | |
} | |
public partial class CreateProcedureDataMutation | |
{ | |
public CreateProcedureDataMutation() | |
{ | |
Query = @"mutation createProcedureData($input:NewData!) { createProcedureData(input: $input){id procedure {id name createdAt }user {id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}procedureComment data rawData1 rawData2 createdAt }}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public CreateProcedureDataVariables Variables { get; set; } | |
} | |
public partial class CreateProcedureDataVariables | |
{ | |
[JsonProperty("input")] | |
public NewData Input { get; set; } | |
} | |
public partial class UpdateProcedureDataMutation | |
{ | |
public UpdateProcedureDataMutation() | |
{ | |
Query = @"mutation updateProcedureData($input:UpdateData!) { updateProcedureData(input: $input){id procedure {id name createdAt }user {id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}procedureComment data rawData1 rawData2 createdAt }}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public UpdateProcedureDataVariables Variables { get; set; } | |
} | |
public partial class UpdateProcedureDataVariables | |
{ | |
[JsonProperty("input")] | |
public UpdateData Input { get; set; } | |
} | |
public partial class DeleteDataMutation | |
{ | |
public DeleteDataMutation() | |
{ | |
Query = @"mutation deleteData($id:ID!) { deleteData(id: $id)"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public DeleteDataVariables Variables { get; set; } | |
} | |
public partial class DeleteDataVariables | |
{ | |
[JsonProperty("id")] | |
public long Id { get; set; } | |
} | |
public partial class MeQuery | |
{ | |
public MeQuery() | |
{ | |
Query = @"query me{id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public MeVariables Variables { get; set; } | |
} | |
public partial class MeVariables | |
{ | |
} | |
public partial class UserQuery | |
{ | |
public UserQuery() | |
{ | |
Query = @"query user($id:ID!) { user(id: $id){id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public UserVariables Variables { get; set; } | |
} | |
public partial class UserVariables | |
{ | |
[JsonProperty("id")] | |
public long Id { get; set; } | |
} | |
public partial class UsersQuery | |
{ | |
public UsersQuery() | |
{ | |
Query = @"query users($filter:FindFilter) { users(filter: $filter){total nodes {id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public UsersVariables Variables { get; set; } | |
} | |
public partial class UsersVariables | |
{ | |
[JsonProperty("filter")] | |
public FindFilter Filter { get; set; } | |
} | |
public partial class ClientsQuery | |
{ | |
public ClientsQuery() | |
{ | |
Query = @"query clients($filter:FindFilter) { clients(filter: $filter){total nodes {id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public ClientsVariables Variables { get; set; } | |
} | |
public partial class ClientsVariables | |
{ | |
[JsonProperty("filter")] | |
public FindFilter Filter { get; set; } | |
} | |
public partial class CaregiversQuery | |
{ | |
public CaregiversQuery() | |
{ | |
Query = @"query caregivers($filter:FindFilter) { caregivers(filter: $filter){total nodes {id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public CaregiversVariables Variables { get; set; } | |
} | |
public partial class CaregiversVariables | |
{ | |
[JsonProperty("filter")] | |
public FindFilter Filter { get; set; } | |
} | |
public partial class CaregiverInfoByInviteTokenQuery | |
{ | |
public CaregiverInfoByInviteTokenQuery() | |
{ | |
Query = @"query caregiverInfoByInviteToken($inviteToken:String!) { caregiverInfoByInviteToken(inviteToken: $inviteToken){id clientUserId businessName inviteEmail }}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public CaregiverInfoByInviteTokenVariables Variables { get; set; } | |
} | |
public partial class CaregiverInfoByInviteTokenVariables | |
{ | |
[JsonProperty("inviteToken")] | |
public string InviteToken { get; set; } | |
} | |
public partial class CaregiverClientsQuery | |
{ | |
public CaregiverClientsQuery() | |
{ | |
Query = @"query caregiverClients($caregiverId:ID!,$filter:FindFilter) { caregiverClients(caregiverId: $caregiverId,filter: $filter){total nodes {id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public CaregiverClientsVariables Variables { get; set; } | |
} | |
public partial class CaregiverClientsVariables | |
{ | |
[JsonProperty("caregiverId")] | |
public long CaregiverId { get; set; } | |
[JsonProperty("filter")] | |
public FindFilter Filter { get; set; } | |
} | |
public partial class ProceduresQuery | |
{ | |
public ProceduresQuery() | |
{ | |
Query = @"query procedures"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public ProceduresVariables Variables { get; set; } | |
} | |
public partial class ProceduresVariables | |
{ | |
} | |
public partial class GuidesQuery | |
{ | |
public GuidesQuery() | |
{ | |
Query = @"query guides($filter:FindFilter) { guides(filter: $filter){total nodes {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public GuidesVariables Variables { get; set; } | |
} | |
public partial class GuidesVariables | |
{ | |
[JsonProperty("filter")] | |
public FindFilter Filter { get; set; } | |
} | |
public partial class FindDataQuery | |
{ | |
public FindDataQuery() | |
{ | |
Query = @"query findData($filter:DataFilter) { findData(filter: $filter){total nodes {id procedure {id name createdAt }user {id userType firstName lastName namePrefix nameSuffix phone email username roles address status language measuringSystem lastAccessed lastResetPassword isPasswordExpired createdAt caregiver {id businessName shareCode }client {id caregiverRegistrationNumber gender dateOfBirth heathNotes guide {id caregiver {id businessName shareCode }name inhaleTime holdTime exhaleTime pauseTime isPredefined createdAt }preferredBreathRate audioGuide audioType audioFile disclaimerAccepted lastTested }enabledProcedures {id procedureId name isEnabled createdAt }}procedureComment data rawData1 rawData2 createdAt }}}"; | |
} | |
[JsonProperty("operationName")] | |
public string OperationName { get; set; } | |
[JsonProperty("query")] | |
public string Query { get; set; } | |
[JsonProperty("variables")] | |
public FindDataVariables Variables { get; set; } | |
} | |
public partial class FindDataVariables | |
{ | |
[JsonProperty("filter")] | |
public DataFilter Filter { get; set; } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment