From b4250a092d5bc87f3ba6940b6fab32806ceef09f Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Wed, 16 Jun 2021 00:41:31 +0100 Subject: [PATCH] Update gql types and mutations --- src/graphql/project.api.ts | 360 +++++++++++++++++++++++++++++++++++++ src/graphql/types.ts | 279 +++++++++++++++++++++++++++- 2 files changed, 638 insertions(+), 1 deletion(-) diff --git a/src/graphql/project.api.ts b/src/graphql/project.api.ts index a606bf3..525a6e2 100644 --- a/src/graphql/project.api.ts +++ b/src/graphql/project.api.ts @@ -839,3 +839,363 @@ export const ADD_PROJECT_PROPOSAL = gql` } } `; + +export const ADD_PROJECT_DESIGN = gql` + mutation AddProjectDesign($design: ProjectFileInput!) { + addProjectDesign(design: $design) { + id + clientId + name + image { + name + src + } + platforms + template { + id + name + description + category + features { + id + name + description + featureType + image { + name + src + } + wireframes { + id + name + src + } + price + repo + } + image { + name + src + } + specification { + introduction { + purpose + documentConventions + intendedAudience + projectScope + } + overallDescription { + perspective + userCharacteristics + operatingEnvironment + designImplementationConstraints + userDocumentation + assemptionsDependencies + } + nonFunctionalRequirements { + performanceRequirements + safetyRequirements + securityRequirements + softwareQualityAttributes + } + otherRequirements + glossary + analysisModels + issuesList + } + } + features { + id + name + description + featureType + image { + name + src + } + wireframes { + id + name + src + } + price + repo + } + state + proposal { + devtime { + months + days + hours + } + summary + purpose + resources { + resourceType + developers + } + } + paymentOption { + optOne + optTwo + optThree + } + delivrable { + specification { + name + src + } + fullBuild + mvp { + name + src + } + design { + name + src + } + } + totalPrice + } + } +`; + +export const ADD_PROJECT_MVP = gql` + mutation AddProjectMvp($mvp: ProjectFileInput!) { + addProjectMvp(mvp: $mvp) { + id + clientId + name + image { + name + src + } + platforms + template { + id + name + description + category + features { + id + name + description + featureType + image { + name + src + } + wireframes { + id + name + src + } + price + repo + } + image { + name + src + } + specification { + introduction { + purpose + documentConventions + intendedAudience + projectScope + } + overallDescription { + perspective + userCharacteristics + operatingEnvironment + designImplementationConstraints + userDocumentation + assemptionsDependencies + } + nonFunctionalRequirements { + performanceRequirements + safetyRequirements + securityRequirements + softwareQualityAttributes + } + otherRequirements + glossary + analysisModels + issuesList + } + } + features { + id + name + description + featureType + image { + name + src + } + wireframes { + id + name + src + } + price + repo + } + state + proposal { + devtime { + months + days + hours + } + summary + purpose + resources { + resourceType + developers + } + } + paymentOption { + optOne + optTwo + optThree + } + delivrable { + specification { + name + src + } + fullBuild + mvp { + name + src + } + design { + name + src + } + } + totalPrice + } + } +`; + +export const ADD_PROJECT_FULL_BUILD = gql` + mutation AddProjectFullBuild($fullBuild: ProjectFullBuildInput!) { + addProjectFullBuild(fullBuild: $fullBuild) { + id + clientId + name + image { + name + src + } + platforms + template { + id + name + description + category + features { + id + name + description + featureType + image { + name + src + } + wireframes { + id + name + src + } + price + repo + } + image { + name + src + } + specification { + introduction { + purpose + documentConventions + intendedAudience + projectScope + } + overallDescription { + perspective + userCharacteristics + operatingEnvironment + designImplementationConstraints + userDocumentation + assemptionsDependencies + } + nonFunctionalRequirements { + performanceRequirements + safetyRequirements + securityRequirements + softwareQualityAttributes + } + otherRequirements + glossary + analysisModels + issuesList + } + } + features { + id + name + description + featureType + image { + name + src + } + wireframes { + id + name + src + } + price + repo + } + state + proposal { + devtime { + months + days + hours + } + summary + purpose + resources { + resourceType + developers + } + } + paymentOption { + optOne + optTwo + optThree + } + delivrable { + specification { + name + src + } + fullBuild + mvp { + name + src + } + design { + name + src + } + } + totalPrice + } + } +`; diff --git a/src/graphql/types.ts b/src/graphql/types.ts index 43da2f7..1aea53f 100644 --- a/src/graphql/types.ts +++ b/src/graphql/types.ts @@ -170,6 +170,9 @@ export type MutationRoot = { changeProjectState: ProjectOutput; updateProject: ProjectOutput; addProjectProposal: ProjectOutput; + addProjectMvp: ProjectOutput; + addProjectFullBuild: ProjectOutput; + addProjectDesign: ProjectOutput; }; @@ -323,6 +326,21 @@ export type MutationRootAddProjectProposalArgs = { proposal: ProposalInput; }; + +export type MutationRootAddProjectMvpArgs = { + mvp: ProjectFileInput; +}; + + +export type MutationRootAddProjectFullBuildArgs = { + fullBuild: ProjectFullBuildInput; +}; + + +export type MutationRootAddProjectDesignArgs = { + design: ProjectFileInput; +}; + export type NonFunctionalRequirementsInput = { performanceRequirements: Scalars['String']; safetyRequirements: Scalars['String']; @@ -386,6 +404,17 @@ export type PhoneOutput = { number: Scalars['String']; }; +export type ProjectFileInput = { + id: Scalars['String']; + name: Scalars['String']; + src: Scalars['String']; +}; + +export type ProjectFullBuildInput = { + id: Scalars['String']; + url: Scalars['String']; +}; + export type ProjectInput = { clientId: Scalars['String']; name: Scalars['String']; @@ -596,7 +625,6 @@ export type TemplateUpdateInput = { category: Scalars['String']; features?: Maybe>; image: InputFile; - specification?: Maybe; }; export type UpdateUserInput = { @@ -1665,6 +1693,255 @@ export type AddProjectProposalMutation = ( ) } ); +export type AddProjectDesignMutationVariables = Exact<{ + design: ProjectFileInput; +}>; + + +export type AddProjectDesignMutation = ( + { __typename?: 'MutationRoot' } + & { addProjectDesign: ( + { __typename?: 'ProjectOutput' } + & Pick + & { image: ( + { __typename?: 'File' } + & Pick + ), template: ( + { __typename?: 'TemplateOutput' } + & Pick + & { features?: Maybe + & { image: ( + { __typename?: 'File' } + & Pick + ), wireframes?: Maybe + )>> } + )>>, image: ( + { __typename?: 'File' } + & Pick + ), specification?: Maybe<( + { __typename?: 'SpecificationOutput' } + & Pick + & { introduction: ( + { __typename?: 'IntroductionOutput' } + & Pick + ), overallDescription: ( + { __typename?: 'OverallDescriptionOutput' } + & Pick + ), nonFunctionalRequirements: ( + { __typename?: 'NonFunctionalRequirementsOutput' } + & Pick + ) } + )> } + ), features: Array<( + { __typename?: 'FeatureOutput' } + & Pick + & { image: ( + { __typename?: 'File' } + & Pick + ), wireframes?: Maybe + )>> } + )>, proposal?: Maybe<( + { __typename?: 'ProposalOutput' } + & Pick + & { devtime: ( + { __typename?: 'DevtimeOutput' } + & Pick + ), resources: Array<( + { __typename?: 'ResourceOutput' } + & Pick + )> } + )>, paymentOption: ( + { __typename?: 'PaymentOptionOutput' } + & Pick + ), delivrable?: Maybe<( + { __typename?: 'DelivrableOutput' } + & Pick + & { specification: ( + { __typename?: 'File' } + & Pick + ), mvp: ( + { __typename?: 'File' } + & Pick + ), design: ( + { __typename?: 'File' } + & Pick + ) } + )> } + ) } +); + +export type AddProjectMvpMutationVariables = Exact<{ + mvp: ProjectFileInput; +}>; + + +export type AddProjectMvpMutation = ( + { __typename?: 'MutationRoot' } + & { addProjectMvp: ( + { __typename?: 'ProjectOutput' } + & Pick + & { image: ( + { __typename?: 'File' } + & Pick + ), template: ( + { __typename?: 'TemplateOutput' } + & Pick + & { features?: Maybe + & { image: ( + { __typename?: 'File' } + & Pick + ), wireframes?: Maybe + )>> } + )>>, image: ( + { __typename?: 'File' } + & Pick + ), specification?: Maybe<( + { __typename?: 'SpecificationOutput' } + & Pick + & { introduction: ( + { __typename?: 'IntroductionOutput' } + & Pick + ), overallDescription: ( + { __typename?: 'OverallDescriptionOutput' } + & Pick + ), nonFunctionalRequirements: ( + { __typename?: 'NonFunctionalRequirementsOutput' } + & Pick + ) } + )> } + ), features: Array<( + { __typename?: 'FeatureOutput' } + & Pick + & { image: ( + { __typename?: 'File' } + & Pick + ), wireframes?: Maybe + )>> } + )>, proposal?: Maybe<( + { __typename?: 'ProposalOutput' } + & Pick + & { devtime: ( + { __typename?: 'DevtimeOutput' } + & Pick + ), resources: Array<( + { __typename?: 'ResourceOutput' } + & Pick + )> } + )>, paymentOption: ( + { __typename?: 'PaymentOptionOutput' } + & Pick + ), delivrable?: Maybe<( + { __typename?: 'DelivrableOutput' } + & Pick + & { specification: ( + { __typename?: 'File' } + & Pick + ), mvp: ( + { __typename?: 'File' } + & Pick + ), design: ( + { __typename?: 'File' } + & Pick + ) } + )> } + ) } +); + +export type AddProjectFullBuildMutationVariables = Exact<{ + fullBuild: ProjectFullBuildInput; +}>; + + +export type AddProjectFullBuildMutation = ( + { __typename?: 'MutationRoot' } + & { addProjectFullBuild: ( + { __typename?: 'ProjectOutput' } + & Pick + & { image: ( + { __typename?: 'File' } + & Pick + ), template: ( + { __typename?: 'TemplateOutput' } + & Pick + & { features?: Maybe + & { image: ( + { __typename?: 'File' } + & Pick + ), wireframes?: Maybe + )>> } + )>>, image: ( + { __typename?: 'File' } + & Pick + ), specification?: Maybe<( + { __typename?: 'SpecificationOutput' } + & Pick + & { introduction: ( + { __typename?: 'IntroductionOutput' } + & Pick + ), overallDescription: ( + { __typename?: 'OverallDescriptionOutput' } + & Pick + ), nonFunctionalRequirements: ( + { __typename?: 'NonFunctionalRequirementsOutput' } + & Pick + ) } + )> } + ), features: Array<( + { __typename?: 'FeatureOutput' } + & Pick + & { image: ( + { __typename?: 'File' } + & Pick + ), wireframes?: Maybe + )>> } + )>, proposal?: Maybe<( + { __typename?: 'ProposalOutput' } + & Pick + & { devtime: ( + { __typename?: 'DevtimeOutput' } + & Pick + ), resources: Array<( + { __typename?: 'ResourceOutput' } + & Pick + )> } + )>, paymentOption: ( + { __typename?: 'PaymentOptionOutput' } + & Pick + ), delivrable?: Maybe<( + { __typename?: 'DelivrableOutput' } + & Pick + & { specification: ( + { __typename?: 'File' } + & Pick + ), mvp: ( + { __typename?: 'File' } + & Pick + ), design: ( + { __typename?: 'File' } + & Pick + ) } + )> } + ) } +); + export type GetPrototypeByIdQueryVariables = Exact<{ id: Scalars['String']; }>;