mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Update gql types and mutations
This commit is contained in:
+39
-20
@@ -1,26 +1,8 @@
|
|||||||
import gql from 'graphql-tag';
|
import gql from 'graphql-tag';
|
||||||
|
|
||||||
export const SIGNUP = gql`
|
export const SIGNUP = gql`
|
||||||
mutation Signup(
|
mutation Signup($email: String!, $password: String!) {
|
||||||
$email: String!
|
signup(email: $email, password: $password) {
|
||||||
$password: String!
|
|
||||||
$firstName: String!
|
|
||||||
$lastName: String!
|
|
||||||
$phone: PhoneInputModel!
|
|
||||||
$address: AddressInputModel!
|
|
||||||
$active: Boolean!
|
|
||||||
$role: Role!
|
|
||||||
) {
|
|
||||||
signup(
|
|
||||||
email: $email
|
|
||||||
password: $password
|
|
||||||
firstName: $firstName
|
|
||||||
lastName: $lastName
|
|
||||||
phone: $phone
|
|
||||||
address: $address
|
|
||||||
active: $active
|
|
||||||
role: $role
|
|
||||||
) {
|
|
||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
email
|
email
|
||||||
@@ -115,3 +97,40 @@ export const CONFIRM_USER_RESET_PASSWORD = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const UPDATE_USER_INFO = gql`
|
||||||
|
mutation UpdateUserInfo(
|
||||||
|
$id: String!
|
||||||
|
$email: String!
|
||||||
|
$firstName: String!
|
||||||
|
$lastName: String!
|
||||||
|
$phone: PhoneInputModel!
|
||||||
|
$address: AddressInputModel!
|
||||||
|
) {
|
||||||
|
updateUserInfo(
|
||||||
|
id: $id
|
||||||
|
email: $email
|
||||||
|
firstName: $firstName
|
||||||
|
lastName: $lastName
|
||||||
|
phone: $phone
|
||||||
|
address: $address
|
||||||
|
) {
|
||||||
|
id
|
||||||
|
email
|
||||||
|
firstName
|
||||||
|
lastName
|
||||||
|
phone {
|
||||||
|
prefix
|
||||||
|
number
|
||||||
|
}
|
||||||
|
address {
|
||||||
|
place
|
||||||
|
city
|
||||||
|
country
|
||||||
|
zip
|
||||||
|
}
|
||||||
|
active
|
||||||
|
role
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|||||||
+219
-6
@@ -33,21 +33,82 @@ export type AuthResponseModel = {
|
|||||||
token: Scalars['String'];
|
token: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type CategoryResponseModel = {
|
||||||
|
__typename?: 'CategoryResponseModel';
|
||||||
|
id: Scalars['String'];
|
||||||
|
name: Scalars['String'];
|
||||||
|
description: Scalars['String'];
|
||||||
|
image: File;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type FeatureResponseModel = {
|
||||||
|
__typename?: 'FeatureResponseModel';
|
||||||
|
id: Scalars['String'];
|
||||||
|
name: Scalars['String'];
|
||||||
|
description: Scalars['String'];
|
||||||
|
featureType: Scalars['String'];
|
||||||
|
image: File;
|
||||||
|
wireframes?: Maybe<Array<FileWithOutOId>>;
|
||||||
|
price: Scalars['Float'];
|
||||||
|
repo: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type File = {
|
||||||
|
__typename?: 'File';
|
||||||
|
name: Scalars['String'];
|
||||||
|
src: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type FileWithOutOId = {
|
||||||
|
__typename?: 'FileWithOutOId';
|
||||||
|
id: Scalars['String'];
|
||||||
|
name: Scalars['String'];
|
||||||
|
src: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Introduction = {
|
||||||
|
__typename?: 'Introduction';
|
||||||
|
purpose: Scalars['String'];
|
||||||
|
documentConventions: Scalars['String'];
|
||||||
|
intendedAudience: Scalars['String'];
|
||||||
|
projectScope: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type IntroductionInput = {
|
||||||
|
purpose: Scalars['String'];
|
||||||
|
documentConventions: Scalars['String'];
|
||||||
|
intendedAudience: Scalars['String'];
|
||||||
|
projectScope: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
export type MutationRoot = {
|
export type MutationRoot = {
|
||||||
__typename?: 'MutationRoot';
|
__typename?: 'MutationRoot';
|
||||||
signup: AuthResponseModel;
|
signup: AuthResponseModel;
|
||||||
|
createUser: UserResponseModel;
|
||||||
login: AuthResponseModel;
|
login: AuthResponseModel;
|
||||||
deleteUser: UserResponseModel;
|
deleteUser: UserResponseModel;
|
||||||
updateUserInfo: UserResponseModel;
|
updateUserInfo: UserResponseModel;
|
||||||
updateUserPassword: UserResponseModel;
|
updateUserPassword: UserResponseModel;
|
||||||
resetUserPassword: UserResponseModel;
|
resetUserPassword: UserResponseModel;
|
||||||
confirmUserResetPassword: UserResponseModel;
|
confirmUserResetPassword: UserResponseModel;
|
||||||
|
deleteCategory: CategoryResponseModel;
|
||||||
|
deleteFeature: FeatureResponseModel;
|
||||||
|
deleteTemplate: TemplateModel;
|
||||||
|
addTemplateFeature: TemplateResponseModel;
|
||||||
|
deleteTemplateFeature: TemplateResponseModel;
|
||||||
|
addTemplateSpecification: TemplateResponseModel;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type MutationRootSignupArgs = {
|
export type MutationRootSignupArgs = {
|
||||||
email: Scalars['String'];
|
email: Scalars['String'];
|
||||||
password: Scalars['String'];
|
password: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationRootCreateUserArgs = {
|
||||||
|
email: Scalars['String'];
|
||||||
|
password: Scalars['String'];
|
||||||
firstName: Scalars['String'];
|
firstName: Scalars['String'];
|
||||||
lastName: Scalars['String'];
|
lastName: Scalars['String'];
|
||||||
phone: PhoneInputModel;
|
phone: PhoneInputModel;
|
||||||
@@ -71,6 +132,8 @@ export type MutationRootDeleteUserArgs = {
|
|||||||
|
|
||||||
export type MutationRootUpdateUserInfoArgs = {
|
export type MutationRootUpdateUserInfoArgs = {
|
||||||
id: Scalars['String'];
|
id: Scalars['String'];
|
||||||
|
firstName: Scalars['String'];
|
||||||
|
lastName: Scalars['String'];
|
||||||
email: Scalars['String'];
|
email: Scalars['String'];
|
||||||
phone: PhoneInputModel;
|
phone: PhoneInputModel;
|
||||||
address: AddressInputModel;
|
address: AddressInputModel;
|
||||||
@@ -93,6 +156,73 @@ export type MutationRootConfirmUserResetPasswordArgs = {
|
|||||||
password: Scalars['String'];
|
password: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationRootDeleteCategoryArgs = {
|
||||||
|
id: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationRootDeleteFeatureArgs = {
|
||||||
|
id: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationRootDeleteTemplateArgs = {
|
||||||
|
id: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationRootAddTemplateFeatureArgs = {
|
||||||
|
id: Scalars['String'];
|
||||||
|
featuresId: Array<Scalars['String']>;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationRootDeleteTemplateFeatureArgs = {
|
||||||
|
id: Scalars['String'];
|
||||||
|
featuerId: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type MutationRootAddTemplateSpecificationArgs = {
|
||||||
|
id: Scalars['String'];
|
||||||
|
specification: SpecificationInput;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type NonFunctionalRequirements = {
|
||||||
|
__typename?: 'NonFunctionalRequirements';
|
||||||
|
performanceRequirements: Scalars['String'];
|
||||||
|
safetyRequirements: Scalars['String'];
|
||||||
|
securityRequirements: Scalars['String'];
|
||||||
|
softwareQualityAttributes: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type NonFunctionalRequirementsInput = {
|
||||||
|
performanceRequirements: Scalars['String'];
|
||||||
|
safetyRequirements: Scalars['String'];
|
||||||
|
securityRequirements: Scalars['String'];
|
||||||
|
softwareQualityAttributes: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type OverallDescription = {
|
||||||
|
__typename?: 'OverallDescription';
|
||||||
|
perspective: Scalars['String'];
|
||||||
|
userCharacteristics: Scalars['String'];
|
||||||
|
operatingEnvironment: Scalars['String'];
|
||||||
|
designImplementationConstraints: Scalars['String'];
|
||||||
|
userDocumentation: Scalars['String'];
|
||||||
|
assemptionsDependencies: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type OverallDescriptionInput = {
|
||||||
|
perspective: Scalars['String'];
|
||||||
|
userCharacteristics: Scalars['String'];
|
||||||
|
operatingEnvironment: Scalars['String'];
|
||||||
|
designImplementationConstraints: Scalars['String'];
|
||||||
|
userDocumentation: Scalars['String'];
|
||||||
|
assemptionsDependencies: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
export type PasswordInputModel = {
|
export type PasswordInputModel = {
|
||||||
oldPassword: Scalars['String'];
|
oldPassword: Scalars['String'];
|
||||||
newPassword: Scalars['String'];
|
newPassword: Scalars['String'];
|
||||||
@@ -113,6 +243,12 @@ export type QueryRoot = {
|
|||||||
__typename?: 'QueryRoot';
|
__typename?: 'QueryRoot';
|
||||||
getAllUsers: Array<UserResponseModel>;
|
getAllUsers: Array<UserResponseModel>;
|
||||||
getUserById: UserResponseModel;
|
getUserById: UserResponseModel;
|
||||||
|
getCategoryById: CategoryResponseModel;
|
||||||
|
getFeatureById: FeatureResponseModel;
|
||||||
|
getTemplateById: TemplateResponseModel;
|
||||||
|
getAllCategories: Array<CategoryResponseModel>;
|
||||||
|
getAllFeatures: Array<FeatureResponseModel>;
|
||||||
|
getAllTemplates: Array<TemplateResponseModel>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -120,12 +256,70 @@ export type QueryRootGetUserByIdArgs = {
|
|||||||
id: Scalars['String'];
|
id: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type QueryRootGetCategoryByIdArgs = {
|
||||||
|
id: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type QueryRootGetFeatureByIdArgs = {
|
||||||
|
id: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export type QueryRootGetTemplateByIdArgs = {
|
||||||
|
id: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
export type Role =
|
export type Role =
|
||||||
| 'Admin'
|
| 'Admin'
|
||||||
| 'Client'
|
| 'Client'
|
||||||
| 'ProductOwner'
|
| 'ProductOwner'
|
||||||
| 'Developer';
|
| 'Developer';
|
||||||
|
|
||||||
|
export type Specification = {
|
||||||
|
__typename?: 'Specification';
|
||||||
|
introduction: Introduction;
|
||||||
|
overallDescription: OverallDescription;
|
||||||
|
nonFunctionalRequirements: NonFunctionalRequirements;
|
||||||
|
otherRequirements: Scalars['String'];
|
||||||
|
glossary: Scalars['String'];
|
||||||
|
analysisModels: Scalars['String'];
|
||||||
|
issuesList: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SpecificationInput = {
|
||||||
|
introduction: IntroductionInput;
|
||||||
|
overallDescription: OverallDescriptionInput;
|
||||||
|
nonFunctionalRequirements: NonFunctionalRequirementsInput;
|
||||||
|
otherRequirements: Scalars['String'];
|
||||||
|
glossary: Scalars['String'];
|
||||||
|
analysisModels: Scalars['String'];
|
||||||
|
issuesList: Scalars['String'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type TemplateModel = {
|
||||||
|
__typename?: 'TemplateModel';
|
||||||
|
id: Scalars['String'];
|
||||||
|
name: Scalars['String'];
|
||||||
|
description: Scalars['String'];
|
||||||
|
category: Scalars['String'];
|
||||||
|
features?: Maybe<Array<Scalars['String']>>;
|
||||||
|
image: File;
|
||||||
|
specification?: Maybe<Specification>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type TemplateResponseModel = {
|
||||||
|
__typename?: 'TemplateResponseModel';
|
||||||
|
id: Scalars['String'];
|
||||||
|
name: Scalars['String'];
|
||||||
|
description: Scalars['String'];
|
||||||
|
category: Scalars['String'];
|
||||||
|
features?: Maybe<Array<FeatureResponseModel>>;
|
||||||
|
image: File;
|
||||||
|
specification?: Maybe<Specification>;
|
||||||
|
};
|
||||||
|
|
||||||
export type UserResponseModel = {
|
export type UserResponseModel = {
|
||||||
__typename?: 'UserResponseModel';
|
__typename?: 'UserResponseModel';
|
||||||
id: Scalars['String'];
|
id: Scalars['String'];
|
||||||
@@ -141,12 +335,6 @@ export type UserResponseModel = {
|
|||||||
export type SignupMutationVariables = Exact<{
|
export type SignupMutationVariables = Exact<{
|
||||||
email: Scalars['String'];
|
email: Scalars['String'];
|
||||||
password: Scalars['String'];
|
password: Scalars['String'];
|
||||||
firstName: Scalars['String'];
|
|
||||||
lastName: Scalars['String'];
|
|
||||||
phone: PhoneInputModel;
|
|
||||||
address: AddressInputModel;
|
|
||||||
active: Scalars['Boolean'];
|
|
||||||
role: Role;
|
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
@@ -234,3 +422,28 @@ export type ConfirmUserResetPasswordMutation = (
|
|||||||
) }
|
) }
|
||||||
) }
|
) }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export type UpdateUserInfoMutationVariables = Exact<{
|
||||||
|
id: Scalars['String'];
|
||||||
|
email: Scalars['String'];
|
||||||
|
firstName: Scalars['String'];
|
||||||
|
lastName: Scalars['String'];
|
||||||
|
phone: PhoneInputModel;
|
||||||
|
address: AddressInputModel;
|
||||||
|
}>;
|
||||||
|
|
||||||
|
|
||||||
|
export type UpdateUserInfoMutation = (
|
||||||
|
{ __typename?: 'MutationRoot' }
|
||||||
|
& { updateUserInfo: (
|
||||||
|
{ __typename?: 'UserResponseModel' }
|
||||||
|
& Pick<UserResponseModel, 'id' | 'email' | 'firstName' | 'lastName' | 'active' | 'role'>
|
||||||
|
& { phone: (
|
||||||
|
{ __typename?: 'PhoneModel' }
|
||||||
|
& Pick<PhoneModel, 'prefix' | 'number'>
|
||||||
|
), address: (
|
||||||
|
{ __typename?: 'AddressModel' }
|
||||||
|
& Pick<AddressModel, 'place' | 'city' | 'country' | 'zip'>
|
||||||
|
) }
|
||||||
|
) }
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user