From 4089b0803180ed73d67c52886f31d27e3a270f95 Mon Sep 17 00:00:00 2001 From: Mahmoud Moravej Date: Fri, 19 Apr 2024 12:12:42 -0400 Subject: [PATCH 1/7] initial --- remix.config.cjs => --r--emix.config.cjs | 0 .eslintrc.cjs | 119 + .eslintrc.js | 37 - app/@types/graphql/schema.ts | 3516 +++++++++++------ .../AssignMissedActivitiesButton.tsx | 2 +- app/components/CycleForm.tsx | 4 +- app/components/IndividualForm.tsx | 6 +- app/contexts/apollo/apolloClientProvider.tsx | 2 +- app/contexts/apollo/apolloServerProvider.tsx | 9 +- .../authentication/authenticationContext.ts | 2 +- .../authenticationServerProvider.tsx | 2 +- .../settings/settingsServerProvider.tsx | 2 +- app/entry.server.tsx | 92 +- app/mui/ClientStyleContext.tsx | 2 +- app/root.tsx | 2 +- .../_dashboard.activities.$id.edit/route.tsx | 4 +- .../_dashboard.cycles.$id.edit/route.tsx | 2 +- app/routes/_dashboard.cycles._index/route.tsx | 4 +- app/routes/_dashboard.cycles.new/route.tsx | 2 +- .../GenerateCycleSummaryButton.tsx | 2 +- .../route.tsx | 2 +- .../_dashboard.individuals.$id.edit/route.tsx | 2 +- .../AnalyzeButton/AnalyzeButton.tsx | 2 +- .../route.tsx | 5 +- .../route.tsx | 2 +- .../route.tsx | 2 +- app/routes/_dashboard.tsx | 2 +- .../_dashboard.visions.$id.edit/route.tsx | 6 +- .../FetchContentButton/FetchContentButton.tsx | 2 +- .../_dashboard.visions._index/route.tsx | 2 +- app/routes/_dashboard.visions.new/route.tsx | 2 +- app/routes/_site._index.tsx | 8 +- app/routes/logout.tsx | 2 +- app/services/auth.server.ts | 2 +- app/services/session.server.ts | 4 +- app/utils/graphql.ts | 6 +- app/widgets/layout/dashboard-sidenav.tsx | 3 +- app/widgets/layout/dashboard-top-navbar.tsx | 2 +- app/widgets/layout/footer.tsx | 19 +- remix.env.d.ts => env.d.ts | 2 +- graphql.codegen.ts | 4 +- package.json | 15 +- postcss.config.js | 6 + tailwind.config.ts | 2 +- tsconfig.json | 20 +- vite.config.ts | 9 +- yarn.lock | 130 +- 47 files changed, 2752 insertions(+), 1322 deletions(-) rename remix.config.cjs => --r--emix.config.cjs (100%) create mode 100644 .eslintrc.cjs delete mode 100644 .eslintrc.js rename remix.env.d.ts => env.d.ts (77%) create mode 100644 postcss.config.js diff --git a/remix.config.cjs b/--r--emix.config.cjs similarity index 100% rename from remix.config.cjs rename to --r--emix.config.cjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..381bf88 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,119 @@ +// NOTE!!!! +// THE FOLLOWING ARE FOR FLAT VERSION WHICH IS NOT WORKING.eslint.config.js +// WE IGNORE ESLINTING FOR NOW + +// import * as graphqlESLint from "@graphql-eslint/eslint-plugin"; +// import js from "@eslint/js"; + +// export default [ +// { +// files: ["**/*.js"], +// rules: js.configs.recommended.rules, +// }, +// { +// files: ["**/*.graphql"], +// plugins: { +// "@graphql-eslint": graphqlESLint, +// }, +// languageOptions: { +// parser: graphqlESLint, +// }, +// rules: { +// "@graphql-eslint/no-anonymous-operations": "error", +// "@graphql-eslint/no-duplicate-fields": "error", +// }, +// }, +// { +// ignores: ["build/*", "node_modules/*", "public/*"], +// }, +// ]; + +/** + * This is intended to be a basic starting point for linting in your app. + * It relies on recommended configs out of the box for simplicity, but you can + * and should modify this configuration to best suit your team's needs. + */ + +/** @type {import('eslint').Linter.Config} */ +module.exports = { + root: true, + parserOptions: { + ecmaVersion: "latest", + sourceType: "module", + ecmaFeatures: { + jsx: true, + }, + }, + env: { + browser: true, + commonjs: true, + es6: true, + }, + + // Base config + extends: ["eslint:recommended"], + + overrides: [ + // React + { + files: ["**/*.{js,jsx,ts,tsx}"], + rules: { + "@typescript-eslint/no-unused-vars": [ + "error", + { argsIgnorePattern: "^_" }, + ], + }, + plugins: ["react", "jsx-a11y"], + extends: [ + "plugin:react/recommended", + "plugin:react/jsx-runtime", + "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", + ], + settings: { + react: { + version: "detect", + }, + formComponents: ["Form"], + linkComponents: [ + { name: "Link", linkAttribute: "to" }, + { name: "NavLink", linkAttribute: "to" }, + ], + "import/resolver": { + typescript: {}, + }, + }, + }, + + // Typescript + { + files: ["**/*.{ts,tsx}"], + plugins: ["@typescript-eslint", "import"], + parser: "@typescript-eslint/parser", + settings: { + "import/internal-regex": "^~/", + "import/resolver": { + node: { + extensions: [".ts", ".tsx"], + }, + typescript: { + alwaysTryTypes: true, + }, + }, + }, + extends: [ + "plugin:@typescript-eslint/recommended", + "plugin:import/recommended", + "plugin:import/typescript", + ], + }, + + // Node + { + files: [".eslintrc.cjs"], + env: { + node: true, + }, + }, + ], +}; diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 0ac949f..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,37 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - extends: ["@remix-run/eslint-config", "@remix-run/eslint-config/node"], - rules: { - "@typescript-eslint/consistent-type-imports": "off", - }, -}; - -// NOTE!!!! -// THE FOLLOWING ARE FOR FLAT VERSION WHICH IS NOT WORKING.eslint.config.js -// WE IGNORE ESLINTING FOR NOW - -// import * as graphqlESLint from "@graphql-eslint/eslint-plugin"; -// import js from "@eslint/js"; - -// export default [ -// { -// files: ["**/*.js"], -// rules: js.configs.recommended.rules, -// }, -// { -// files: ["**/*.graphql"], -// plugins: { -// "@graphql-eslint": graphqlESLint, -// }, -// languageOptions: { -// parser: graphqlESLint, -// }, -// rules: { -// "@graphql-eslint/no-anonymous-operations": "error", -// "@graphql-eslint/no-duplicate-fields": "error", -// }, -// }, -// { -// ignores: ["build/*", "node_modules/*", "public/*"], -// }, -// ]; diff --git a/app/@types/graphql/schema.ts b/app/@types/graphql/schema.ts index a2ad9dc..36839fd 100644 --- a/app/@types/graphql/schema.ts +++ b/app/@types/graphql/schema.ts @@ -1,45 +1,58 @@ -import { gql } from '@apollo/client'; -import * as Apollo from '@apollo/client'; +import { gql } from "@apollo/client/index.js"; +import * as Apollo from "@apollo/client"; export type Maybe = T | null; export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +export type Exact = { + [K in keyof T]: T[K]; +}; +export type MakeOptional = Omit & { + [SubKey in K]?: Maybe; +}; +export type MakeMaybe = Omit & { + [SubKey in K]: Maybe; +}; +export type MakeEmpty< + T extends { [key: string]: unknown }, + K extends keyof T, +> = { [_ in K]?: never }; +export type Incremental = + | T + | { + [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; + }; const defaultOptions = {} as const; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - ISO8601DateTime: { input: any; output: any; } + ID: { input: string; output: string }; + String: { input: string; output: string }; + Boolean: { input: boolean; output: boolean }; + Int: { input: number; output: number }; + Float: { input: number; output: number }; + ISO8601DateTime: { input: any; output: any }; }; export type Activity = { - __typename?: 'Activity'; + __typename?: "Activity"; aiEngineType: AiEngineType; - aiEngineTypeId: Scalars['Int']['output']; - channelActivityId: Scalars['String']['output']; - channelActivityUrl?: Maybe; - channelId: Scalars['Int']['output']; + aiEngineTypeId: Scalars["Int"]["output"]; + channelActivityId: Scalars["String"]["output"]; + channelActivityUrl?: Maybe; + channelId: Scalars["Int"]["output"]; cycle?: Maybe; - cycleId?: Maybe; - date: Scalars['ISO8601DateTime']['output']; - id: Scalars['Int']['output']; + cycleId?: Maybe; + date: Scalars["ISO8601DateTime"]["output"]; + id: Scalars["Int"]["output"]; individual?: Maybe; - individualId: Scalars['Int']['output']; - isAnalyzed: Scalars['Boolean']['output']; - prompt?: Maybe; - result?: Maybe; - title?: Maybe; + individualId: Scalars["Int"]["output"]; + isAnalyzed: Scalars["Boolean"]["output"]; + prompt?: Maybe; + result?: Maybe; + title?: Maybe; }; /** The connection type for Activity. */ export type ActivityConnection = { - __typename?: 'ActivityConnection'; + __typename?: "ActivityConnection"; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ @@ -50,62 +63,62 @@ export type ActivityConnection = { /** An edge in a connection. */ export type ActivityEdge = { - __typename?: 'ActivityEdge'; + __typename?: "ActivityEdge"; /** A cursor for use in pagination. */ - cursor: Scalars['String']['output']; + cursor: Scalars["String"]["output"]; /** The item at the end of the edge. */ node?: Maybe; }; export type ActivityUpdate = { - prompt?: InputMaybe; - result?: InputMaybe; + prompt?: InputMaybe; + result?: InputMaybe; }; /** Autogenerated input type of ActivityUpdate */ export type ActivityUpdateInput = { activityInput: ActivityUpdate; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - id: Scalars['ID']['input']; + clientMutationId?: InputMaybe; + id: Scalars["ID"]["input"]; }; /** Autogenerated return type of ActivityUpdate. */ export type ActivityUpdatePayload = { - __typename?: 'ActivityUpdatePayload'; + __typename?: "ActivityUpdatePayload"; activity: Activity; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; }; export type Advice = { - __typename?: 'Advice'; - activitiesTotal: Scalars['Int']['output']; - activityPrompt?: Maybe; - activitySummary?: Maybe; + __typename?: "Advice"; + activitiesTotal: Scalars["Int"]["output"]; + activityPrompt?: Maybe; + activitySummary?: Maybe; aiEngineType: AiEngineType; - aiEngineTypeId: Scalars['Int']['output']; - analyzedActivitiesTotal: Scalars['Int']['output']; - analyzedAt: Scalars['ISO8601DateTime']['output']; - contentReadyVisionsTotal: Scalars['Int']['output']; + aiEngineTypeId: Scalars["Int"]["output"]; + analyzedActivitiesTotal: Scalars["Int"]["output"]; + analyzedAt: Scalars["ISO8601DateTime"]["output"]; + contentReadyVisionsTotal: Scalars["Int"]["output"]; cycle?: Maybe; - cycleId: Scalars['Int']['output']; - id: Scalars['Int']['output']; + cycleId: Scalars["Int"]["output"]; + id: Scalars["Int"]["output"]; individual?: Maybe; - individualId: Scalars['Int']['output']; - isActivityAnalyzed: Scalars['Boolean']['output']; - isAnalyzed: Scalars['Boolean']['output']; - isVisionAnalyzed: Scalars['Boolean']['output']; - prompt?: Maybe; - result?: Maybe; - visionPrompt?: Maybe; - visionSummary?: Maybe; - visionsTotal: Scalars['Int']['output']; + individualId: Scalars["Int"]["output"]; + isActivityAnalyzed: Scalars["Boolean"]["output"]; + isAnalyzed: Scalars["Boolean"]["output"]; + isVisionAnalyzed: Scalars["Boolean"]["output"]; + prompt?: Maybe; + result?: Maybe; + visionPrompt?: Maybe; + visionSummary?: Maybe; + visionsTotal: Scalars["Int"]["output"]; }; /** The connection type for Advice. */ export type AdviceConnection = { - __typename?: 'AdviceConnection'; + __typename?: "AdviceConnection"; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ @@ -116,25 +129,25 @@ export type AdviceConnection = { /** An edge in a connection. */ export type AdviceEdge = { - __typename?: 'AdviceEdge'; + __typename?: "AdviceEdge"; /** A cursor for use in pagination. */ - cursor: Scalars['String']['output']; + cursor: Scalars["String"]["output"]; /** The item at the end of the edge. */ node?: Maybe; }; export type AiEngine = { - __typename?: 'AiEngine'; - id: Scalars['Int']['output']; - organizationId: Scalars['Int']['output']; - settings?: Maybe; + __typename?: "AiEngine"; + id: Scalars["Int"]["output"]; + organizationId: Scalars["Int"]["output"]; + settings?: Maybe; type: AiEngineType; - typeId: Scalars['Int']['output']; + typeId: Scalars["Int"]["output"]; }; /** The connection type for AiEngine. */ export type AiEngineConnection = { - __typename?: 'AiEngineConnection'; + __typename?: "AiEngineConnection"; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ @@ -145,66 +158,66 @@ export type AiEngineConnection = { /** An edge in a connection. */ export type AiEngineEdge = { - __typename?: 'AiEngineEdge'; + __typename?: "AiEngineEdge"; /** A cursor for use in pagination. */ - cursor: Scalars['String']['output']; + cursor: Scalars["String"]["output"]; /** The item at the end of the edge. */ node?: Maybe; }; export type AiEngineType = { - __typename?: 'AiEngineType'; - id: Scalars['Int']['output']; - title: Scalars['String']['output']; + __typename?: "AiEngineType"; + id: Scalars["Int"]["output"]; + title: Scalars["String"]["output"]; }; export type AiEngineUpdate = { - id: Scalars['Int']['input']; - settings: Scalars['String']['input']; + id: Scalars["Int"]["input"]; + settings: Scalars["String"]["input"]; }; /** Autogenerated input type of AnalyzeActivity */ export type AnalyzeActivityInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - id: Scalars['ID']['input']; + clientMutationId?: InputMaybe; + id: Scalars["ID"]["input"]; }; /** Autogenerated return type of AnalyzeActivity. */ export type AnalyzeActivityPayload = { - __typename?: 'AnalyzeActivityPayload'; + __typename?: "AnalyzeActivityPayload"; activity: Activity; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; }; /** Autogenerated input type of AssignMissedCycleActivities */ export type AssignMissedCycleActivitiesInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - cycleId: Scalars['Int']['input']; + clientMutationId?: InputMaybe; + cycleId: Scalars["Int"]["input"]; }; /** Autogenerated return type of AssignMissedCycleActivities. */ export type AssignMissedCycleActivitiesPayload = { - __typename?: 'AssignMissedCycleActivitiesPayload'; + __typename?: "AssignMissedCycleActivitiesPayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; - totalCount: Scalars['Int']['output']; + clientMutationId?: Maybe; + totalCount: Scalars["Int"]["output"]; }; export type Cycle = { - __typename?: 'Cycle'; - description?: Maybe; - from: Scalars['ISO8601DateTime']['output']; - id: Scalars['Int']['output']; - title: Scalars['String']['output']; - to: Scalars['ISO8601DateTime']['output']; + __typename?: "Cycle"; + description?: Maybe; + from: Scalars["ISO8601DateTime"]["output"]; + id: Scalars["Int"]["output"]; + title: Scalars["String"]["output"]; + to: Scalars["ISO8601DateTime"]["output"]; }; /** The connection type for Cycle. */ export type CycleConnection = { - __typename?: 'CycleConnection'; + __typename?: "CycleConnection"; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ @@ -214,139 +227,136 @@ export type CycleConnection = { }; export type CycleCreate = { - description?: InputMaybe; - from: Scalars['ISO8601DateTime']['input']; - title: Scalars['String']['input']; - to: Scalars['ISO8601DateTime']['input']; + description?: InputMaybe; + from: Scalars["ISO8601DateTime"]["input"]; + title: Scalars["String"]["input"]; + to: Scalars["ISO8601DateTime"]["input"]; }; /** Autogenerated input type of CycleCreate */ export type CycleCreateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; + clientMutationId?: InputMaybe; cycleInput: CycleCreate; }; /** Autogenerated return type of CycleCreate. */ export type CycleCreatePayload = { - __typename?: 'CycleCreatePayload'; + __typename?: "CycleCreatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; cycle: Cycle; }; /** An edge in a connection. */ export type CycleEdge = { - __typename?: 'CycleEdge'; + __typename?: "CycleEdge"; /** A cursor for use in pagination. */ - cursor: Scalars['String']['output']; + cursor: Scalars["String"]["output"]; /** The item at the end of the edge. */ node?: Maybe; }; export type CycleUpdate = { - description?: InputMaybe; - from: Scalars['ISO8601DateTime']['input']; - title: Scalars['String']['input']; - to: Scalars['ISO8601DateTime']['input']; + description?: InputMaybe; + from: Scalars["ISO8601DateTime"]["input"]; + title: Scalars["String"]["input"]; + to: Scalars["ISO8601DateTime"]["input"]; }; /** Autogenerated input type of CycleUpdate */ export type CycleUpdateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; + clientMutationId?: InputMaybe; cycleInput: CycleUpdate; - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }; /** Autogenerated return type of CycleUpdate. */ export type CycleUpdatePayload = { - __typename?: 'CycleUpdatePayload'; + __typename?: "CycleUpdatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; cycle: Cycle; }; /** Autogenerated input type of GenerateCycleAdvice */ export type GenerateCycleAdviceInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - cycleId: Scalars['Int']['input']; - individualId: Scalars['Int']['input']; + clientMutationId?: InputMaybe; + cycleId: Scalars["Int"]["input"]; + individualId: Scalars["Int"]["input"]; }; /** Autogenerated return type of GenerateCycleAdvice. */ export type GenerateCycleAdvicePayload = { - __typename?: 'GenerateCycleAdvicePayload'; + __typename?: "GenerateCycleAdvicePayload"; advice: Advice; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; }; /** Autogenerated input type of ImportActivities */ export type ImportActivitiesInput = { - channelId?: InputMaybe; + channelId?: InputMaybe; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - individualId: Scalars['Int']['input']; + clientMutationId?: InputMaybe; + individualId: Scalars["Int"]["input"]; }; /** Autogenerated return type of ImportActivities. */ export type ImportActivitiesPayload = { - __typename?: 'ImportActivitiesPayload'; + __typename?: "ImportActivitiesPayload"; activities: Array; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; - totalCount: Scalars['Int']['output']; + clientMutationId?: Maybe; + totalCount: Scalars["Int"]["output"]; }; export type Individual = { - __typename?: 'Individual'; + __typename?: "Individual"; activeCycles?: Maybe; activities: ActivityConnection; - fullname?: Maybe; - handleGithub?: Maybe; - handleGoogle?: Maybe; - id: Scalars['Int']['output']; - isActive: Scalars['Boolean']['output']; - isManager: Scalars['Boolean']['output']; - jobLevelId?: Maybe; - jobTitle?: Maybe; + fullname?: Maybe; + handleGithub?: Maybe; + handleGoogle?: Maybe; + id: Scalars["Int"]["output"]; + isActive: Scalars["Boolean"]["output"]; + isManager: Scalars["Boolean"]["output"]; + jobLevelId?: Maybe; + jobTitle?: Maybe; manager?: Maybe; - managerId?: Maybe; + managerId?: Maybe; organization: OrganizationBasicInfo; - organizationId: Scalars['Int']['output']; + organizationId: Scalars["Int"]["output"]; reports: IndividualConnection; - userId?: Maybe; + userId?: Maybe; }; - export type IndividualActiveCyclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; - export type IndividualActivitiesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; - export type IndividualReportsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** The connection type for Individual. */ export type IndividualConnection = { - __typename?: 'IndividualConnection'; + __typename?: "IndividualConnection"; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ @@ -356,139 +366,138 @@ export type IndividualConnection = { }; export type IndividualCreate = { - fullname?: InputMaybe; - handleGithub?: InputMaybe; - handleGoogle?: InputMaybe; - isActive: Scalars['Boolean']['input']; - isManager: Scalars['Boolean']['input']; - jobLevelId?: InputMaybe; - jobTitle?: InputMaybe; - managerId?: InputMaybe; - organizationId?: InputMaybe; - userId?: InputMaybe; + fullname?: InputMaybe; + handleGithub?: InputMaybe; + handleGoogle?: InputMaybe; + isActive: Scalars["Boolean"]["input"]; + isManager: Scalars["Boolean"]["input"]; + jobLevelId?: InputMaybe; + jobTitle?: InputMaybe; + managerId?: InputMaybe; + organizationId?: InputMaybe; + userId?: InputMaybe; }; /** Autogenerated input type of IndividualCreate */ export type IndividualCreateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; + clientMutationId?: InputMaybe; individualInput: IndividualCreate; }; /** Autogenerated return type of IndividualCreate. */ export type IndividualCreatePayload = { - __typename?: 'IndividualCreatePayload'; + __typename?: "IndividualCreatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; individual: Individual; }; /** Autogenerated input type of IndividualDestroy */ export type IndividualDestroyInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - id: Scalars['ID']['input']; + clientMutationId?: InputMaybe; + id: Scalars["ID"]["input"]; }; /** Autogenerated return type of IndividualDestroy. */ export type IndividualDestroyPayload = { - __typename?: 'IndividualDestroyPayload'; + __typename?: "IndividualDestroyPayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; individual: Individual; }; /** An edge in a connection. */ export type IndividualEdge = { - __typename?: 'IndividualEdge'; + __typename?: "IndividualEdge"; /** A cursor for use in pagination. */ - cursor: Scalars['String']['output']; + cursor: Scalars["String"]["output"]; /** The item at the end of the edge. */ node?: Maybe; }; export type IndividualUpdate = { - fullname?: InputMaybe; - handleGithub?: InputMaybe; - handleGoogle?: InputMaybe; - isActive?: InputMaybe; - isManager?: InputMaybe; - jobLevelId?: InputMaybe; - jobTitle?: InputMaybe; - managerId?: InputMaybe; - organizationId?: InputMaybe; - userId?: InputMaybe; + fullname?: InputMaybe; + handleGithub?: InputMaybe; + handleGoogle?: InputMaybe; + isActive?: InputMaybe; + isManager?: InputMaybe; + jobLevelId?: InputMaybe; + jobTitle?: InputMaybe; + managerId?: InputMaybe; + organizationId?: InputMaybe; + userId?: InputMaybe; }; /** Autogenerated input type of IndividualUpdate */ export type IndividualUpdateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - id: Scalars['ID']['input']; + clientMutationId?: InputMaybe; + id: Scalars["ID"]["input"]; individualInput: IndividualUpdate; }; /** Autogenerated return type of IndividualUpdate. */ export type IndividualUpdatePayload = { - __typename?: 'IndividualUpdatePayload'; + __typename?: "IndividualUpdatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; individual: Individual; }; export type Manager = { - __typename?: 'Manager'; - Id: Scalars['Int']['output']; - Name: Scalars['String']['output']; + __typename?: "Manager"; + Id: Scalars["Int"]["output"]; + Name: Scalars["String"]["output"]; Reports: ReportConnection; }; - export type ManagerReportsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; /** Autogenerated input type of ManagerCreate */ export type ManagerCreateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; + clientMutationId?: InputMaybe; managerInput: ManagerInput; }; /** Autogenerated return type of ManagerCreate. */ export type ManagerCreatePayload = { - __typename?: 'ManagerCreatePayload'; + __typename?: "ManagerCreatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; manager: Manager; }; export type ManagerInput = { - Id: Scalars['Int']['input']; - Name: Scalars['String']['input']; + Id: Scalars["Int"]["input"]; + Name: Scalars["String"]["input"]; }; /** Autogenerated input type of ManagerUpdate */ export type ManagerUpdateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - id: Scalars['ID']['input']; + clientMutationId?: InputMaybe; + id: Scalars["ID"]["input"]; managerInput: ManagerInput; }; /** Autogenerated return type of ManagerUpdate. */ export type ManagerUpdatePayload = { - __typename?: 'ManagerUpdatePayload'; + __typename?: "ManagerUpdatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; manager: Manager; }; export type Mutation = { - __typename?: 'Mutation'; + __typename?: "Mutation"; /** Update an existing activity by id */ activityUpdate?: Maybe; /** Analyze an existing activity by id using AI engine */ @@ -527,183 +536,164 @@ export type Mutation = { visionUpdate?: Maybe; }; - export type MutationActivityUpdateArgs = { input: ActivityUpdateInput; }; - export type MutationAnalyzeActivityArgs = { input: AnalyzeActivityInput; }; - export type MutationAssignMissedCycleActivitiesArgs = { input: AssignMissedCycleActivitiesInput; }; - export type MutationCycleCreateArgs = { input: CycleCreateInput; }; - export type MutationCycleUpdateArgs = { input: CycleUpdateInput; }; - export type MutationGenerateCycleAdviceArgs = { input: GenerateCycleAdviceInput; }; - export type MutationImportActivitiesArgs = { input: ImportActivitiesInput; }; - export type MutationIndividualCreateArgs = { input: IndividualCreateInput; }; - export type MutationIndividualDestroyArgs = { input: IndividualDestroyInput; }; - export type MutationIndividualUpdateArgs = { input: IndividualUpdateInput; }; - export type MutationManagerCreateArgs = { input: ManagerCreateInput; }; - export type MutationManagerUpdateArgs = { input: ManagerUpdateInput; }; - export type MutationOrganizationUpdateArgs = { input: OrganizationUpdateInput; }; - export type MutationReportCreateArgs = { input: ReportCreateInput; }; - export type MutationReportUpdateArgs = { input: ReportUpdateInput; }; - export type MutationSignUpArgs = { input: SignUpInput; }; - export type MutationVisionCreateArgs = { input: VisionCreateInput; }; - export type MutationVisionUpdateArgs = { input: VisionUpdateInput; }; /** Fields to order by and the sort direction */ export type Order = { - direction: Scalars['String']['input']; - field: Scalars['String']['input']; + direction: Scalars["String"]["input"]; + field: Scalars["String"]["input"]; }; export type Organization = { - __typename?: 'Organization'; + __typename?: "Organization"; aiEngines?: Maybe; - githubOrgs?: Maybe; - githubToken?: Maybe; - id: Scalars['Int']['output']; - isPersonal: Scalars['Boolean']['output']; - isSystem: Scalars['Boolean']['output']; - name: Scalars['String']['output']; + githubOrgs?: Maybe; + githubToken?: Maybe; + id: Scalars["Int"]["output"]; + isPersonal: Scalars["Boolean"]["output"]; + isSystem: Scalars["Boolean"]["output"]; + name: Scalars["String"]["output"]; owner: User; - systemAiEngineMaxTokens: Scalars['Int']['output']; - systemAiEngineUsedCompletionTokens: Scalars['Int']['output']; - systemAiEngineUsedPromptTokens: Scalars['Int']['output']; - useSystemAiEngine: Scalars['Boolean']['output']; - useSystemGithubToken: Scalars['Boolean']['output']; + systemAiEngineMaxTokens: Scalars["Int"]["output"]; + systemAiEngineUsedCompletionTokens: Scalars["Int"]["output"]; + systemAiEngineUsedPromptTokens: Scalars["Int"]["output"]; + useSystemAiEngine: Scalars["Boolean"]["output"]; + useSystemGithubToken: Scalars["Boolean"]["output"]; }; - export type OrganizationAiEnginesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type OrganizationBasicInfo = { - __typename?: 'OrganizationBasicInfo'; - id: Scalars['Int']['output']; - isPersonal: Scalars['Boolean']['output']; - name: Scalars['String']['output']; + __typename?: "OrganizationBasicInfo"; + id: Scalars["Int"]["output"]; + isPersonal: Scalars["Boolean"]["output"]; + name: Scalars["String"]["output"]; }; export type OrganizationUpdate = { aiEngines?: InputMaybe>; - githubOrgs?: InputMaybe; - githubToken?: InputMaybe; - name: Scalars['String']['input']; - ownerEmail: Scalars['String']['input']; - useSystemAiEngine: Scalars['Boolean']['input']; - useSystemGithubToken: Scalars['Boolean']['input']; + githubOrgs?: InputMaybe; + githubToken?: InputMaybe; + name: Scalars["String"]["input"]; + ownerEmail: Scalars["String"]["input"]; + useSystemAiEngine: Scalars["Boolean"]["input"]; + useSystemGithubToken: Scalars["Boolean"]["input"]; }; /** Autogenerated input type of OrganizationUpdate */ export type OrganizationUpdateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - id: Scalars['ID']['input']; + clientMutationId?: InputMaybe; + id: Scalars["ID"]["input"]; organizationInput: OrganizationUpdate; }; /** Autogenerated return type of OrganizationUpdate. */ export type OrganizationUpdatePayload = { - __typename?: 'OrganizationUpdatePayload'; + __typename?: "OrganizationUpdatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; organization: Organization; }; /** Information about pagination in a connection. */ export type PageInfo = { - __typename?: 'PageInfo'; + __typename?: "PageInfo"; /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; + endCursor?: Maybe; /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; + hasNextPage: Scalars["Boolean"]["output"]; /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; + hasPreviousPage: Scalars["Boolean"]["output"]; /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; + startCursor?: Maybe; }; export enum PerformanceCategory { - HighPositive = 'HIGH_POSITIVE', - New = 'NEW', - OffTrack = 'OFF_TRACK', - Positive = 'POSITIVE', - UsuallyMeets = 'USUALLY_MEETS' + HighPositive = "HIGH_POSITIVE", + New = "NEW", + OffTrack = "OFF_TRACK", + Positive = "POSITIVE", + UsuallyMeets = "USUALLY_MEETS", } export type Query = { - __typename?: 'Query'; + __typename?: "Query"; /** Returns a list of activities */ activities: ActivityConnection; /** Returns an activity */ @@ -732,113 +722,101 @@ export type Query = { visions: VisionConnection; }; - export type QueryActivitiesArgs = { - after?: InputMaybe; - before?: InputMaybe; - cycleId?: InputMaybe; - first?: InputMaybe; - individualId?: InputMaybe; - isAnalyzed?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + cycleId?: InputMaybe; + first?: InputMaybe; + individualId?: InputMaybe; + isAnalyzed?: InputMaybe; + last?: InputMaybe; orderBy?: InputMaybe>; }; - export type QueryActivityArgs = { - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }; - export type QueryAdviceArgs = { - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }; - export type QueryAdviceListArgs = { - after?: InputMaybe; - before?: InputMaybe; - cycleId?: InputMaybe; - first?: InputMaybe; - individualId?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + cycleId?: InputMaybe; + first?: InputMaybe; + individualId?: InputMaybe; + last?: InputMaybe; orderBy?: InputMaybe>; }; - export type QueryCycleArgs = { - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }; - export type QueryCyclesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; orderBy?: InputMaybe>; }; - export type QueryIndividualArgs = { - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }; - export type QueryIndividualsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - isActive?: InputMaybe; - isManager?: InputMaybe; - last?: InputMaybe; - managerId?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + isActive?: InputMaybe; + isManager?: InputMaybe; + last?: InputMaybe; + managerId?: InputMaybe; orderBy?: InputMaybe>; }; - export type QueryOrganizationArgs = { - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }; - export type QueryVisionArgs = { - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }; - export type QueryVisionTypesArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; - export type QueryVisionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - cycleId?: InputMaybe; - first?: InputMaybe; - individualId?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + cycleId?: InputMaybe; + first?: InputMaybe; + individualId?: InputMaybe; + last?: InputMaybe; level?: InputMaybe; orderBy?: InputMaybe>; - organizationOnly?: InputMaybe; + organizationOnly?: InputMaybe; }; export type Report = { - __typename?: 'Report'; - Id: Scalars['Int']['output']; + __typename?: "Report"; + Id: Scalars["Int"]["output"]; Manager: Manager; - ManagerId: Scalars['Int']['output']; - Name: Scalars['String']['output']; + ManagerId: Scalars["Int"]["output"]; + Name: Scalars["String"]["output"]; Performance: PerformanceCategory; }; /** The connection type for Report. */ export type ReportConnection = { - __typename?: 'ReportConnection'; + __typename?: "ReportConnection"; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ @@ -850,100 +828,100 @@ export type ReportConnection = { /** Autogenerated input type of ReportCreate */ export type ReportCreateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; + clientMutationId?: InputMaybe; reportInput: ReportInput; }; /** Autogenerated return type of ReportCreate. */ export type ReportCreatePayload = { - __typename?: 'ReportCreatePayload'; + __typename?: "ReportCreatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; report: Report; }; /** An edge in a connection. */ export type ReportEdge = { - __typename?: 'ReportEdge'; + __typename?: "ReportEdge"; /** A cursor for use in pagination. */ - cursor: Scalars['String']['output']; + cursor: Scalars["String"]["output"]; /** The item at the end of the edge. */ node?: Maybe; }; export type ReportInput = { - Id: Scalars['Int']['input']; - ManagerId: Scalars['Int']['input']; - Name: Scalars['String']['input']; + Id: Scalars["Int"]["input"]; + ManagerId: Scalars["Int"]["input"]; + Name: Scalars["String"]["input"]; Performance: PerformanceCategory; }; /** Autogenerated input type of ReportUpdate */ export type ReportUpdateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - id: Scalars['ID']['input']; + clientMutationId?: InputMaybe; + id: Scalars["ID"]["input"]; reportInput: ReportInput; }; /** Autogenerated return type of ReportUpdate. */ export type ReportUpdatePayload = { - __typename?: 'ReportUpdatePayload'; + __typename?: "ReportUpdatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; report: Report; }; /** Autogenerated input type of SignUp */ export type SignUpInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; + clientMutationId?: InputMaybe; signUpInput: SignUpInputs; }; export type SignUpInputs = { - organizationId?: InputMaybe; + organizationId?: InputMaybe; }; /** Autogenerated return type of SignUp. */ export type SignUpPayload = { - __typename?: 'SignUpPayload'; + __typename?: "SignUpPayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; /** Returns signed up user info */ individual: Individual; }; export type User = { - __typename?: 'User'; - avatarUrl?: Maybe; - email: Scalars['String']['output']; + __typename?: "User"; + avatarUrl?: Maybe; + email: Scalars["String"]["output"]; }; export type Vision = { - __typename?: 'Vision'; - content?: Maybe; + __typename?: "Vision"; + content?: Maybe; cycle?: Maybe; - cycleId?: Maybe; - date?: Maybe; - description?: Maybe; - documentId?: Maybe; - documentUrl?: Maybe; - hasContent: Scalars['Boolean']['output']; - id: Scalars['Int']['output']; + cycleId?: Maybe; + date?: Maybe; + description?: Maybe; + documentId?: Maybe; + documentUrl?: Maybe; + hasContent: Scalars["Boolean"]["output"]; + id: Scalars["Int"]["output"]; individual?: Maybe; - individualId?: Maybe; - isOrganizational: Scalars['Boolean']['output']; - organizationId?: Maybe; - validFrom?: Maybe; - validTo?: Maybe; + individualId?: Maybe; + isOrganizational: Scalars["Boolean"]["output"]; + organizationId?: Maybe; + validFrom?: Maybe; + validTo?: Maybe; visionType: VisionType; - visionTypeId: Scalars['Int']['output']; + visionTypeId: Scalars["Int"]["output"]; }; /** The connection type for Vision. */ export type VisionConnection = { - __typename?: 'VisionConnection'; + __typename?: "VisionConnection"; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ @@ -953,57 +931,57 @@ export type VisionConnection = { }; export type VisionCreate = { - content?: InputMaybe; - cycleId?: InputMaybe; - description?: InputMaybe; - documentId?: InputMaybe; - documentUrl?: InputMaybe; - individualId?: InputMaybe; - isOrganizational: Scalars['Boolean']['input']; - validFrom?: InputMaybe; - validTo?: InputMaybe; - visionTypeId: Scalars['Int']['input']; + content?: InputMaybe; + cycleId?: InputMaybe; + description?: InputMaybe; + documentId?: InputMaybe; + documentUrl?: InputMaybe; + individualId?: InputMaybe; + isOrganizational: Scalars["Boolean"]["input"]; + validFrom?: InputMaybe; + validTo?: InputMaybe; + visionTypeId: Scalars["Int"]["input"]; }; /** Autogenerated input type of VisionCreate */ export type VisionCreateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; + clientMutationId?: InputMaybe; visionInput: VisionCreate; }; /** Autogenerated return type of VisionCreate. */ export type VisionCreatePayload = { - __typename?: 'VisionCreatePayload'; + __typename?: "VisionCreatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; vision: Vision; }; /** An edge in a connection. */ export type VisionEdge = { - __typename?: 'VisionEdge'; + __typename?: "VisionEdge"; /** A cursor for use in pagination. */ - cursor: Scalars['String']['output']; + cursor: Scalars["String"]["output"]; /** The item at the end of the edge. */ node?: Maybe; }; export enum VisionFilterLevel { - All = 'All', - OrganizationalOnly = 'OrganizationalOnly', - PersonalOnly = 'PersonalOnly' + All = "All", + OrganizationalOnly = "OrganizationalOnly", + PersonalOnly = "PersonalOnly", } export type VisionType = { - __typename?: 'VisionType'; - id: Scalars['Int']['output']; - title: Scalars['String']['output']; + __typename?: "VisionType"; + id: Scalars["Int"]["output"]; + title: Scalars["String"]["output"]; }; /** The connection type for VisionType. */ export type VisionTypeConnection = { - __typename?: 'VisionTypeConnection'; + __typename?: "VisionTypeConnection"; /** A list of edges. */ edges?: Maybe>>; /** A list of nodes. */ @@ -1014,39 +992,39 @@ export type VisionTypeConnection = { /** An edge in a connection. */ export type VisionTypeEdge = { - __typename?: 'VisionTypeEdge'; + __typename?: "VisionTypeEdge"; /** A cursor for use in pagination. */ - cursor: Scalars['String']['output']; + cursor: Scalars["String"]["output"]; /** The item at the end of the edge. */ node?: Maybe; }; export type VisionUpdate = { - content?: InputMaybe; - cycleId?: InputMaybe; - description?: InputMaybe; - documentId?: InputMaybe; - documentUrl?: InputMaybe; - individualId?: InputMaybe; - isOrganizational: Scalars['Boolean']['input']; - validFrom?: InputMaybe; - validTo?: InputMaybe; - visionTypeId: Scalars['Int']['input']; + content?: InputMaybe; + cycleId?: InputMaybe; + description?: InputMaybe; + documentId?: InputMaybe; + documentUrl?: InputMaybe; + individualId?: InputMaybe; + isOrganizational: Scalars["Boolean"]["input"]; + validFrom?: InputMaybe; + validTo?: InputMaybe; + visionTypeId: Scalars["Int"]["input"]; }; /** Autogenerated input type of VisionUpdate */ export type VisionUpdateInput = { /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - id: Scalars['ID']['input']; + clientMutationId?: InputMaybe; + id: Scalars["ID"]["input"]; visionInput: VisionUpdate; }; /** Autogenerated return type of VisionUpdate. */ export type VisionUpdatePayload = { - __typename?: 'VisionUpdatePayload'; + __typename?: "VisionUpdatePayload"; /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; + clientMutationId?: Maybe; vision: Vision; }; @@ -1054,310 +1032,868 @@ export type AssignActivitiesMutationVariables = Exact<{ input: AssignMissedCycleActivitiesInput; }>; +export type AssignActivitiesMutation = { + __typename?: "Mutation"; + assignMissedCycleActivities?: { + __typename?: "AssignMissedCycleActivitiesPayload"; + totalCount: number; + } | null; +}; -export type AssignActivitiesMutation = { __typename?: 'Mutation', assignMissedCycleActivities?: { __typename?: 'AssignMissedCycleActivitiesPayload', totalCount: number } | null }; - -export type ActivityFragmentFragment = { __typename?: 'Activity', id: number, title?: string | null, prompt?: string | null, result?: string | null, isAnalyzed: boolean }; +export type ActivityFragmentFragment = { + __typename?: "Activity"; + id: number; + title?: string | null; + prompt?: string | null; + result?: string | null; + isAnalyzed: boolean; +}; export type AnalyzeActivityMutationVariables = Exact<{ input: AnalyzeActivityInput; }>; - -export type AnalyzeActivityMutation = { __typename?: 'Mutation', analyzeActivity?: { __typename?: 'AnalyzeActivityPayload', activity: { __typename?: 'Activity', id: number, title?: string | null, prompt?: string | null, result?: string | null, isAnalyzed: boolean } } | null }; +export type AnalyzeActivityMutation = { + __typename?: "Mutation"; + analyzeActivity?: { + __typename?: "AnalyzeActivityPayload"; + activity: { + __typename?: "Activity"; + id: number; + title?: string | null; + prompt?: string | null; + result?: string | null; + isAnalyzed: boolean; + }; + } | null; +}; export type FindActivityQueryVariables = Exact<{ - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }>; - -export type FindActivityQuery = { __typename?: 'Query', activity: { __typename?: 'Activity', id: number, title?: string | null, prompt?: string | null, result?: string | null, isAnalyzed: boolean } }; +export type FindActivityQuery = { + __typename?: "Query"; + activity: { + __typename?: "Activity"; + id: number; + title?: string | null; + prompt?: string | null; + result?: string | null; + isAnalyzed: boolean; + }; +}; export type UpdateActivityMutationVariables = Exact<{ input: ActivityUpdateInput; }>; - -export type UpdateActivityMutation = { __typename?: 'Mutation', activityUpdate?: { __typename?: 'ActivityUpdatePayload', activity: { __typename?: 'Activity', id: number, title?: string | null, prompt?: string | null, result?: string | null, isAnalyzed: boolean } } | null }; - -export type CycleFragmentFragment = { __typename?: 'Cycle', id: number, title: string, description?: string | null, from: any, to: any }; +export type UpdateActivityMutation = { + __typename?: "Mutation"; + activityUpdate?: { + __typename?: "ActivityUpdatePayload"; + activity: { + __typename?: "Activity"; + id: number; + title?: string | null; + prompt?: string | null; + result?: string | null; + isAnalyzed: boolean; + }; + } | null; +}; + +export type CycleFragmentFragment = { + __typename?: "Cycle"; + id: number; + title: string; + description?: string | null; + from: any; + to: any; +}; export type FindCycleQueryVariables = Exact<{ - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }>; - -export type FindCycleQuery = { __typename?: 'Query', cycle: { __typename?: 'Cycle', id: number, title: string, description?: string | null, from: any, to: any } }; +export type FindCycleQuery = { + __typename?: "Query"; + cycle: { + __typename?: "Cycle"; + id: number; + title: string; + description?: string | null; + from: any; + to: any; + }; +}; export type UpdateCycleMutationVariables = Exact<{ input: CycleUpdateInput; }>; - -export type UpdateCycleMutation = { __typename?: 'Mutation', cycleUpdate?: { __typename?: 'CycleUpdatePayload', cycle: { __typename?: 'Cycle', id: number, title: string, description?: string | null, from: any, to: any } } | null }; - -export type CyclesQueryVariables = Exact<{ [key: string]: never; }>; - - -export type CyclesQuery = { __typename?: 'Query', cycles: { __typename?: 'CycleConnection', nodes?: Array<{ __typename?: 'Cycle', id: number, title: string, from: any, to: any } | null> | null } }; +export type UpdateCycleMutation = { + __typename?: "Mutation"; + cycleUpdate?: { + __typename?: "CycleUpdatePayload"; + cycle: { + __typename?: "Cycle"; + id: number; + title: string; + description?: string | null; + from: any; + to: any; + }; + } | null; +}; + +export type CyclesQueryVariables = Exact<{ [key: string]: never }>; + +export type CyclesQuery = { + __typename?: "Query"; + cycles: { + __typename?: "CycleConnection"; + nodes?: Array<{ + __typename?: "Cycle"; + id: number; + title: string; + from: any; + to: any; + } | null> | null; + }; +}; export type CreateCycleMutationVariables = Exact<{ input: CycleCreateInput; }>; - -export type CreateCycleMutation = { __typename?: 'Mutation', cycleCreate?: { __typename?: 'CycleCreatePayload', cycle: { __typename?: 'Cycle', id: number, title: string, description?: string | null, from: any, to: any } } | null }; +export type CreateCycleMutation = { + __typename?: "Mutation"; + cycleCreate?: { + __typename?: "CycleCreatePayload"; + cycle: { + __typename?: "Cycle"; + id: number; + title: string; + description?: string | null; + from: any; + to: any; + }; + } | null; +}; export type GenerateCycleAdviceMutationVariables = Exact<{ - individualId: Scalars['Int']['input']; - cycleId: Scalars['Int']['input']; + individualId: Scalars["Int"]["input"]; + cycleId: Scalars["Int"]["input"]; }>; - -export type GenerateCycleAdviceMutation = { __typename?: 'Mutation', generateCycleAdvice?: { __typename?: 'GenerateCycleAdvicePayload', advice: { __typename?: 'Advice', cycleId: number, id: number, isAnalyzed: boolean, isActivityAnalyzed: boolean, isVisionAnalyzed: boolean, result?: string | null, visionSummary?: string | null, activitySummary?: string | null, analyzedAt: any, activitiesTotal: number, analyzedActivitiesTotal: number, visionsTotal: number, contentReadyVisionsTotal: number } } | null }; - -export type AdviceFragmentFragment = { __typename?: 'Advice', cycleId: number, id: number, isAnalyzed: boolean, isActivityAnalyzed: boolean, isVisionAnalyzed: boolean, result?: string | null, visionSummary?: string | null, activitySummary?: string | null, analyzedAt: any, activitiesTotal: number, analyzedActivitiesTotal: number, visionsTotal: number, contentReadyVisionsTotal: number }; +export type GenerateCycleAdviceMutation = { + __typename?: "Mutation"; + generateCycleAdvice?: { + __typename?: "GenerateCycleAdvicePayload"; + advice: { + __typename?: "Advice"; + cycleId: number; + id: number; + isAnalyzed: boolean; + isActivityAnalyzed: boolean; + isVisionAnalyzed: boolean; + result?: string | null; + visionSummary?: string | null; + activitySummary?: string | null; + analyzedAt: any; + activitiesTotal: number; + analyzedActivitiesTotal: number; + visionsTotal: number; + contentReadyVisionsTotal: number; + }; + } | null; +}; + +export type AdviceFragmentFragment = { + __typename?: "Advice"; + cycleId: number; + id: number; + isAnalyzed: boolean; + isActivityAnalyzed: boolean; + isVisionAnalyzed: boolean; + result?: string | null; + visionSummary?: string | null; + activitySummary?: string | null; + analyzedAt: any; + activitiesTotal: number; + analyzedActivitiesTotal: number; + visionsTotal: number; + contentReadyVisionsTotal: number; +}; export type CoachIndividualQueryVariables = Exact<{ - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }>; - -export type CoachIndividualQuery = { __typename?: 'Query', individual: { __typename?: 'Individual', id: number, fullname?: string | null, handleGithub?: string | null, handleGoogle?: string | null, jobTitle?: string | null, jobLevelId?: string | null, userId?: number | null, managerId?: number | null, isManager: boolean, activeCycles?: { __typename?: 'CycleConnection', nodes?: Array<{ __typename?: 'Cycle', id: number, title: string, description?: string | null, from: any, to: any } | null> | null } | null }, adviceList: { __typename?: 'AdviceConnection', nodes?: Array<{ __typename?: 'Advice', cycleId: number, id: number, isAnalyzed: boolean, isActivityAnalyzed: boolean, isVisionAnalyzed: boolean, result?: string | null, visionSummary?: string | null, activitySummary?: string | null, analyzedAt: any, activitiesTotal: number, analyzedActivitiesTotal: number, visionsTotal: number, contentReadyVisionsTotal: number } | null> | null } }; +export type CoachIndividualQuery = { + __typename?: "Query"; + individual: { + __typename?: "Individual"; + id: number; + fullname?: string | null; + handleGithub?: string | null; + handleGoogle?: string | null; + jobTitle?: string | null; + jobLevelId?: string | null; + userId?: number | null; + managerId?: number | null; + isManager: boolean; + activeCycles?: { + __typename?: "CycleConnection"; + nodes?: Array<{ + __typename?: "Cycle"; + id: number; + title: string; + description?: string | null; + from: any; + to: any; + } | null> | null; + } | null; + }; + adviceList: { + __typename?: "AdviceConnection"; + nodes?: Array<{ + __typename?: "Advice"; + cycleId: number; + id: number; + isAnalyzed: boolean; + isActivityAnalyzed: boolean; + isVisionAnalyzed: boolean; + result?: string | null; + visionSummary?: string | null; + activitySummary?: string | null; + analyzedAt: any; + activitiesTotal: number; + analyzedActivitiesTotal: number; + visionsTotal: number; + contentReadyVisionsTotal: number; + } | null> | null; + }; +}; export type FindIndividualQueryVariables = Exact<{ - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }>; - -export type FindIndividualQuery = { __typename?: 'Query', individual: { __typename?: 'Individual', id: number, fullname?: string | null, handleGithub?: string | null, handleGoogle?: string | null, jobTitle?: string | null, jobLevelId?: string | null, userId?: number | null, managerId?: number | null, isManager: boolean }, managers: { __typename?: 'IndividualConnection', nodes?: Array<{ __typename?: 'Individual', id: number, fullname?: string | null } | null> | null } }; - -export type IndividualFragmentFragment = { __typename?: 'Individual', id: number, fullname?: string | null, handleGithub?: string | null, handleGoogle?: string | null, jobTitle?: string | null, jobLevelId?: string | null, userId?: number | null, managerId?: number | null, isManager: boolean }; +export type FindIndividualQuery = { + __typename?: "Query"; + individual: { + __typename?: "Individual"; + id: number; + fullname?: string | null; + handleGithub?: string | null; + handleGoogle?: string | null; + jobTitle?: string | null; + jobLevelId?: string | null; + userId?: number | null; + managerId?: number | null; + isManager: boolean; + }; + managers: { + __typename?: "IndividualConnection"; + nodes?: Array<{ + __typename?: "Individual"; + id: number; + fullname?: string | null; + } | null> | null; + }; +}; + +export type IndividualFragmentFragment = { + __typename?: "Individual"; + id: number; + fullname?: string | null; + handleGithub?: string | null; + handleGoogle?: string | null; + jobTitle?: string | null; + jobLevelId?: string | null; + userId?: number | null; + managerId?: number | null; + isManager: boolean; +}; export type UpdateIndividualMutationVariables = Exact<{ input: IndividualUpdateInput; }>; - -export type UpdateIndividualMutation = { __typename?: 'Mutation', individualUpdate?: { __typename?: 'IndividualUpdatePayload', individual: { __typename?: 'Individual', id: number, fullname?: string | null, handleGithub?: string | null, handleGoogle?: string | null, jobTitle?: string | null, jobLevelId?: string | null, userId?: number | null, managerId?: number | null, isManager: boolean } } | null }; +export type UpdateIndividualMutation = { + __typename?: "Mutation"; + individualUpdate?: { + __typename?: "IndividualUpdatePayload"; + individual: { + __typename?: "Individual"; + id: number; + fullname?: string | null; + handleGithub?: string | null; + handleGoogle?: string | null; + jobTitle?: string | null; + jobLevelId?: string | null; + userId?: number | null; + managerId?: number | null; + isManager: boolean; + }; + } | null; +}; export type AnalyzeActivityWithMinimumResultMutationVariables = Exact<{ input: AnalyzeActivityInput; }>; - -export type AnalyzeActivityWithMinimumResultMutation = { __typename?: 'Mutation', analyzeActivity?: { __typename?: 'AnalyzeActivityPayload', activity: { __typename?: 'Activity', id: number, isAnalyzed: boolean } } | null }; +export type AnalyzeActivityWithMinimumResultMutation = { + __typename?: "Mutation"; + analyzeActivity?: { + __typename?: "AnalyzeActivityPayload"; + activity: { __typename?: "Activity"; id: number; isAnalyzed: boolean }; + } | null; +}; export type ImportActivitiesMutationVariables = Exact<{ - individualId: Scalars['Int']['input']; + individualId: Scalars["Int"]["input"]; }>; - -export type ImportActivitiesMutation = { __typename?: 'Mutation', importActivities?: { __typename?: 'ImportActivitiesPayload', totalCount: number, activities: Array<{ __typename?: 'Activity', id: number, title?: string | null, isAnalyzed: boolean, date: any, channelId: number, channelActivityUrl?: string | null }> } | null }; +export type ImportActivitiesMutation = { + __typename?: "Mutation"; + importActivities?: { + __typename?: "ImportActivitiesPayload"; + totalCount: number; + activities: Array<{ + __typename?: "Activity"; + id: number; + title?: string | null; + isAnalyzed: boolean; + date: any; + channelId: number; + channelActivityUrl?: string | null; + }>; + } | null; +}; export type IndividualActivitiesQueryVariables = Exact<{ - individualId: Scalars['ID']['input']; - isAnalyzed?: InputMaybe; - cycleId?: InputMaybe; + individualId: Scalars["ID"]["input"]; + isAnalyzed?: InputMaybe; + cycleId?: InputMaybe; }>; - -export type IndividualActivitiesQuery = { __typename?: 'Query', individual: { __typename?: 'Individual', fullname?: string | null }, cycles: { __typename?: 'CycleConnection', nodes?: Array<{ __typename?: 'Cycle', id: number, title: string } | null> | null }, activities: { __typename?: 'ActivityConnection', nodes?: Array<{ __typename?: 'Activity', id: number, title?: string | null, isAnalyzed: boolean, date: any, channelId: number, channelActivityUrl?: string | null, cycle?: { __typename?: 'Cycle', id: number, title: string } | null } | null> | null } }; +export type IndividualActivitiesQuery = { + __typename?: "Query"; + individual: { __typename?: "Individual"; fullname?: string | null }; + cycles: { + __typename?: "CycleConnection"; + nodes?: Array<{ + __typename?: "Cycle"; + id: number; + title: string; + } | null> | null; + }; + activities: { + __typename?: "ActivityConnection"; + nodes?: Array<{ + __typename?: "Activity"; + id: number; + title?: string | null; + isAnalyzed: boolean; + date: any; + channelId: number; + channelActivityUrl?: string | null; + cycle?: { __typename?: "Cycle"; id: number; title: string } | null; + } | null> | null; + }; +}; export type CreateIndividualMutationVariables = Exact<{ input: IndividualCreateInput; }>; - -export type CreateIndividualMutation = { __typename?: 'Mutation', individualCreate?: { __typename?: 'IndividualCreatePayload', individual: { __typename?: 'Individual', id: number, fullname?: string | null, handleGithub?: string | null, handleGoogle?: string | null, jobTitle?: string | null, jobLevelId?: string | null, userId?: number | null, managerId?: number | null, isManager: boolean } } | null }; - -export type GetManagersQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetManagersQuery = { __typename?: 'Query', managers: { __typename?: 'IndividualConnection', nodes?: Array<{ __typename?: 'Individual', id: number, fullname?: string | null } | null> | null } }; +export type CreateIndividualMutation = { + __typename?: "Mutation"; + individualCreate?: { + __typename?: "IndividualCreatePayload"; + individual: { + __typename?: "Individual"; + id: number; + fullname?: string | null; + handleGithub?: string | null; + handleGoogle?: string | null; + jobTitle?: string | null; + jobLevelId?: string | null; + userId?: number | null; + managerId?: number | null; + isManager: boolean; + }; + } | null; +}; + +export type GetManagersQueryVariables = Exact<{ [key: string]: never }>; + +export type GetManagersQuery = { + __typename?: "Query"; + managers: { + __typename?: "IndividualConnection"; + nodes?: Array<{ + __typename?: "Individual"; + id: number; + fullname?: string | null; + } | null> | null; + }; +}; export type IndividualsQueryVariables = Exact<{ - managerId?: InputMaybe; - fetchManagerId: Scalars['ID']['input']; - fetchManagerDetails?: InputMaybe; - isManager?: InputMaybe; + managerId?: InputMaybe; + fetchManagerId: Scalars["ID"]["input"]; + fetchManagerDetails?: InputMaybe; + isManager?: InputMaybe; }>; - -export type IndividualsQuery = { __typename?: 'Query', individuals: { __typename?: 'IndividualConnection', nodes?: Array<{ __typename?: 'Individual', id: number, fullname?: string | null, jobTitle?: string | null, jobLevelId?: string | null, isManager: boolean } | null> | null }, managerInfo?: { __typename?: 'Individual', id: number, fullname?: string | null, jobTitle?: string | null } }; +export type IndividualsQuery = { + __typename?: "Query"; + individuals: { + __typename?: "IndividualConnection"; + nodes?: Array<{ + __typename?: "Individual"; + id: number; + fullname?: string | null; + jobTitle?: string | null; + jobLevelId?: string | null; + isManager: boolean; + } | null> | null; + }; + managerInfo?: { + __typename?: "Individual"; + id: number; + fullname?: string | null; + jobTitle?: string | null; + }; +}; export type FindOrganizationQueryVariables = Exact<{ - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }>; - -export type FindOrganizationQuery = { __typename?: 'Query', organization: { __typename?: 'Organization', id: number, name: string, isPersonal: boolean, isSystem: boolean, githubOrgs?: string | null, useSystemGithubToken: boolean, githubToken?: string | null, useSystemAiEngine: boolean, systemAiEngineUsedPromptTokens: number, systemAiEngineUsedCompletionTokens: number, systemAiEngineMaxTokens: number, owner: { __typename?: 'User', email: string }, aiEngines?: { __typename?: 'AiEngineConnection', nodes?: Array<{ __typename?: 'AiEngine', id: number, settings?: string | null, type: { __typename?: 'AiEngineType', id: number, title: string } } | null> | null } | null } }; - -export type OrganizationFragmentFragment = { __typename?: 'Organization', id: number, name: string, isPersonal: boolean, isSystem: boolean, githubOrgs?: string | null, useSystemGithubToken: boolean, githubToken?: string | null, useSystemAiEngine: boolean, systemAiEngineUsedPromptTokens: number, systemAiEngineUsedCompletionTokens: number, systemAiEngineMaxTokens: number, owner: { __typename?: 'User', email: string }, aiEngines?: { __typename?: 'AiEngineConnection', nodes?: Array<{ __typename?: 'AiEngine', id: number, settings?: string | null, type: { __typename?: 'AiEngineType', id: number, title: string } } | null> | null } | null }; +export type FindOrganizationQuery = { + __typename?: "Query"; + organization: { + __typename?: "Organization"; + id: number; + name: string; + isPersonal: boolean; + isSystem: boolean; + githubOrgs?: string | null; + useSystemGithubToken: boolean; + githubToken?: string | null; + useSystemAiEngine: boolean; + systemAiEngineUsedPromptTokens: number; + systemAiEngineUsedCompletionTokens: number; + systemAiEngineMaxTokens: number; + owner: { __typename?: "User"; email: string }; + aiEngines?: { + __typename?: "AiEngineConnection"; + nodes?: Array<{ + __typename?: "AiEngine"; + id: number; + settings?: string | null; + type: { __typename?: "AiEngineType"; id: number; title: string }; + } | null> | null; + } | null; + }; +}; + +export type OrganizationFragmentFragment = { + __typename?: "Organization"; + id: number; + name: string; + isPersonal: boolean; + isSystem: boolean; + githubOrgs?: string | null; + useSystemGithubToken: boolean; + githubToken?: string | null; + useSystemAiEngine: boolean; + systemAiEngineUsedPromptTokens: number; + systemAiEngineUsedCompletionTokens: number; + systemAiEngineMaxTokens: number; + owner: { __typename?: "User"; email: string }; + aiEngines?: { + __typename?: "AiEngineConnection"; + nodes?: Array<{ + __typename?: "AiEngine"; + id: number; + settings?: string | null; + type: { __typename?: "AiEngineType"; id: number; title: string }; + } | null> | null; + } | null; +}; export type UpdateOrganizationMutationVariables = Exact<{ input: OrganizationUpdateInput; }>; - -export type UpdateOrganizationMutation = { __typename?: 'Mutation', organizationUpdate?: { __typename?: 'OrganizationUpdatePayload', organization: { __typename?: 'Organization', id: number, name: string, isPersonal: boolean, isSystem: boolean, githubOrgs?: string | null, useSystemGithubToken: boolean, githubToken?: string | null, useSystemAiEngine: boolean, systemAiEngineUsedPromptTokens: number, systemAiEngineUsedCompletionTokens: number, systemAiEngineMaxTokens: number, owner: { __typename?: 'User', email: string }, aiEngines?: { __typename?: 'AiEngineConnection', nodes?: Array<{ __typename?: 'AiEngine', id: number, settings?: string | null, type: { __typename?: 'AiEngineType', id: number, title: string } } | null> | null } | null } } | null }; +export type UpdateOrganizationMutation = { + __typename?: "Mutation"; + organizationUpdate?: { + __typename?: "OrganizationUpdatePayload"; + organization: { + __typename?: "Organization"; + id: number; + name: string; + isPersonal: boolean; + isSystem: boolean; + githubOrgs?: string | null; + useSystemGithubToken: boolean; + githubToken?: string | null; + useSystemAiEngine: boolean; + systemAiEngineUsedPromptTokens: number; + systemAiEngineUsedCompletionTokens: number; + systemAiEngineMaxTokens: number; + owner: { __typename?: "User"; email: string }; + aiEngines?: { + __typename?: "AiEngineConnection"; + nodes?: Array<{ + __typename?: "AiEngine"; + id: number; + settings?: string | null; + type: { __typename?: "AiEngineType"; id: number; title: string }; + } | null> | null; + } | null; + }; + } | null; +}; export type FindVisionQueryVariables = Exact<{ - id: Scalars['ID']['input']; + id: Scalars["ID"]["input"]; }>; - -export type FindVisionQuery = { __typename?: 'Query', vision: { __typename?: 'Vision', id: number, visionTypeId: number, documentId?: string | null, description?: string | null, documentUrl?: string | null, content?: string | null, cycleId?: number | null, individualId?: number | null, validFrom?: any | null, validTo?: any | null, isOrganizational: boolean, individual?: { __typename?: 'Individual', fullname?: string | null } | null, visionType: { __typename?: 'VisionType', title: string } }, visionTypes: { __typename?: 'VisionTypeConnection', nodes?: Array<{ __typename?: 'VisionType', id: number, title: string } | null> | null }, cycles: { __typename?: 'CycleConnection', nodes?: Array<{ __typename?: 'Cycle', id: number, title: string, description?: string | null, from: any, to: any } | null> | null } }; +export type FindVisionQuery = { + __typename?: "Query"; + vision: { + __typename?: "Vision"; + id: number; + visionTypeId: number; + documentId?: string | null; + description?: string | null; + documentUrl?: string | null; + content?: string | null; + cycleId?: number | null; + individualId?: number | null; + validFrom?: any | null; + validTo?: any | null; + isOrganizational: boolean; + individual?: { __typename?: "Individual"; fullname?: string | null } | null; + visionType: { __typename?: "VisionType"; title: string }; + }; + visionTypes: { + __typename?: "VisionTypeConnection"; + nodes?: Array<{ + __typename?: "VisionType"; + id: number; + title: string; + } | null> | null; + }; + cycles: { + __typename?: "CycleConnection"; + nodes?: Array<{ + __typename?: "Cycle"; + id: number; + title: string; + description?: string | null; + from: any; + to: any; + } | null> | null; + }; +}; export type UpdateVisionMutationVariables = Exact<{ input: VisionUpdateInput; }>; - -export type UpdateVisionMutation = { __typename?: 'Mutation', visionUpdate?: { __typename?: 'VisionUpdatePayload', vision: { __typename?: 'Vision', id: number, visionTypeId: number, documentId?: string | null, description?: string | null, documentUrl?: string | null, content?: string | null, cycleId?: number | null, individualId?: number | null, validFrom?: any | null, validTo?: any | null, isOrganizational: boolean, individual?: { __typename?: 'Individual', fullname?: string | null } | null, visionType: { __typename?: 'VisionType', title: string } } } | null }; +export type UpdateVisionMutation = { + __typename?: "Mutation"; + visionUpdate?: { + __typename?: "VisionUpdatePayload"; + vision: { + __typename?: "Vision"; + id: number; + visionTypeId: number; + documentId?: string | null; + description?: string | null; + documentUrl?: string | null; + content?: string | null; + cycleId?: number | null; + individualId?: number | null; + validFrom?: any | null; + validTo?: any | null; + isOrganizational: boolean; + individual?: { + __typename?: "Individual"; + fullname?: string | null; + } | null; + visionType: { __typename?: "VisionType"; title: string }; + }; + } | null; +}; export type VisionsQueryVariables = Exact<{ - individualId?: InputMaybe; - cycleId?: InputMaybe; - fetchIndividualId: Scalars['ID']['input']; - fetchIndividualDetails?: InputMaybe; + individualId?: InputMaybe; + cycleId?: InputMaybe; + fetchIndividualId: Scalars["ID"]["input"]; + fetchIndividualDetails?: InputMaybe; level?: InputMaybe; }>; - -export type VisionsQuery = { __typename?: 'Query', individual?: { __typename?: 'Individual', fullname?: string | null }, cycles: { __typename?: 'CycleConnection', nodes?: Array<{ __typename?: 'Cycle', id: number, title: string } | null> | null }, visions: { __typename?: 'VisionConnection', nodes?: Array<{ __typename?: 'Vision', id: number, documentId?: string | null, documentUrl?: string | null, hasContent: boolean, date?: any | null, validFrom?: any | null, validTo?: any | null, description?: string | null, cycleId?: number | null, individualId?: number | null, organizationId?: number | null, visionType: { __typename?: 'VisionType', id: number, title: string }, cycle?: { __typename?: 'Cycle', title: string, from: any, to: any } | null } | null> | null } }; +export type VisionsQuery = { + __typename?: "Query"; + individual?: { __typename?: "Individual"; fullname?: string | null }; + cycles: { + __typename?: "CycleConnection"; + nodes?: Array<{ + __typename?: "Cycle"; + id: number; + title: string; + } | null> | null; + }; + visions: { + __typename?: "VisionConnection"; + nodes?: Array<{ + __typename?: "Vision"; + id: number; + documentId?: string | null; + documentUrl?: string | null; + hasContent: boolean; + date?: any | null; + validFrom?: any | null; + validTo?: any | null; + description?: string | null; + cycleId?: number | null; + individualId?: number | null; + organizationId?: number | null; + visionType: { __typename?: "VisionType"; id: number; title: string }; + cycle?: { + __typename?: "Cycle"; + title: string; + from: any; + to: any; + } | null; + } | null> | null; + }; +}; export type CreateVisionMutationVariables = Exact<{ input: VisionCreateInput; }>; - -export type CreateVisionMutation = { __typename?: 'Mutation', visionCreate?: { __typename?: 'VisionCreatePayload', vision: { __typename?: 'Vision', id: number, visionTypeId: number, documentId?: string | null, description?: string | null, documentUrl?: string | null, content?: string | null, cycleId?: number | null, individualId?: number | null, validFrom?: any | null, validTo?: any | null, isOrganizational: boolean, visionType: { __typename?: 'VisionType', title: string } } } | null }; +export type CreateVisionMutation = { + __typename?: "Mutation"; + visionCreate?: { + __typename?: "VisionCreatePayload"; + vision: { + __typename?: "Vision"; + id: number; + visionTypeId: number; + documentId?: string | null; + description?: string | null; + documentUrl?: string | null; + content?: string | null; + cycleId?: number | null; + individualId?: number | null; + validFrom?: any | null; + validTo?: any | null; + isOrganizational: boolean; + visionType: { __typename?: "VisionType"; title: string }; + }; + } | null; +}; export type GetVisionTypesAndCyclesQueryVariables = Exact<{ - individualId: Scalars['ID']['input']; - isPersonal: Scalars['Boolean']['input']; + individualId: Scalars["ID"]["input"]; + isPersonal: Scalars["Boolean"]["input"]; }>; - -export type GetVisionTypesAndCyclesQuery = { __typename?: 'Query', visionTypes: { __typename?: 'VisionTypeConnection', nodes?: Array<{ __typename?: 'VisionType', id: number, title: string } | null> | null }, cycles: { __typename?: 'CycleConnection', nodes?: Array<{ __typename?: 'Cycle', id: number, title: string, description?: string | null, from: any, to: any } | null> | null }, individual?: { __typename?: 'Individual', fullname?: string | null } }; - -export type VisionFragmentFragment = { __typename?: 'Vision', id: number, visionTypeId: number, documentId?: string | null, description?: string | null, documentUrl?: string | null, content?: string | null, cycleId?: number | null, individualId?: number | null, validFrom?: any | null, validTo?: any | null, isOrganizational: boolean, visionType: { __typename?: 'VisionType', title: string } }; - -export type GetLoggedInUserInfoQueryVariables = Exact<{ [key: string]: never; }>; - - -export type GetLoggedInUserInfoQuery = { __typename?: 'Query', myInfo: { __typename?: 'Individual', id: number, isManager: boolean, organization: { __typename?: 'OrganizationBasicInfo', id: number, isPersonal: boolean } } }; +export type GetVisionTypesAndCyclesQuery = { + __typename?: "Query"; + visionTypes: { + __typename?: "VisionTypeConnection"; + nodes?: Array<{ + __typename?: "VisionType"; + id: number; + title: string; + } | null> | null; + }; + cycles: { + __typename?: "CycleConnection"; + nodes?: Array<{ + __typename?: "Cycle"; + id: number; + title: string; + description?: string | null; + from: any; + to: any; + } | null> | null; + }; + individual?: { __typename?: "Individual"; fullname?: string | null }; +}; + +export type VisionFragmentFragment = { + __typename?: "Vision"; + id: number; + visionTypeId: number; + documentId?: string | null; + description?: string | null; + documentUrl?: string | null; + content?: string | null; + cycleId?: number | null; + individualId?: number | null; + validFrom?: any | null; + validTo?: any | null; + isOrganizational: boolean; + visionType: { __typename?: "VisionType"; title: string }; +}; + +export type GetLoggedInUserInfoQueryVariables = Exact<{ [key: string]: never }>; + +export type GetLoggedInUserInfoQuery = { + __typename?: "Query"; + myInfo: { + __typename?: "Individual"; + id: number; + isManager: boolean; + organization: { + __typename?: "OrganizationBasicInfo"; + id: number; + isPersonal: boolean; + }; + }; +}; export type SignUpMutationVariables = Exact<{ input: SignUpInput; }>; - -export type SignUpMutation = { __typename?: 'Mutation', signUp?: { __typename?: 'SignUpPayload', individual: { __typename?: 'Individual', id: number, isManager: boolean, organization: { __typename?: 'OrganizationBasicInfo', id: number, isPersonal: boolean } } } | null }; +export type SignUpMutation = { + __typename?: "Mutation"; + signUp?: { + __typename?: "SignUpPayload"; + individual: { + __typename?: "Individual"; + id: number; + isManager: boolean; + organization: { + __typename?: "OrganizationBasicInfo"; + id: number; + isPersonal: boolean; + }; + }; + } | null; +}; export const ActivityFragmentFragmentDoc = gql` - fragment ActivityFragment on Activity { - id - title - prompt - result - isAnalyzed -} - `; + fragment ActivityFragment on Activity { + id + title + prompt + result + isAnalyzed + } +`; export const CycleFragmentFragmentDoc = gql` - fragment CycleFragment on Cycle { - id - title - description - from - to -} - `; + fragment CycleFragment on Cycle { + id + title + description + from + to + } +`; export const AdviceFragmentFragmentDoc = gql` - fragment AdviceFragment on Advice { - cycleId - id - isAnalyzed - isActivityAnalyzed - isVisionAnalyzed - result - visionSummary - activitySummary - analyzedAt - activitiesTotal - analyzedActivitiesTotal - visionsTotal - contentReadyVisionsTotal -} - `; + fragment AdviceFragment on Advice { + cycleId + id + isAnalyzed + isActivityAnalyzed + isVisionAnalyzed + result + visionSummary + activitySummary + analyzedAt + activitiesTotal + analyzedActivitiesTotal + visionsTotal + contentReadyVisionsTotal + } +`; export const IndividualFragmentFragmentDoc = gql` - fragment IndividualFragment on Individual { - id - fullname - handleGithub - handleGoogle - jobTitle - jobLevelId - userId - managerId - isManager -} - `; -export const OrganizationFragmentFragmentDoc = gql` - fragment OrganizationFragment on Organization { - id - name - owner { - email + fragment IndividualFragment on Individual { + id + fullname + handleGithub + handleGoogle + jobTitle + jobLevelId + userId + managerId + isManager } - isPersonal - isSystem - githubOrgs - useSystemGithubToken - githubToken - useSystemAiEngine - systemAiEngineUsedPromptTokens - systemAiEngineUsedCompletionTokens - systemAiEngineMaxTokens - aiEngines { - nodes { - id - type { +`; +export const OrganizationFragmentFragmentDoc = gql` + fragment OrganizationFragment on Organization { + id + name + owner { + email + } + isPersonal + isSystem + githubOrgs + useSystemGithubToken + githubToken + useSystemAiEngine + systemAiEngineUsedPromptTokens + systemAiEngineUsedCompletionTokens + systemAiEngineMaxTokens + aiEngines { + nodes { id - title + type { + id + title + } + settings } - settings } } -} - `; +`; export const VisionFragmentFragmentDoc = gql` - fragment VisionFragment on Vision { - id - visionTypeId - visionType { - title + fragment VisionFragment on Vision { + id + visionTypeId + visionType { + title + } + documentId + description + documentUrl + content + cycleId + individualId + validFrom + validTo + isOrganizational } - documentId - description - documentUrl - content - cycleId - individualId - validFrom - validTo - isOrganizational -} - `; +`; export const AssignActivitiesDocument = gql` - mutation AssignActivities($input: AssignMissedCycleActivitiesInput!) { - assignMissedCycleActivities(input: $input) { - totalCount + mutation AssignActivities($input: AssignMissedCycleActivitiesInput!) { + assignMissedCycleActivities(input: $input) { + totalCount + } } -} - `; -export type AssignActivitiesMutationFn = Apollo.MutationFunction; +`; +export type AssignActivitiesMutationFn = Apollo.MutationFunction< + AssignActivitiesMutation, + AssignActivitiesMutationVariables +>; /** * __useAssignActivitiesMutation__ @@ -1376,23 +1912,41 @@ export type AssignActivitiesMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(AssignActivitiesDocument, options); - } -export type AssignActivitiesMutationHookResult = ReturnType; -export type AssignActivitiesMutationResult = Apollo.MutationResult; -export type AssignActivitiesMutationOptions = Apollo.BaseMutationOptions; +export function useAssignActivitiesMutation( + baseOptions?: Apollo.MutationHookOptions< + AssignActivitiesMutation, + AssignActivitiesMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + AssignActivitiesMutation, + AssignActivitiesMutationVariables + >(AssignActivitiesDocument, options); +} +export type AssignActivitiesMutationHookResult = ReturnType< + typeof useAssignActivitiesMutation +>; +export type AssignActivitiesMutationResult = + Apollo.MutationResult; +export type AssignActivitiesMutationOptions = Apollo.BaseMutationOptions< + AssignActivitiesMutation, + AssignActivitiesMutationVariables +>; export const AnalyzeActivityDocument = gql` - mutation AnalyzeActivity($input: AnalyzeActivityInput!) { - analyzeActivity(input: $input) { - activity { - ...ActivityFragment + mutation AnalyzeActivity($input: AnalyzeActivityInput!) { + analyzeActivity(input: $input) { + activity { + ...ActivityFragment + } } } -} - ${ActivityFragmentFragmentDoc}`; -export type AnalyzeActivityMutationFn = Apollo.MutationFunction; + ${ActivityFragmentFragmentDoc} +`; +export type AnalyzeActivityMutationFn = Apollo.MutationFunction< + AnalyzeActivityMutation, + AnalyzeActivityMutationVariables +>; /** * __useAnalyzeActivityMutation__ @@ -1411,20 +1965,35 @@ export type AnalyzeActivityMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(AnalyzeActivityDocument, options); - } -export type AnalyzeActivityMutationHookResult = ReturnType; -export type AnalyzeActivityMutationResult = Apollo.MutationResult; -export type AnalyzeActivityMutationOptions = Apollo.BaseMutationOptions; +export function useAnalyzeActivityMutation( + baseOptions?: Apollo.MutationHookOptions< + AnalyzeActivityMutation, + AnalyzeActivityMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + AnalyzeActivityMutation, + AnalyzeActivityMutationVariables + >(AnalyzeActivityDocument, options); +} +export type AnalyzeActivityMutationHookResult = ReturnType< + typeof useAnalyzeActivityMutation +>; +export type AnalyzeActivityMutationResult = + Apollo.MutationResult; +export type AnalyzeActivityMutationOptions = Apollo.BaseMutationOptions< + AnalyzeActivityMutation, + AnalyzeActivityMutationVariables +>; export const FindActivityDocument = gql` - query findActivity($id: ID!) { - activity(id: $id) { - ...ActivityFragment + query findActivity($id: ID!) { + activity(id: $id) { + ...ActivityFragment + } } -} - ${ActivityFragmentFragmentDoc}`; + ${ActivityFragmentFragmentDoc} +`; /** * __useFindActivityQuery__ @@ -1442,32 +2011,73 @@ export const FindActivityDocument = gql` * }, * }); */ -export function useFindActivityQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FindActivityQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindActivityDocument, options); - } -export function useFindActivityLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindActivityDocument, options); - } -export function useFindActivitySuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(FindActivityDocument, options); - } -export type FindActivityQueryHookResult = ReturnType; -export type FindActivityLazyQueryHookResult = ReturnType; -export type FindActivitySuspenseQueryHookResult = ReturnType; -export type FindActivityQueryResult = Apollo.QueryResult; +export function useFindActivityQuery( + baseOptions: Apollo.QueryHookOptions< + FindActivityQuery, + FindActivityQueryVariables + > & + ( + | { variables: FindActivityQueryVariables; skip?: boolean } + | { skip: boolean } + ), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + FindActivityDocument, + options, + ); +} +export function useFindActivityLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + FindActivityQuery, + FindActivityQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + FindActivityDocument, + options, + ); +} +export function useFindActivitySuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + FindActivityQuery, + FindActivityQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + FindActivityDocument, + options, + ); +} +export type FindActivityQueryHookResult = ReturnType< + typeof useFindActivityQuery +>; +export type FindActivityLazyQueryHookResult = ReturnType< + typeof useFindActivityLazyQuery +>; +export type FindActivitySuspenseQueryHookResult = ReturnType< + typeof useFindActivitySuspenseQuery +>; +export type FindActivityQueryResult = Apollo.QueryResult< + FindActivityQuery, + FindActivityQueryVariables +>; export const UpdateActivityDocument = gql` - mutation UpdateActivity($input: ActivityUpdateInput!) { - activityUpdate(input: $input) { - activity { - ...ActivityFragment + mutation UpdateActivity($input: ActivityUpdateInput!) { + activityUpdate(input: $input) { + activity { + ...ActivityFragment + } } } -} - ${ActivityFragmentFragmentDoc}`; -export type UpdateActivityMutationFn = Apollo.MutationFunction; + ${ActivityFragmentFragmentDoc} +`; +export type UpdateActivityMutationFn = Apollo.MutationFunction< + UpdateActivityMutation, + UpdateActivityMutationVariables +>; /** * __useUpdateActivityMutation__ @@ -1486,20 +2096,35 @@ export type UpdateActivityMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateActivityDocument, options); - } -export type UpdateActivityMutationHookResult = ReturnType; -export type UpdateActivityMutationResult = Apollo.MutationResult; -export type UpdateActivityMutationOptions = Apollo.BaseMutationOptions; +export function useUpdateActivityMutation( + baseOptions?: Apollo.MutationHookOptions< + UpdateActivityMutation, + UpdateActivityMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + UpdateActivityMutation, + UpdateActivityMutationVariables + >(UpdateActivityDocument, options); +} +export type UpdateActivityMutationHookResult = ReturnType< + typeof useUpdateActivityMutation +>; +export type UpdateActivityMutationResult = + Apollo.MutationResult; +export type UpdateActivityMutationOptions = Apollo.BaseMutationOptions< + UpdateActivityMutation, + UpdateActivityMutationVariables +>; export const FindCycleDocument = gql` - query findCycle($id: ID!) { - cycle(id: $id) { - ...CycleFragment + query findCycle($id: ID!) { + cycle(id: $id) { + ...CycleFragment + } } -} - ${CycleFragmentFragmentDoc}`; + ${CycleFragmentFragmentDoc} +`; /** * __useFindCycleQuery__ @@ -1517,32 +2142,71 @@ export const FindCycleDocument = gql` * }, * }); */ -export function useFindCycleQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FindCycleQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindCycleDocument, options); - } -export function useFindCycleLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindCycleDocument, options); - } -export function useFindCycleSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(FindCycleDocument, options); - } +export function useFindCycleQuery( + baseOptions: Apollo.QueryHookOptions< + FindCycleQuery, + FindCycleQueryVariables + > & + ( + | { variables: FindCycleQueryVariables; skip?: boolean } + | { skip: boolean } + ), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + FindCycleDocument, + options, + ); +} +export function useFindCycleLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + FindCycleQuery, + FindCycleQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + FindCycleDocument, + options, + ); +} +export function useFindCycleSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + FindCycleQuery, + FindCycleQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + FindCycleDocument, + options, + ); +} export type FindCycleQueryHookResult = ReturnType; -export type FindCycleLazyQueryHookResult = ReturnType; -export type FindCycleSuspenseQueryHookResult = ReturnType; -export type FindCycleQueryResult = Apollo.QueryResult; +export type FindCycleLazyQueryHookResult = ReturnType< + typeof useFindCycleLazyQuery +>; +export type FindCycleSuspenseQueryHookResult = ReturnType< + typeof useFindCycleSuspenseQuery +>; +export type FindCycleQueryResult = Apollo.QueryResult< + FindCycleQuery, + FindCycleQueryVariables +>; export const UpdateCycleDocument = gql` - mutation UpdateCycle($input: CycleUpdateInput!) { - cycleUpdate(input: $input) { - cycle { - ...CycleFragment + mutation UpdateCycle($input: CycleUpdateInput!) { + cycleUpdate(input: $input) { + cycle { + ...CycleFragment + } } } -} - ${CycleFragmentFragmentDoc}`; -export type UpdateCycleMutationFn = Apollo.MutationFunction; + ${CycleFragmentFragmentDoc} +`; +export type UpdateCycleMutationFn = Apollo.MutationFunction< + UpdateCycleMutation, + UpdateCycleMutationVariables +>; /** * __useUpdateCycleMutation__ @@ -1561,25 +2225,39 @@ export type UpdateCycleMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateCycleDocument, options); - } -export type UpdateCycleMutationHookResult = ReturnType; -export type UpdateCycleMutationResult = Apollo.MutationResult; -export type UpdateCycleMutationOptions = Apollo.BaseMutationOptions; +export function useUpdateCycleMutation( + baseOptions?: Apollo.MutationHookOptions< + UpdateCycleMutation, + UpdateCycleMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation( + UpdateCycleDocument, + options, + ); +} +export type UpdateCycleMutationHookResult = ReturnType< + typeof useUpdateCycleMutation +>; +export type UpdateCycleMutationResult = + Apollo.MutationResult; +export type UpdateCycleMutationOptions = Apollo.BaseMutationOptions< + UpdateCycleMutation, + UpdateCycleMutationVariables +>; export const CyclesDocument = gql` - query cycles { - cycles { - nodes { - id - title - from - to + query cycles { + cycles { + nodes { + id + title + from + to + } } } -} - `; +`; /** * __useCyclesQuery__ @@ -1596,32 +2274,59 @@ export const CyclesDocument = gql` * }, * }); */ -export function useCyclesQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(CyclesDocument, options); - } -export function useCyclesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(CyclesDocument, options); - } -export function useCyclesSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(CyclesDocument, options); - } +export function useCyclesQuery( + baseOptions?: Apollo.QueryHookOptions, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + CyclesDocument, + options, + ); +} +export function useCyclesLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + CyclesDocument, + options, + ); +} +export function useCyclesSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + CyclesQuery, + CyclesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + CyclesDocument, + options, + ); +} export type CyclesQueryHookResult = ReturnType; export type CyclesLazyQueryHookResult = ReturnType; -export type CyclesSuspenseQueryHookResult = ReturnType; -export type CyclesQueryResult = Apollo.QueryResult; +export type CyclesSuspenseQueryHookResult = ReturnType< + typeof useCyclesSuspenseQuery +>; +export type CyclesQueryResult = Apollo.QueryResult< + CyclesQuery, + CyclesQueryVariables +>; export const CreateCycleDocument = gql` - mutation createCycle($input: CycleCreateInput!) { - cycleCreate(input: $input) { - cycle { - ...CycleFragment + mutation createCycle($input: CycleCreateInput!) { + cycleCreate(input: $input) { + cycle { + ...CycleFragment + } } } -} - ${CycleFragmentFragmentDoc}`; -export type CreateCycleMutationFn = Apollo.MutationFunction; + ${CycleFragmentFragmentDoc} +`; +export type CreateCycleMutationFn = Apollo.MutationFunction< + CreateCycleMutation, + CreateCycleMutationVariables +>; /** * __useCreateCycleMutation__ @@ -1640,23 +2345,43 @@ export type CreateCycleMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateCycleDocument, options); - } -export type CreateCycleMutationHookResult = ReturnType; -export type CreateCycleMutationResult = Apollo.MutationResult; -export type CreateCycleMutationOptions = Apollo.BaseMutationOptions; +export function useCreateCycleMutation( + baseOptions?: Apollo.MutationHookOptions< + CreateCycleMutation, + CreateCycleMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation( + CreateCycleDocument, + options, + ); +} +export type CreateCycleMutationHookResult = ReturnType< + typeof useCreateCycleMutation +>; +export type CreateCycleMutationResult = + Apollo.MutationResult; +export type CreateCycleMutationOptions = Apollo.BaseMutationOptions< + CreateCycleMutation, + CreateCycleMutationVariables +>; export const GenerateCycleAdviceDocument = gql` - mutation GenerateCycleAdvice($individualId: Int!, $cycleId: Int!) { - generateCycleAdvice(input: {individualId: $individualId, cycleId: $cycleId}) { - advice { - ...AdviceFragment + mutation GenerateCycleAdvice($individualId: Int!, $cycleId: Int!) { + generateCycleAdvice( + input: { individualId: $individualId, cycleId: $cycleId } + ) { + advice { + ...AdviceFragment + } } } -} - ${AdviceFragmentFragmentDoc}`; -export type GenerateCycleAdviceMutationFn = Apollo.MutationFunction; + ${AdviceFragmentFragmentDoc} +`; +export type GenerateCycleAdviceMutationFn = Apollo.MutationFunction< + GenerateCycleAdviceMutation, + GenerateCycleAdviceMutationVariables +>; /** * __useGenerateCycleAdviceMutation__ @@ -1676,32 +2401,47 @@ export type GenerateCycleAdviceMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(GenerateCycleAdviceDocument, options); - } -export type GenerateCycleAdviceMutationHookResult = ReturnType; -export type GenerateCycleAdviceMutationResult = Apollo.MutationResult; -export type GenerateCycleAdviceMutationOptions = Apollo.BaseMutationOptions; +export function useGenerateCycleAdviceMutation( + baseOptions?: Apollo.MutationHookOptions< + GenerateCycleAdviceMutation, + GenerateCycleAdviceMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + GenerateCycleAdviceMutation, + GenerateCycleAdviceMutationVariables + >(GenerateCycleAdviceDocument, options); +} +export type GenerateCycleAdviceMutationHookResult = ReturnType< + typeof useGenerateCycleAdviceMutation +>; +export type GenerateCycleAdviceMutationResult = + Apollo.MutationResult; +export type GenerateCycleAdviceMutationOptions = Apollo.BaseMutationOptions< + GenerateCycleAdviceMutation, + GenerateCycleAdviceMutationVariables +>; export const CoachIndividualDocument = gql` - query coachIndividual($id: ID!) { - individual(id: $id) { - ...IndividualFragment - activeCycles { - nodes { - ...CycleFragment + query coachIndividual($id: ID!) { + individual(id: $id) { + ...IndividualFragment + activeCycles { + nodes { + ...CycleFragment + } } } - } - adviceList(individualId: $id) { - nodes { - ...AdviceFragment + adviceList(individualId: $id) { + nodes { + ...AdviceFragment + } } } -} - ${IndividualFragmentFragmentDoc} -${CycleFragmentFragmentDoc} -${AdviceFragmentFragmentDoc}`; + ${IndividualFragmentFragmentDoc} + ${CycleFragmentFragmentDoc} + ${AdviceFragmentFragmentDoc} +`; /** * __useCoachIndividualQuery__ @@ -1719,35 +2459,73 @@ ${AdviceFragmentFragmentDoc}`; * }, * }); */ -export function useCoachIndividualQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: CoachIndividualQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(CoachIndividualDocument, options); - } -export function useCoachIndividualLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(CoachIndividualDocument, options); - } -export function useCoachIndividualSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(CoachIndividualDocument, options); - } -export type CoachIndividualQueryHookResult = ReturnType; -export type CoachIndividualLazyQueryHookResult = ReturnType; -export type CoachIndividualSuspenseQueryHookResult = ReturnType; -export type CoachIndividualQueryResult = Apollo.QueryResult; +export function useCoachIndividualQuery( + baseOptions: Apollo.QueryHookOptions< + CoachIndividualQuery, + CoachIndividualQueryVariables + > & + ( + | { variables: CoachIndividualQueryVariables; skip?: boolean } + | { skip: boolean } + ), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + CoachIndividualDocument, + options, + ); +} +export function useCoachIndividualLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + CoachIndividualQuery, + CoachIndividualQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + CoachIndividualQuery, + CoachIndividualQueryVariables + >(CoachIndividualDocument, options); +} +export function useCoachIndividualSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + CoachIndividualQuery, + CoachIndividualQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + CoachIndividualQuery, + CoachIndividualQueryVariables + >(CoachIndividualDocument, options); +} +export type CoachIndividualQueryHookResult = ReturnType< + typeof useCoachIndividualQuery +>; +export type CoachIndividualLazyQueryHookResult = ReturnType< + typeof useCoachIndividualLazyQuery +>; +export type CoachIndividualSuspenseQueryHookResult = ReturnType< + typeof useCoachIndividualSuspenseQuery +>; +export type CoachIndividualQueryResult = Apollo.QueryResult< + CoachIndividualQuery, + CoachIndividualQueryVariables +>; export const FindIndividualDocument = gql` - query findIndividual($id: ID!) { - individual(id: $id) { - ...IndividualFragment - } - managers: individuals(isManager: true) { - nodes { - id - fullname + query findIndividual($id: ID!) { + individual(id: $id) { + ...IndividualFragment + } + managers: individuals(isManager: true) { + nodes { + id + fullname + } } } -} - ${IndividualFragmentFragmentDoc}`; + ${IndividualFragmentFragmentDoc} +`; /** * __useFindIndividualQuery__ @@ -1765,32 +2543,73 @@ export const FindIndividualDocument = gql` * }, * }); */ -export function useFindIndividualQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FindIndividualQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindIndividualDocument, options); - } -export function useFindIndividualLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindIndividualDocument, options); - } -export function useFindIndividualSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(FindIndividualDocument, options); - } -export type FindIndividualQueryHookResult = ReturnType; -export type FindIndividualLazyQueryHookResult = ReturnType; -export type FindIndividualSuspenseQueryHookResult = ReturnType; -export type FindIndividualQueryResult = Apollo.QueryResult; +export function useFindIndividualQuery( + baseOptions: Apollo.QueryHookOptions< + FindIndividualQuery, + FindIndividualQueryVariables + > & + ( + | { variables: FindIndividualQueryVariables; skip?: boolean } + | { skip: boolean } + ), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + FindIndividualDocument, + options, + ); +} +export function useFindIndividualLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + FindIndividualQuery, + FindIndividualQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + FindIndividualDocument, + options, + ); +} +export function useFindIndividualSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + FindIndividualQuery, + FindIndividualQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + FindIndividualQuery, + FindIndividualQueryVariables + >(FindIndividualDocument, options); +} +export type FindIndividualQueryHookResult = ReturnType< + typeof useFindIndividualQuery +>; +export type FindIndividualLazyQueryHookResult = ReturnType< + typeof useFindIndividualLazyQuery +>; +export type FindIndividualSuspenseQueryHookResult = ReturnType< + typeof useFindIndividualSuspenseQuery +>; +export type FindIndividualQueryResult = Apollo.QueryResult< + FindIndividualQuery, + FindIndividualQueryVariables +>; export const UpdateIndividualDocument = gql` - mutation UpdateIndividual($input: IndividualUpdateInput!) { - individualUpdate(input: $input) { - individual { - ...IndividualFragment + mutation UpdateIndividual($input: IndividualUpdateInput!) { + individualUpdate(input: $input) { + individual { + ...IndividualFragment + } } } -} - ${IndividualFragmentFragmentDoc}`; -export type UpdateIndividualMutationFn = Apollo.MutationFunction; + ${IndividualFragmentFragmentDoc} +`; +export type UpdateIndividualMutationFn = Apollo.MutationFunction< + UpdateIndividualMutation, + UpdateIndividualMutationVariables +>; /** * __useUpdateIndividualMutation__ @@ -1809,24 +2628,42 @@ export type UpdateIndividualMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateIndividualDocument, options); - } -export type UpdateIndividualMutationHookResult = ReturnType; -export type UpdateIndividualMutationResult = Apollo.MutationResult; -export type UpdateIndividualMutationOptions = Apollo.BaseMutationOptions; +export function useUpdateIndividualMutation( + baseOptions?: Apollo.MutationHookOptions< + UpdateIndividualMutation, + UpdateIndividualMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + UpdateIndividualMutation, + UpdateIndividualMutationVariables + >(UpdateIndividualDocument, options); +} +export type UpdateIndividualMutationHookResult = ReturnType< + typeof useUpdateIndividualMutation +>; +export type UpdateIndividualMutationResult = + Apollo.MutationResult; +export type UpdateIndividualMutationOptions = Apollo.BaseMutationOptions< + UpdateIndividualMutation, + UpdateIndividualMutationVariables +>; export const AnalyzeActivityWithMinimumResultDocument = gql` - mutation AnalyzeActivityWithMinimumResult($input: AnalyzeActivityInput!) { - analyzeActivity(input: $input) { - activity { - id - isAnalyzed + mutation AnalyzeActivityWithMinimumResult($input: AnalyzeActivityInput!) { + analyzeActivity(input: $input) { + activity { + id + isAnalyzed + } } } -} - `; -export type AnalyzeActivityWithMinimumResultMutationFn = Apollo.MutationFunction; +`; +export type AnalyzeActivityWithMinimumResultMutationFn = + Apollo.MutationFunction< + AnalyzeActivityWithMinimumResultMutation, + AnalyzeActivityWithMinimumResultMutationVariables + >; /** * __useAnalyzeActivityWithMinimumResultMutation__ @@ -1845,29 +2682,47 @@ export type AnalyzeActivityWithMinimumResultMutationFn = Apollo.MutationFunction * }, * }); */ -export function useAnalyzeActivityWithMinimumResultMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(AnalyzeActivityWithMinimumResultDocument, options); - } -export type AnalyzeActivityWithMinimumResultMutationHookResult = ReturnType; -export type AnalyzeActivityWithMinimumResultMutationResult = Apollo.MutationResult; -export type AnalyzeActivityWithMinimumResultMutationOptions = Apollo.BaseMutationOptions; +export function useAnalyzeActivityWithMinimumResultMutation( + baseOptions?: Apollo.MutationHookOptions< + AnalyzeActivityWithMinimumResultMutation, + AnalyzeActivityWithMinimumResultMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + AnalyzeActivityWithMinimumResultMutation, + AnalyzeActivityWithMinimumResultMutationVariables + >(AnalyzeActivityWithMinimumResultDocument, options); +} +export type AnalyzeActivityWithMinimumResultMutationHookResult = ReturnType< + typeof useAnalyzeActivityWithMinimumResultMutation +>; +export type AnalyzeActivityWithMinimumResultMutationResult = + Apollo.MutationResult; +export type AnalyzeActivityWithMinimumResultMutationOptions = + Apollo.BaseMutationOptions< + AnalyzeActivityWithMinimumResultMutation, + AnalyzeActivityWithMinimumResultMutationVariables + >; export const ImportActivitiesDocument = gql` - mutation importActivities($individualId: Int!) { - importActivities(input: {individualId: $individualId}) { - totalCount - activities { - id - title - isAnalyzed - date - channelId - channelActivityUrl + mutation importActivities($individualId: Int!) { + importActivities(input: { individualId: $individualId }) { + totalCount + activities { + id + title + isAnalyzed + date + channelId + channelActivityUrl + } } } -} - `; -export type ImportActivitiesMutationFn = Apollo.MutationFunction; +`; +export type ImportActivitiesMutationFn = Apollo.MutationFunction< + ImportActivitiesMutation, + ImportActivitiesMutationVariables +>; /** * __useImportActivitiesMutation__ @@ -1886,45 +2741,63 @@ export type ImportActivitiesMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(ImportActivitiesDocument, options); - } -export type ImportActivitiesMutationHookResult = ReturnType; -export type ImportActivitiesMutationResult = Apollo.MutationResult; -export type ImportActivitiesMutationOptions = Apollo.BaseMutationOptions; +export function useImportActivitiesMutation( + baseOptions?: Apollo.MutationHookOptions< + ImportActivitiesMutation, + ImportActivitiesMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + ImportActivitiesMutation, + ImportActivitiesMutationVariables + >(ImportActivitiesDocument, options); +} +export type ImportActivitiesMutationHookResult = ReturnType< + typeof useImportActivitiesMutation +>; +export type ImportActivitiesMutationResult = + Apollo.MutationResult; +export type ImportActivitiesMutationOptions = Apollo.BaseMutationOptions< + ImportActivitiesMutation, + ImportActivitiesMutationVariables +>; export const IndividualActivitiesDocument = gql` - query individualActivities($individualId: ID!, $isAnalyzed: Boolean, $cycleId: ID) { - individual(id: $individualId) { - fullname - } - cycles(orderBy: [{field: "from", direction: "desc"}]) { - nodes { - id - title - } - } - activities( - individualId: $individualId - isAnalyzed: $isAnalyzed - cycleId: $cycleId - orderBy: [{field: "date", direction: "desc"}] + query individualActivities( + $individualId: ID! + $isAnalyzed: Boolean + $cycleId: ID ) { - nodes { - id - title - isAnalyzed - date - channelId - channelActivityUrl - cycle { + individual(id: $individualId) { + fullname + } + cycles(orderBy: [{ field: "from", direction: "desc" }]) { + nodes { id title } } + activities( + individualId: $individualId + isAnalyzed: $isAnalyzed + cycleId: $cycleId + orderBy: [{ field: "date", direction: "desc" }] + ) { + nodes { + id + title + isAnalyzed + date + channelId + channelActivityUrl + cycle { + id + title + } + } + } } -} - `; +`; /** * __useIndividualActivitiesQuery__ @@ -1944,32 +2817,73 @@ export const IndividualActivitiesDocument = gql` * }, * }); */ -export function useIndividualActivitiesQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: IndividualActivitiesQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(IndividualActivitiesDocument, options); - } -export function useIndividualActivitiesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(IndividualActivitiesDocument, options); - } -export function useIndividualActivitiesSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(IndividualActivitiesDocument, options); - } -export type IndividualActivitiesQueryHookResult = ReturnType; -export type IndividualActivitiesLazyQueryHookResult = ReturnType; -export type IndividualActivitiesSuspenseQueryHookResult = ReturnType; -export type IndividualActivitiesQueryResult = Apollo.QueryResult; +export function useIndividualActivitiesQuery( + baseOptions: Apollo.QueryHookOptions< + IndividualActivitiesQuery, + IndividualActivitiesQueryVariables + > & + ( + | { variables: IndividualActivitiesQueryVariables; skip?: boolean } + | { skip: boolean } + ), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + IndividualActivitiesQuery, + IndividualActivitiesQueryVariables + >(IndividualActivitiesDocument, options); +} +export function useIndividualActivitiesLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + IndividualActivitiesQuery, + IndividualActivitiesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + IndividualActivitiesQuery, + IndividualActivitiesQueryVariables + >(IndividualActivitiesDocument, options); +} +export function useIndividualActivitiesSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + IndividualActivitiesQuery, + IndividualActivitiesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + IndividualActivitiesQuery, + IndividualActivitiesQueryVariables + >(IndividualActivitiesDocument, options); +} +export type IndividualActivitiesQueryHookResult = ReturnType< + typeof useIndividualActivitiesQuery +>; +export type IndividualActivitiesLazyQueryHookResult = ReturnType< + typeof useIndividualActivitiesLazyQuery +>; +export type IndividualActivitiesSuspenseQueryHookResult = ReturnType< + typeof useIndividualActivitiesSuspenseQuery +>; +export type IndividualActivitiesQueryResult = Apollo.QueryResult< + IndividualActivitiesQuery, + IndividualActivitiesQueryVariables +>; export const CreateIndividualDocument = gql` - mutation createIndividual($input: IndividualCreateInput!) { - individualCreate(input: $input) { - individual { - ...IndividualFragment + mutation createIndividual($input: IndividualCreateInput!) { + individualCreate(input: $input) { + individual { + ...IndividualFragment + } } } -} - ${IndividualFragmentFragmentDoc}`; -export type CreateIndividualMutationFn = Apollo.MutationFunction; + ${IndividualFragmentFragmentDoc} +`; +export type CreateIndividualMutationFn = Apollo.MutationFunction< + CreateIndividualMutation, + CreateIndividualMutationVariables +>; /** * __useCreateIndividualMutation__ @@ -1988,23 +2902,37 @@ export type CreateIndividualMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateIndividualDocument, options); - } -export type CreateIndividualMutationHookResult = ReturnType; -export type CreateIndividualMutationResult = Apollo.MutationResult; -export type CreateIndividualMutationOptions = Apollo.BaseMutationOptions; +export function useCreateIndividualMutation( + baseOptions?: Apollo.MutationHookOptions< + CreateIndividualMutation, + CreateIndividualMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + CreateIndividualMutation, + CreateIndividualMutationVariables + >(CreateIndividualDocument, options); +} +export type CreateIndividualMutationHookResult = ReturnType< + typeof useCreateIndividualMutation +>; +export type CreateIndividualMutationResult = + Apollo.MutationResult; +export type CreateIndividualMutationOptions = Apollo.BaseMutationOptions< + CreateIndividualMutation, + CreateIndividualMutationVariables +>; export const GetManagersDocument = gql` - query getManagers { - managers: individuals(isManager: true) { - nodes { - id - fullname + query getManagers { + managers: individuals(isManager: true) { + nodes { + id + fullname + } } } -} - `; +`; /** * __useGetManagersQuery__ @@ -2021,40 +2949,77 @@ export const GetManagersDocument = gql` * }, * }); */ -export function useGetManagersQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(GetManagersDocument, options); - } -export function useGetManagersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(GetManagersDocument, options); - } -export function useGetManagersSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(GetManagersDocument, options); - } +export function useGetManagersQuery( + baseOptions?: Apollo.QueryHookOptions< + GetManagersQuery, + GetManagersQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + GetManagersDocument, + options, + ); +} +export function useGetManagersLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetManagersQuery, + GetManagersQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + GetManagersDocument, + options, + ); +} +export function useGetManagersSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetManagersQuery, + GetManagersQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + GetManagersDocument, + options, + ); +} export type GetManagersQueryHookResult = ReturnType; -export type GetManagersLazyQueryHookResult = ReturnType; -export type GetManagersSuspenseQueryHookResult = ReturnType; -export type GetManagersQueryResult = Apollo.QueryResult; +export type GetManagersLazyQueryHookResult = ReturnType< + typeof useGetManagersLazyQuery +>; +export type GetManagersSuspenseQueryHookResult = ReturnType< + typeof useGetManagersSuspenseQuery +>; +export type GetManagersQueryResult = Apollo.QueryResult< + GetManagersQuery, + GetManagersQueryVariables +>; export const IndividualsDocument = gql` - query individuals($managerId: ID, $fetchManagerId: ID!, $fetchManagerDetails: Boolean = false, $isManager: Boolean) { - individuals(managerId: $managerId, isManager: $isManager, isActive: true) { - nodes { + query individuals( + $managerId: ID + $fetchManagerId: ID! + $fetchManagerDetails: Boolean = false + $isManager: Boolean + ) { + individuals(managerId: $managerId, isManager: $isManager, isActive: true) { + nodes { + id + fullname + jobTitle + jobLevelId + isManager + } + } + managerInfo: individual(id: $fetchManagerId) + @include(if: $fetchManagerDetails) { id fullname jobTitle - jobLevelId - isManager } } - managerInfo: individual(id: $fetchManagerId) @include(if: $fetchManagerDetails) { - id - fullname - jobTitle - } -} - `; +`; /** * __useIndividualsQuery__ @@ -2075,29 +3040,65 @@ export const IndividualsDocument = gql` * }, * }); */ -export function useIndividualsQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: IndividualsQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(IndividualsDocument, options); - } -export function useIndividualsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(IndividualsDocument, options); - } -export function useIndividualsSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(IndividualsDocument, options); - } +export function useIndividualsQuery( + baseOptions: Apollo.QueryHookOptions< + IndividualsQuery, + IndividualsQueryVariables + > & + ( + | { variables: IndividualsQueryVariables; skip?: boolean } + | { skip: boolean } + ), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + IndividualsDocument, + options, + ); +} +export function useIndividualsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + IndividualsQuery, + IndividualsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + IndividualsDocument, + options, + ); +} +export function useIndividualsSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + IndividualsQuery, + IndividualsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + IndividualsDocument, + options, + ); +} export type IndividualsQueryHookResult = ReturnType; -export type IndividualsLazyQueryHookResult = ReturnType; -export type IndividualsSuspenseQueryHookResult = ReturnType; -export type IndividualsQueryResult = Apollo.QueryResult; +export type IndividualsLazyQueryHookResult = ReturnType< + typeof useIndividualsLazyQuery +>; +export type IndividualsSuspenseQueryHookResult = ReturnType< + typeof useIndividualsSuspenseQuery +>; +export type IndividualsQueryResult = Apollo.QueryResult< + IndividualsQuery, + IndividualsQueryVariables +>; export const FindOrganizationDocument = gql` - query findOrganization($id: ID!) { - organization(id: $id) { - ...OrganizationFragment + query findOrganization($id: ID!) { + organization(id: $id) { + ...OrganizationFragment + } } -} - ${OrganizationFragmentFragmentDoc}`; + ${OrganizationFragmentFragmentDoc} +`; /** * __useFindOrganizationQuery__ @@ -2115,32 +3116,73 @@ export const FindOrganizationDocument = gql` * }, * }); */ -export function useFindOrganizationQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FindOrganizationQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindOrganizationDocument, options); - } -export function useFindOrganizationLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindOrganizationDocument, options); - } -export function useFindOrganizationSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(FindOrganizationDocument, options); - } -export type FindOrganizationQueryHookResult = ReturnType; -export type FindOrganizationLazyQueryHookResult = ReturnType; -export type FindOrganizationSuspenseQueryHookResult = ReturnType; -export type FindOrganizationQueryResult = Apollo.QueryResult; +export function useFindOrganizationQuery( + baseOptions: Apollo.QueryHookOptions< + FindOrganizationQuery, + FindOrganizationQueryVariables + > & + ( + | { variables: FindOrganizationQueryVariables; skip?: boolean } + | { skip: boolean } + ), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + FindOrganizationDocument, + options, + ); +} +export function useFindOrganizationLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + FindOrganizationQuery, + FindOrganizationQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + FindOrganizationQuery, + FindOrganizationQueryVariables + >(FindOrganizationDocument, options); +} +export function useFindOrganizationSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + FindOrganizationQuery, + FindOrganizationQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + FindOrganizationQuery, + FindOrganizationQueryVariables + >(FindOrganizationDocument, options); +} +export type FindOrganizationQueryHookResult = ReturnType< + typeof useFindOrganizationQuery +>; +export type FindOrganizationLazyQueryHookResult = ReturnType< + typeof useFindOrganizationLazyQuery +>; +export type FindOrganizationSuspenseQueryHookResult = ReturnType< + typeof useFindOrganizationSuspenseQuery +>; +export type FindOrganizationQueryResult = Apollo.QueryResult< + FindOrganizationQuery, + FindOrganizationQueryVariables +>; export const UpdateOrganizationDocument = gql` - mutation UpdateOrganization($input: OrganizationUpdateInput!) { - organizationUpdate(input: $input) { - organization { - ...OrganizationFragment + mutation UpdateOrganization($input: OrganizationUpdateInput!) { + organizationUpdate(input: $input) { + organization { + ...OrganizationFragment + } } } -} - ${OrganizationFragmentFragmentDoc}`; -export type UpdateOrganizationMutationFn = Apollo.MutationFunction; + ${OrganizationFragmentFragmentDoc} +`; +export type UpdateOrganizationMutationFn = Apollo.MutationFunction< + UpdateOrganizationMutation, + UpdateOrganizationMutationVariables +>; /** * __useUpdateOrganizationMutation__ @@ -2159,35 +3201,50 @@ export type UpdateOrganizationMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateOrganizationDocument, options); - } -export type UpdateOrganizationMutationHookResult = ReturnType; -export type UpdateOrganizationMutationResult = Apollo.MutationResult; -export type UpdateOrganizationMutationOptions = Apollo.BaseMutationOptions; +export function useUpdateOrganizationMutation( + baseOptions?: Apollo.MutationHookOptions< + UpdateOrganizationMutation, + UpdateOrganizationMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + UpdateOrganizationMutation, + UpdateOrganizationMutationVariables + >(UpdateOrganizationDocument, options); +} +export type UpdateOrganizationMutationHookResult = ReturnType< + typeof useUpdateOrganizationMutation +>; +export type UpdateOrganizationMutationResult = + Apollo.MutationResult; +export type UpdateOrganizationMutationOptions = Apollo.BaseMutationOptions< + UpdateOrganizationMutation, + UpdateOrganizationMutationVariables +>; export const FindVisionDocument = gql` - query findVision($id: ID!) { - vision(id: $id) { - ...VisionFragment - individual { - fullname + query findVision($id: ID!) { + vision(id: $id) { + ...VisionFragment + individual { + fullname + } } - } - visionTypes { - nodes { - id - title + visionTypes { + nodes { + id + title + } } - } - cycles(orderBy: {field: "from", direction: "DESC"}) { - nodes { - ...CycleFragment + cycles(orderBy: { field: "from", direction: "DESC" }) { + nodes { + ...CycleFragment + } } } -} - ${VisionFragmentFragmentDoc} -${CycleFragmentFragmentDoc}`; + ${VisionFragmentFragmentDoc} + ${CycleFragmentFragmentDoc} +`; /** * __useFindVisionQuery__ @@ -2205,35 +3262,74 @@ ${CycleFragmentFragmentDoc}`; * }, * }); */ -export function useFindVisionQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: FindVisionQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindVisionDocument, options); - } -export function useFindVisionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindVisionDocument, options); - } -export function useFindVisionSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(FindVisionDocument, options); - } +export function useFindVisionQuery( + baseOptions: Apollo.QueryHookOptions< + FindVisionQuery, + FindVisionQueryVariables + > & + ( + | { variables: FindVisionQueryVariables; skip?: boolean } + | { skip: boolean } + ), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + FindVisionDocument, + options, + ); +} +export function useFindVisionLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + FindVisionQuery, + FindVisionQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + FindVisionDocument, + options, + ); +} +export function useFindVisionSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + FindVisionQuery, + FindVisionQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + FindVisionDocument, + options, + ); +} export type FindVisionQueryHookResult = ReturnType; -export type FindVisionLazyQueryHookResult = ReturnType; -export type FindVisionSuspenseQueryHookResult = ReturnType; -export type FindVisionQueryResult = Apollo.QueryResult; +export type FindVisionLazyQueryHookResult = ReturnType< + typeof useFindVisionLazyQuery +>; +export type FindVisionSuspenseQueryHookResult = ReturnType< + typeof useFindVisionSuspenseQuery +>; +export type FindVisionQueryResult = Apollo.QueryResult< + FindVisionQuery, + FindVisionQueryVariables +>; export const UpdateVisionDocument = gql` - mutation UpdateVision($input: VisionUpdateInput!) { - visionUpdate(input: $input) { - vision { - ...VisionFragment - individual { - fullname + mutation UpdateVision($input: VisionUpdateInput!) { + visionUpdate(input: $input) { + vision { + ...VisionFragment + individual { + fullname + } } } } -} - ${VisionFragmentFragmentDoc}`; -export type UpdateVisionMutationFn = Apollo.MutationFunction; + ${VisionFragmentFragmentDoc} +`; +export type UpdateVisionMutationFn = Apollo.MutationFunction< + UpdateVisionMutation, + UpdateVisionMutationVariables +>; /** * __useUpdateVisionMutation__ @@ -2252,55 +3348,75 @@ export type UpdateVisionMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateVisionDocument, options); - } -export type UpdateVisionMutationHookResult = ReturnType; -export type UpdateVisionMutationResult = Apollo.MutationResult; -export type UpdateVisionMutationOptions = Apollo.BaseMutationOptions; +export function useUpdateVisionMutation( + baseOptions?: Apollo.MutationHookOptions< + UpdateVisionMutation, + UpdateVisionMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + UpdateVisionMutation, + UpdateVisionMutationVariables + >(UpdateVisionDocument, options); +} +export type UpdateVisionMutationHookResult = ReturnType< + typeof useUpdateVisionMutation +>; +export type UpdateVisionMutationResult = + Apollo.MutationResult; +export type UpdateVisionMutationOptions = Apollo.BaseMutationOptions< + UpdateVisionMutation, + UpdateVisionMutationVariables +>; export const VisionsDocument = gql` - query visions($individualId: ID, $cycleId: ID, $fetchIndividualId: ID!, $fetchIndividualDetails: Boolean = false, $level: VisionFilterLevel) { - individual(id: $fetchIndividualId) @include(if: $fetchIndividualDetails) { - fullname - } - cycles(orderBy: [{field: "from", direction: "desc"}]) { - nodes { - id - title - } - } - visions( - individualId: $individualId - cycleId: $cycleId - level: $level - orderBy: [{field: "validFrom", direction: "desc"}] + query visions( + $individualId: ID + $cycleId: ID + $fetchIndividualId: ID! + $fetchIndividualDetails: Boolean = false + $level: VisionFilterLevel ) { - nodes { - id - visionType { + individual(id: $fetchIndividualId) @include(if: $fetchIndividualDetails) { + fullname + } + cycles(orderBy: [{ field: "from", direction: "desc" }]) { + nodes { id title } - documentId - documentUrl - hasContent - date - validFrom - validTo - description - cycleId - individualId - organizationId - cycle { - title - from - to + } + visions( + individualId: $individualId + cycleId: $cycleId + level: $level + orderBy: [{ field: "validFrom", direction: "desc" }] + ) { + nodes { + id + visionType { + id + title + } + documentId + documentUrl + hasContent + date + validFrom + validTo + description + cycleId + individualId + organizationId + cycle { + title + from + to + } } } } -} - `; +`; /** * __useVisionsQuery__ @@ -2322,32 +3438,63 @@ export const VisionsDocument = gql` * }, * }); */ -export function useVisionsQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: VisionsQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(VisionsDocument, options); - } -export function useVisionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(VisionsDocument, options); - } -export function useVisionsSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(VisionsDocument, options); - } +export function useVisionsQuery( + baseOptions: Apollo.QueryHookOptions & + ({ variables: VisionsQueryVariables; skip?: boolean } | { skip: boolean }), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + VisionsDocument, + options, + ); +} +export function useVisionsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + VisionsQuery, + VisionsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + VisionsDocument, + options, + ); +} +export function useVisionsSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + VisionsQuery, + VisionsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + VisionsDocument, + options, + ); +} export type VisionsQueryHookResult = ReturnType; export type VisionsLazyQueryHookResult = ReturnType; -export type VisionsSuspenseQueryHookResult = ReturnType; -export type VisionsQueryResult = Apollo.QueryResult; +export type VisionsSuspenseQueryHookResult = ReturnType< + typeof useVisionsSuspenseQuery +>; +export type VisionsQueryResult = Apollo.QueryResult< + VisionsQuery, + VisionsQueryVariables +>; export const CreateVisionDocument = gql` - mutation CreateVision($input: VisionCreateInput!) { - visionCreate(input: $input) { - vision { - ...VisionFragment + mutation CreateVision($input: VisionCreateInput!) { + visionCreate(input: $input) { + vision { + ...VisionFragment + } } } -} - ${VisionFragmentFragmentDoc}`; -export type CreateVisionMutationFn = Apollo.MutationFunction; + ${VisionFragmentFragmentDoc} +`; +export type CreateVisionMutationFn = Apollo.MutationFunction< + CreateVisionMutation, + CreateVisionMutationVariables +>; /** * __useCreateVisionMutation__ @@ -2366,31 +3513,46 @@ export type CreateVisionMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateVisionDocument, options); - } -export type CreateVisionMutationHookResult = ReturnType; -export type CreateVisionMutationResult = Apollo.MutationResult; -export type CreateVisionMutationOptions = Apollo.BaseMutationOptions; +export function useCreateVisionMutation( + baseOptions?: Apollo.MutationHookOptions< + CreateVisionMutation, + CreateVisionMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + CreateVisionMutation, + CreateVisionMutationVariables + >(CreateVisionDocument, options); +} +export type CreateVisionMutationHookResult = ReturnType< + typeof useCreateVisionMutation +>; +export type CreateVisionMutationResult = + Apollo.MutationResult; +export type CreateVisionMutationOptions = Apollo.BaseMutationOptions< + CreateVisionMutation, + CreateVisionMutationVariables +>; export const GetVisionTypesAndCyclesDocument = gql` - query getVisionTypesAndCycles($individualId: ID!, $isPersonal: Boolean!) { - visionTypes { - nodes { - id - title + query getVisionTypesAndCycles($individualId: ID!, $isPersonal: Boolean!) { + visionTypes { + nodes { + id + title + } } - } - cycles(orderBy: {field: "from", direction: "DESC"}) { - nodes { - ...CycleFragment + cycles(orderBy: { field: "from", direction: "DESC" }) { + nodes { + ...CycleFragment + } + } + individual(id: $individualId) @include(if: $isPersonal) { + fullname } } - individual(id: $individualId) @include(if: $isPersonal) { - fullname - } -} - ${CycleFragmentFragmentDoc}`; + ${CycleFragmentFragmentDoc} +`; /** * __useGetVisionTypesAndCyclesQuery__ @@ -2409,34 +3571,71 @@ export const GetVisionTypesAndCyclesDocument = gql` * }, * }); */ -export function useGetVisionTypesAndCyclesQuery(baseOptions: Apollo.QueryHookOptions & ({ variables: GetVisionTypesAndCyclesQueryVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(GetVisionTypesAndCyclesDocument, options); - } -export function useGetVisionTypesAndCyclesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(GetVisionTypesAndCyclesDocument, options); - } -export function useGetVisionTypesAndCyclesSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(GetVisionTypesAndCyclesDocument, options); - } -export type GetVisionTypesAndCyclesQueryHookResult = ReturnType; -export type GetVisionTypesAndCyclesLazyQueryHookResult = ReturnType; -export type GetVisionTypesAndCyclesSuspenseQueryHookResult = ReturnType; -export type GetVisionTypesAndCyclesQueryResult = Apollo.QueryResult; +export function useGetVisionTypesAndCyclesQuery( + baseOptions: Apollo.QueryHookOptions< + GetVisionTypesAndCyclesQuery, + GetVisionTypesAndCyclesQueryVariables + > & + ( + | { variables: GetVisionTypesAndCyclesQueryVariables; skip?: boolean } + | { skip: boolean } + ), +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetVisionTypesAndCyclesQuery, + GetVisionTypesAndCyclesQueryVariables + >(GetVisionTypesAndCyclesDocument, options); +} +export function useGetVisionTypesAndCyclesLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetVisionTypesAndCyclesQuery, + GetVisionTypesAndCyclesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetVisionTypesAndCyclesQuery, + GetVisionTypesAndCyclesQueryVariables + >(GetVisionTypesAndCyclesDocument, options); +} +export function useGetVisionTypesAndCyclesSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetVisionTypesAndCyclesQuery, + GetVisionTypesAndCyclesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetVisionTypesAndCyclesQuery, + GetVisionTypesAndCyclesQueryVariables + >(GetVisionTypesAndCyclesDocument, options); +} +export type GetVisionTypesAndCyclesQueryHookResult = ReturnType< + typeof useGetVisionTypesAndCyclesQuery +>; +export type GetVisionTypesAndCyclesLazyQueryHookResult = ReturnType< + typeof useGetVisionTypesAndCyclesLazyQuery +>; +export type GetVisionTypesAndCyclesSuspenseQueryHookResult = ReturnType< + typeof useGetVisionTypesAndCyclesSuspenseQuery +>; +export type GetVisionTypesAndCyclesQueryResult = Apollo.QueryResult< + GetVisionTypesAndCyclesQuery, + GetVisionTypesAndCyclesQueryVariables +>; export const GetLoggedInUserInfoDocument = gql` - query getLoggedInUserInfo { - myInfo { - id - isManager - organization { + query getLoggedInUserInfo { + myInfo { id - isPersonal + isManager + organization { + id + isPersonal + } } } -} - `; +`; /** * __useGetLoggedInUserInfoQuery__ @@ -2453,37 +3652,73 @@ export const GetLoggedInUserInfoDocument = gql` * }, * }); */ -export function useGetLoggedInUserInfoQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(GetLoggedInUserInfoDocument, options); - } -export function useGetLoggedInUserInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(GetLoggedInUserInfoDocument, options); - } -export function useGetLoggedInUserInfoSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery(GetLoggedInUserInfoDocument, options); - } -export type GetLoggedInUserInfoQueryHookResult = ReturnType; -export type GetLoggedInUserInfoLazyQueryHookResult = ReturnType; -export type GetLoggedInUserInfoSuspenseQueryHookResult = ReturnType; -export type GetLoggedInUserInfoQueryResult = Apollo.QueryResult; +export function useGetLoggedInUserInfoQuery( + baseOptions?: Apollo.QueryHookOptions< + GetLoggedInUserInfoQuery, + GetLoggedInUserInfoQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetLoggedInUserInfoQuery, + GetLoggedInUserInfoQueryVariables + >(GetLoggedInUserInfoDocument, options); +} +export function useGetLoggedInUserInfoLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetLoggedInUserInfoQuery, + GetLoggedInUserInfoQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetLoggedInUserInfoQuery, + GetLoggedInUserInfoQueryVariables + >(GetLoggedInUserInfoDocument, options); +} +export function useGetLoggedInUserInfoSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetLoggedInUserInfoQuery, + GetLoggedInUserInfoQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetLoggedInUserInfoQuery, + GetLoggedInUserInfoQueryVariables + >(GetLoggedInUserInfoDocument, options); +} +export type GetLoggedInUserInfoQueryHookResult = ReturnType< + typeof useGetLoggedInUserInfoQuery +>; +export type GetLoggedInUserInfoLazyQueryHookResult = ReturnType< + typeof useGetLoggedInUserInfoLazyQuery +>; +export type GetLoggedInUserInfoSuspenseQueryHookResult = ReturnType< + typeof useGetLoggedInUserInfoSuspenseQuery +>; +export type GetLoggedInUserInfoQueryResult = Apollo.QueryResult< + GetLoggedInUserInfoQuery, + GetLoggedInUserInfoQueryVariables +>; export const SignUpDocument = gql` - mutation signUp($input: SignUpInput!) { - signUp(input: $input) { - individual { - id - isManager - organization { + mutation signUp($input: SignUpInput!) { + signUp(input: $input) { + individual { id - isPersonal + isManager + organization { + id + isPersonal + } } } } -} - `; -export type SignUpMutationFn = Apollo.MutationFunction; +`; +export type SignUpMutationFn = Apollo.MutationFunction< + SignUpMutation, + SignUpMutationVariables +>; /** * __useSignUpMutation__ @@ -2502,10 +3737,21 @@ export type SignUpMutationFn = Apollo.MutationFunction) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(SignUpDocument, options); - } +export function useSignUpMutation( + baseOptions?: Apollo.MutationHookOptions< + SignUpMutation, + SignUpMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation( + SignUpDocument, + options, + ); +} export type SignUpMutationHookResult = ReturnType; export type SignUpMutationResult = Apollo.MutationResult; -export type SignUpMutationOptions = Apollo.BaseMutationOptions; \ No newline at end of file +export type SignUpMutationOptions = Apollo.BaseMutationOptions< + SignUpMutation, + SignUpMutationVariables +>; diff --git a/app/components/AssignMissedActivitiesButton/AssignMissedActivitiesButton.tsx b/app/components/AssignMissedActivitiesButton/AssignMissedActivitiesButton.tsx index f0deaa7..4165eb4 100644 --- a/app/components/AssignMissedActivitiesButton/AssignMissedActivitiesButton.tsx +++ b/app/components/AssignMissedActivitiesButton/AssignMissedActivitiesButton.tsx @@ -16,7 +16,7 @@ export function AssignMissedActivitiesButton({ const [isSaving, setIsSaving] = useState(false); const [assignMissedActivitiesMethod] = useAssignActivitiesMutation(); - var onAssign = function () { + const onAssign = function () { setIsSaving(true); assignMissedActivitiesMethod({ variables: { diff --git a/app/components/CycleForm.tsx b/app/components/CycleForm.tsx index e2f982e..d19d54b 100644 --- a/app/components/CycleForm.tsx +++ b/app/components/CycleForm.tsx @@ -96,7 +96,7 @@ export function CycleForm({ - Cycle's Activities + Cycle's Activities If you have changed the dates of this cycle or it is a new @@ -115,7 +115,7 @@ export function CycleForm({ - Cycle's Visions + Cycle's Visions See all the goals, intended outcomes, job descriptions, diff --git a/app/components/IndividualForm.tsx b/app/components/IndividualForm.tsx index 48d0899..a6219ea 100644 --- a/app/components/IndividualForm.tsx +++ b/app/components/IndividualForm.tsx @@ -152,9 +152,9 @@ export function IndividualForm({ User Visions - you can see all user's visions, like organizational assigned - or personal intended outcomes, job level description, next job - level description, goals, etc. + you can see all user's visions, like organizational + assigned or personal intended outcomes, job level description, + next job level description, goals, etc. diff --git a/app/contexts/apollo/apolloClientProvider.tsx b/app/contexts/apollo/apolloClientProvider.tsx index d945b4c..cf769cb 100644 --- a/app/contexts/apollo/apolloClientProvider.tsx +++ b/app/contexts/apollo/apolloClientProvider.tsx @@ -1,5 +1,5 @@ import { getApolloClient } from "~/utils"; -import { ApolloProvider } from "@apollo/client"; +import { ApolloProvider } from "@apollo/client/index.js"; //because of https://github.com/apollographql/apollo-client/issues/9976 import { useAuthenticationContext } from "../authentication/authenticationContext"; import { useMemo } from "react"; import { useSettingsContext } from "../settings/settingsContext"; diff --git a/app/contexts/apollo/apolloServerProvider.tsx b/app/contexts/apollo/apolloServerProvider.tsx index 1b50a82..be5cf5a 100644 --- a/app/contexts/apollo/apolloServerProvider.tsx +++ b/app/contexts/apollo/apolloServerProvider.tsx @@ -1,8 +1,11 @@ -import { +import type { ApolloClient, - ApolloProvider, NormalizedCacheObject, -} from "@apollo/client"; +} from "@apollo/client/index.js"; + +import { default as apollo } from "@apollo/client"; + +const { ApolloProvider } = apollo; export const ApolloServerProvider = ({ client, diff --git a/app/contexts/authentication/authenticationContext.ts b/app/contexts/authentication/authenticationContext.ts index e9bfa34..fd27042 100644 --- a/app/contexts/authentication/authenticationContext.ts +++ b/app/contexts/authentication/authenticationContext.ts @@ -10,7 +10,7 @@ type AuthenticationContextProps = { export const AuthenticationContext = React.createContext({ user: null, - setUser: () => {}, + setUser: () => null, isAuthenticated: false, }); diff --git a/app/contexts/authentication/authenticationServerProvider.tsx b/app/contexts/authentication/authenticationServerProvider.tsx index ffa70f6..efaca2b 100644 --- a/app/contexts/authentication/authenticationServerProvider.tsx +++ b/app/contexts/authentication/authenticationServerProvider.tsx @@ -12,7 +12,7 @@ export const AuthenticationServerProvider = ({ {}, + setUser: () => null, isAuthenticated: user != null, }} > diff --git a/app/contexts/settings/settingsServerProvider.tsx b/app/contexts/settings/settingsServerProvider.tsx index 60481fb..a829ce1 100644 --- a/app/contexts/settings/settingsServerProvider.tsx +++ b/app/contexts/settings/settingsServerProvider.tsx @@ -12,7 +12,7 @@ export const SettingsServerProvider = ({ value={{ graphqlUrl, sideNavBarOpen: null, - setSideNavBarOpen: () => {}, + setSideNavBarOpen: () => null, }} > {children} diff --git a/app/entry.server.tsx b/app/entry.server.tsx index ecb0ab6..6d4e4a9 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -109,52 +109,52 @@ function handleBrowserRequest( responseHeaders: Headers, remixContext: EntryContext, ) { - return new Promise(async (resolve, reject) => { - let shellRendered = false; - - const { pipe, abort } = renderToPipeableStream( - await wrapRemixServerWithApollo( - , - request, - ), - { - onShellReady() { - shellRendered = true; - const body = new PassThrough(); - const stream = createReadableStreamFromReadable(body); - - responseHeaders.set("Content-Type", "text/html"); - - resolve( - new Response(stream, { - headers: responseHeaders, - status: responseStatusCode, - }), - ); - - pipe(body); - }, - onShellError(error: unknown) { - reject(error); - }, - onError(error: unknown) { - responseStatusCode = 500; - // Log streaming rendering errors from inside the shell. Don't log - // errors encountered during initial shell rendering since they'll - // reject and get logged in handleDocumentRequest. - if (shellRendered) { - console.error(error); - } - }, - }, - ); - - setTimeout(abort, ABORT_DELAY); - }); + return wrapRemixServerWithApollo( + , + request, + ).then( + (remixServer) => + new Promise((resolve, reject) => { + let shellRendered = false; + + const { pipe, abort } = renderToPipeableStream(remixServer, { + onShellReady() { + shellRendered = true; + const body = new PassThrough(); + const stream = createReadableStreamFromReadable(body); + + responseHeaders.set("Content-Type", "text/html"); + + resolve( + new Response(stream, { + headers: responseHeaders, + status: responseStatusCode, + }), + ); + + pipe(body); + }, + onShellError(error: unknown) { + reject(error); + }, + onError(error: unknown) { + responseStatusCode = 500; + // Log streaming rendering errors from inside the shell. Don't log + // errors encountered during initial shell rendering since they'll + // reject and get logged in handleDocumentRequest. + if (shellRendered) { + console.error(error); + } + }, + }); + + setTimeout(abort, ABORT_DELAY); + }), + ); } async function wrapRemixServerWithApollo( remixServer: ReactElement, diff --git a/app/mui/ClientStyleContext.tsx b/app/mui/ClientStyleContext.tsx index aa2bb7d..6819b6c 100644 --- a/app/mui/ClientStyleContext.tsx +++ b/app/mui/ClientStyleContext.tsx @@ -5,5 +5,5 @@ export interface ClientStyleContextData { } export default React.createContext({ - reset: () => {}, + reset: () => null, }); diff --git a/app/root.tsx b/app/root.tsx index 69bdc16..52cc855 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -1,5 +1,5 @@ import { cssBundleHref } from "@remix-run/css-bundle"; -import stylesheet from "~/tailwind.css"; +import stylesheet from "~/tailwind.css?url"; import { Links, Meta, diff --git a/app/routes/_dashboard.activities.$id.edit/route.tsx b/app/routes/_dashboard.activities.$id.edit/route.tsx index 96b8ff9..1131a43 100644 --- a/app/routes/_dashboard.activities.$id.edit/route.tsx +++ b/app/routes/_dashboard.activities.$id.edit/route.tsx @@ -44,7 +44,7 @@ export default function ActivityEdit() { const title = data.activity.title; - var onSubmit = function () { + const onSubmit = function () { setIsSaving(true); updateMethod({ @@ -67,7 +67,7 @@ export default function ActivityEdit() { }); }; - var onAnalyzeAndSave = function () { + const onAnalyzeAndSave = function () { setIsSaving(true); analyzeActivityMethod({ variables: { diff --git a/app/routes/_dashboard.cycles.$id.edit/route.tsx b/app/routes/_dashboard.cycles.$id.edit/route.tsx index c34d924..8a82f79 100644 --- a/app/routes/_dashboard.cycles.$id.edit/route.tsx +++ b/app/routes/_dashboard.cycles.$id.edit/route.tsx @@ -37,7 +37,7 @@ export default function CycleEdit() { if (error) return

{JSON.stringify(error)}

; if (!cycle || !data) return

No data

; - var onSubmit = function () { + const onSubmit = function () { updateMethod({ variables: { input: { diff --git a/app/routes/_dashboard.cycles._index/route.tsx b/app/routes/_dashboard.cycles._index/route.tsx index db3735c..a29331d 100644 --- a/app/routes/_dashboard.cycles._index/route.tsx +++ b/app/routes/_dashboard.cycles._index/route.tsx @@ -19,8 +19,8 @@ import { AssignMissedActivitiesButton } from "~/components/AssignMissedActivitie const TABLE_HEAD = ["Title", "From", "To", ""]; export default function Cycles() { - let pageTitle = "Cycles"; - let pageSubTitle = ""; + const pageTitle = "Cycles"; + const pageSubTitle = ""; const { data, loading, error } = useCyclesQuery({ fetchPolicy: "network-only", diff --git a/app/routes/_dashboard.cycles.new/route.tsx b/app/routes/_dashboard.cycles.new/route.tsx index 877f55f..b8ae5d6 100644 --- a/app/routes/_dashboard.cycles.new/route.tsx +++ b/app/routes/_dashboard.cycles.new/route.tsx @@ -16,7 +16,7 @@ export default function CycleCreate() { const [createMethod] = useCreateCycleMutation(); const nav = useNavigate(); - var onSubmit = function () { + const onSubmit = function () { createMethod({ variables: { input: { diff --git a/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx b/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx index 2ea70e4..a4080db 100644 --- a/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx +++ b/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx @@ -34,7 +34,7 @@ export function GenerateCycleSummaryButton({ onSaving?.(isSaving, generatedAdvice); }; - var onGenerateCycleSummary = function () { + const onGenerateCycleSummary = function () { changeIsSaving(true); generateCycleAdviceMethod({ variables: { diff --git a/app/routes/_dashboard.individuals.$id.coach/route.tsx b/app/routes/_dashboard.individuals.$id.coach/route.tsx index 833b9d9..3f5192e 100644 --- a/app/routes/_dashboard.individuals.$id.coach/route.tsx +++ b/app/routes/_dashboard.individuals.$id.coach/route.tsx @@ -31,7 +31,7 @@ export default function IndividualCoach() { ); const user = useUser(); - let id = idParam == "me" ? user.individual_id.toString() : idParam; + const id = idParam == "me" ? user.individual_id.toString() : idParam; const { data, loading, error } = useCoachIndividualQuery({ variables: { id: id }, diff --git a/app/routes/_dashboard.individuals.$id.edit/route.tsx b/app/routes/_dashboard.individuals.$id.edit/route.tsx index 9b15ebd..b273e1d 100644 --- a/app/routes/_dashboard.individuals.$id.edit/route.tsx +++ b/app/routes/_dashboard.individuals.$id.edit/route.tsx @@ -50,7 +50,7 @@ export default function IndividualEdit() { fullname: m?.fullname, })); - var onSubmit = function () { + const onSubmit = function () { updateMethod({ variables: { input: { diff --git a/app/routes/_dashboard.individuals.($id).activities/components/AnalyzeButton/AnalyzeButton.tsx b/app/routes/_dashboard.individuals.($id).activities/components/AnalyzeButton/AnalyzeButton.tsx index 7a75219..625d493 100644 --- a/app/routes/_dashboard.individuals.($id).activities/components/AnalyzeButton/AnalyzeButton.tsx +++ b/app/routes/_dashboard.individuals.($id).activities/components/AnalyzeButton/AnalyzeButton.tsx @@ -13,7 +13,7 @@ export function AnalyzeButton({ const [isSaving, setIsSaving] = useState(false); const [analyzeActivityMethod] = useAnalyzeActivityWithMinimumResultMutation(); - var onAnalyzeAndSave = function () { + const onAnalyzeAndSave = function () { setIsSaving(true); analyzeActivityMethod({ variables: { diff --git a/app/routes/_dashboard.individuals.($id).activities/route.tsx b/app/routes/_dashboard.individuals.($id).activities/route.tsx index 2ac107d..f29b32e 100644 --- a/app/routes/_dashboard.individuals.($id).activities/route.tsx +++ b/app/routes/_dashboard.individuals.($id).activities/route.tsx @@ -17,9 +17,10 @@ import { Tab, Tabs, TabsHeader, - Select, Option, + Select, } from "@material-tailwind/react"; + import { Link, useParams, useLocation, useNavigate } from "@remix-run/react"; import { useState } from "react"; @@ -44,7 +45,7 @@ const TABS: { label: string; value: FilterType }[] = [ const TABLE_HEAD = ["Activity", "Analyzed?", "Date", "Cycle", ""]; export default function Activities() { - let { id: individualId } = useParams(); + const { id: individualId } = useParams(); if (individualId == null) throw new Error("id is null"); const [filter, setFilter] = useState("all"); diff --git a/app/routes/_dashboard.individuals.($id).new/route.tsx b/app/routes/_dashboard.individuals.($id).new/route.tsx index 51a7d4d..ef61734 100644 --- a/app/routes/_dashboard.individuals.($id).new/route.tsx +++ b/app/routes/_dashboard.individuals.($id).new/route.tsx @@ -40,7 +40,7 @@ export default function IndividualCreate() { fullname: manager.fullname, })); - var onSubmit = function () { + const onSubmit = function () { createMethod({ variables: { input: { diff --git a/app/routes/_dashboard.organizations.$id.edit/route.tsx b/app/routes/_dashboard.organizations.$id.edit/route.tsx index 39ac614..f17a1de 100644 --- a/app/routes/_dashboard.organizations.$id.edit/route.tsx +++ b/app/routes/_dashboard.organizations.$id.edit/route.tsx @@ -42,7 +42,7 @@ export default function OrganizationEdit() { if (error) return

{JSON.stringify(error)}

; if (!organization || !data) return

No data

; - var onSubmit = function () { + const onSubmit = function () { updateMethod({ variables: { input: { diff --git a/app/routes/_dashboard.tsx b/app/routes/_dashboard.tsx index 6c17c2c..e79e3a4 100644 --- a/app/routes/_dashboard.tsx +++ b/app/routes/_dashboard.tsx @@ -7,7 +7,7 @@ import { LoaderFunctionArgs, redirect } from "@remix-run/node"; import { authenticator } from "~/services/auth.server"; export async function loader({ request }: LoaderFunctionArgs) { - let user = await authenticator.isAuthenticated(request); + const user = await authenticator.isAuthenticated(request); if (!user && request.url.indexOf("/signin") == -1) return redirect("/signin"); //TODO: any danger of infinite loop? return {}; diff --git a/app/routes/_dashboard.visions.$id.edit/route.tsx b/app/routes/_dashboard.visions.$id.edit/route.tsx index 2224447..b53822e 100644 --- a/app/routes/_dashboard.visions.$id.edit/route.tsx +++ b/app/routes/_dashboard.visions.$id.edit/route.tsx @@ -54,7 +54,7 @@ export default function VisionEdit() { to: new Date(cycle.to), })); - var onSubmit = function () { + const onSubmit = function () { updateMethod({ variables: { input: { @@ -101,11 +101,11 @@ function getEditData( | null | undefined, ): VisionEditFormData | null { - if (!data) { + if (!data || !data.vision) { return null; } - const { visionType: _, individual: __, ...visionData } = data?.vision; + const { visionType: _, individual: __, ...visionData } = data.vision; return getPureObject(visionData); } diff --git a/app/routes/_dashboard.visions._index/components/FetchContentButton/FetchContentButton.tsx b/app/routes/_dashboard.visions._index/components/FetchContentButton/FetchContentButton.tsx index 4985720..4145d88 100644 --- a/app/routes/_dashboard.visions._index/components/FetchContentButton/FetchContentButton.tsx +++ b/app/routes/_dashboard.visions._index/components/FetchContentButton/FetchContentButton.tsx @@ -7,7 +7,7 @@ export function FetchContentButton({ visionId }: { visionId: string }) { const [isSaving, setIsSaving] = useState(false); const [analyzeActivityMethod] = useAnalyzeActivityWithMinimumResultMutation(); - var onAnalyzeAndSave = function () { + const onAnalyzeAndSave = function () { setIsSaving(true); analyzeActivityMethod({ variables: { diff --git a/app/routes/_dashboard.visions._index/route.tsx b/app/routes/_dashboard.visions._index/route.tsx index ee47541..384ba21 100644 --- a/app/routes/_dashboard.visions._index/route.tsx +++ b/app/routes/_dashboard.visions._index/route.tsx @@ -56,7 +56,7 @@ const ORG_TABLE_HEAD_ORGANIZATIONAL = [ ]; export default function Visions() { - let { id: individualId } = useParams(); + const { id: individualId } = useParams(); const [filter, setFilter] = useState("all"); diff --git a/app/routes/_dashboard.visions.new/route.tsx b/app/routes/_dashboard.visions.new/route.tsx index 17c215d..23a4df2 100644 --- a/app/routes/_dashboard.visions.new/route.tsx +++ b/app/routes/_dashboard.visions.new/route.tsx @@ -50,7 +50,7 @@ export default function VisionCreate() { to: new Date(cycle.to), })); - var onSubmit = function () { + const onSubmit = function () { const validityRange = vision.cycleId != null ? { validFrom: null, validTo: null } : {}; createMethod({ diff --git a/app/routes/_site._index.tsx b/app/routes/_site._index.tsx index 62153f9..ab8645e 100644 --- a/app/routes/_site._index.tsx +++ b/app/routes/_site._index.tsx @@ -74,14 +74,14 @@ export function Home() { Working with us is a pleasure
- Don't let your uses guess by attaching tooltips and popoves to - any element. Just make sure you enable them first via + Don't let your uses guess by attaching tooltips and popoves + to any element. Just make sure you enable them first via JavaScript.

The kit comes with three pre-built pages to help you get started - faster. You can change the text and images and you're good to - go. Just make sure you enable them first via JavaScript. + faster. You can change the text and images and you're good + to go. Just make sure you enable them first via JavaScript.
diff --git a/app/routes/logout.tsx b/app/routes/logout.tsx index bba09b5..845a2a3 100644 --- a/app/routes/logout.tsx +++ b/app/routes/logout.tsx @@ -1,5 +1,5 @@ import type { LoaderFunctionArgs } from "@remix-run/node"; import { authenticator } from "~/services/auth.server"; -export let loader = async ({ request }: LoaderFunctionArgs) => +export const loader = async ({ request }: LoaderFunctionArgs) => await authenticator.logout(request, { redirectTo: "/" }); diff --git a/app/services/auth.server.ts b/app/services/auth.server.ts index 10ebab8..8011a66 100644 --- a/app/services/auth.server.ts +++ b/app/services/auth.server.ts @@ -7,7 +7,7 @@ import { googleSignUpStrategy } from "./auth.strategies/google.signup"; // Create an instance of the authenticator, pass a generic with what // strategies will return and will store in the session -export let authenticator = new Authenticator(sessionStorage, { +export const authenticator = new Authenticator(sessionStorage, { sessionKey: "accessToken", }); diff --git a/app/services/session.server.ts b/app/services/session.server.ts index a062ac2..bce2d21 100644 --- a/app/services/session.server.ts +++ b/app/services/session.server.ts @@ -3,7 +3,7 @@ import { createCookieSessionStorage } from "@remix-run/node"; import "dotenv/config"; // export the whole sessionStorage object -export let sessionStorage = createCookieSessionStorage({ +export const sessionStorage = createCookieSessionStorage({ cookie: { name: "_session", // use any name you want here sameSite: "lax", // this helps with CSRF @@ -15,4 +15,4 @@ export let sessionStorage = createCookieSessionStorage({ }); // you can also export the methods individually for your own usage -export let { getSession, commitSession, destroySession } = sessionStorage; +export const { getSession, commitSession, destroySession } = sessionStorage; diff --git a/app/utils/graphql.ts b/app/utils/graphql.ts index 819f59f..5594d04 100644 --- a/app/utils/graphql.ts +++ b/app/utils/graphql.ts @@ -1,4 +1,8 @@ -import { ApolloClient, InMemoryCache, createHttpLink } from "@apollo/client"; +import { + ApolloClient, + InMemoryCache, + createHttpLink, +} from "@apollo/client/index.js"; //NOTE! This function will be called on both client and server side. export function getApolloClient( diff --git a/app/widgets/layout/dashboard-sidenav.tsx b/app/widgets/layout/dashboard-sidenav.tsx index 16fc9c1..4d647ec 100644 --- a/app/widgets/layout/dashboard-sidenav.tsx +++ b/app/widgets/layout/dashboard-sidenav.tsx @@ -7,7 +7,6 @@ import { useNavigate } from "@remix-run/react"; import { useSettingsContext } from "~/contexts/settings/settingsContext"; export function Sidenav({ - brandImg, brandName, routes, }: { @@ -50,7 +49,7 @@ export function Sidenav({
- {routes.map(({ layout, title, pages }, key) => ( + {routes.map(({ title, pages }, key) => (
    {title && (
  • diff --git a/app/widgets/layout/dashboard-top-navbar.tsx b/app/widgets/layout/dashboard-top-navbar.tsx index 4f46e6e..a7012db 100644 --- a/app/widgets/layout/dashboard-top-navbar.tsx +++ b/app/widgets/layout/dashboard-top-navbar.tsx @@ -172,7 +172,7 @@ export function DashboardTopNavbar() { */} - {}}> + null}>
diff --git a/app/widgets/layout/footer.tsx b/app/widgets/layout/footer.tsx index 4678a00..3523fc0 100644 --- a/app/widgets/layout/footer.tsx +++ b/app/widgets/layout/footer.tsx @@ -2,15 +2,16 @@ import PropTypes from "prop-types"; // import { Typography } from "@material-tailwind/react"; // import { HeartIcon } from "@heroicons/react/24/solid"; -export function Footer({ - brandName, - brandLink, - routes, -}: { - brandName: string; - brandLink: string; - routes: { name: string; path: string }[]; -}) { +// props: { +// brandName: string; +// brandLink: string; +// routes: { +// name: string; +// path: string; +// } +// []; +// } +export function Footer() { // const year = new Date().getFullYear(); return ( diff --git a/remix.env.d.ts b/env.d.ts similarity index 77% rename from remix.env.d.ts rename to env.d.ts index 3bd0dd4..3338024 100644 --- a/remix.env.d.ts +++ b/env.d.ts @@ -1,4 +1,4 @@ -/// +/// /// interface Window { diff --git a/graphql.codegen.ts b/graphql.codegen.ts index 3282608..d026672 100644 --- a/graphql.codegen.ts +++ b/graphql.codegen.ts @@ -15,10 +15,12 @@ const config: CodegenConfig = { plugins: [ "typescript", "typescript-operations", - "typescript-react-apollo", + "typescript-react-apollo", //help on this plugin: https://the-guild.dev/graphql/codegen/plugins/typescript/typescript-react-apollo ], config: { withHooks: true, + // useTypeImports: true, + // emitLegacyCommonJSImports: true, }, }, }, diff --git a/package.json b/package.json index f55bfda..0e13dc5 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "private": true, "sideEffects": false, + "type": "module", "scripts": { - "build": "remix build", - "dev": "PORT=4000 remix dev", - "start": "PORT=5000 remix-serve ./build/index.js", + "build": "remix vite:build", + "dev": "remix vite:dev", + "start": "PORT=5000 remix-serve ./build/server/index.js", "typecheck": "tsc", "graphql": "graphql-codegen --config graphql.codegen.ts", - "lint": "eslint .", + "lint": "eslint --quiet --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", "test": "vitest", "pr": "sh scripts/pr.sh" }, @@ -47,11 +48,13 @@ "@testing-library/react": "^14.2.1", "@types/react": "18.2.42", "@types/react-dom": "^18.2.19", + "autoprefixer": "^10.4.19", "eslint": "^8.57.0", "jsdom": "^24.0.0", + "postcss": "^8.4.38", "prettier": "^3.2.5", - "prettier-plugin-tailwindcss": "^0.5.11", - "tailwindcss": "^3.4.1", + "prettier-plugin-tailwindcss": "^0.5.14", + "tailwindcss": "^3.4.3", "typescript": "^5.3.3", "vite": "^5.2.9", "vite-tsconfig-paths": "^4.3.2", diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..2e7af2b --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/tailwind.config.ts b/tailwind.config.ts index feec0cf..eeb0bef 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,5 +1,5 @@ import type { Config } from "tailwindcss"; -const withMT = require("@material-tailwind/react/utils/withMT"); +import withMT from "@material-tailwind/react/utils/withMT"; module.exports = withMT({ content: [ diff --git a/tsconfig.json b/tsconfig.json index 86c455b..dbd4898 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,22 @@ { - "include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"], - + "include": [ + "env.d.ts", + "**/*.ts", + "**/*.tsx", + "**/.server/**/*.ts", + "**/.server/**/*.tsx", + "**/.client/**/*.ts", + "**/.client/**/*.tsx" + ], "compilerOptions": { - "lib": ["DOM", "DOM.Iterable", "ES2019"], + "lib": ["DOM", "DOM.Iterable", "ES2022"], "isolatedModules": true, "esModuleInterop": true, "jsx": "react-jsx", - "moduleResolution": "node", + "module": "ESNext", + "moduleResolution": "Bundler", "resolveJsonModule": true, - "target": "ES2019", + "target": "ES2022", "strict": true, "allowJs": true, "forceConsistentCasingInFileNames": true, @@ -18,7 +26,7 @@ "~/*": ["./app/*"] }, "typeRoots": ["node_modules/@types", "./node_modules"], - "types": ["vitest/globals"], + "types": ["@remix-run/node", "vite/client", "vitest/globals"], "skipLibCheck": true, //becuase we have types in app/@types, we cannot exlude the node_modules folder. having this skip "*.d.ts" files. // Remix takes care of building everything in `remix build`. diff --git a/vite.config.ts b/vite.config.ts index df24d47..3994cbe 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,8 +1,15 @@ +import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; +import { installGlobals } from "@remix-run/node"; + +installGlobals(); const viteConfig = defineConfig({ - plugins: [tsconfigPaths()], + plugins: [remix(), tsconfigPaths()], + server: { + port: 4000, + }, }); export default viteConfig; diff --git a/yarn.lock b/yarn.lock index 79d234c..2d0d2a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2037,9 +2037,9 @@ integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== "@humanwhocodes/object-schema@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917" - integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw== + version "2.0.3" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== "@isaacs/cliui@^8.0.2": version "8.0.2" @@ -3514,6 +3514,18 @@ auto-bind@~4.0.0: resolved "https://registry.npmjs.org/auto-bind/-/auto-bind-4.0.0.tgz" integrity sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ== +autoprefixer@^10.4.19: + version "10.4.19" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.19.tgz#ad25a856e82ee9d7898c59583c1afeb3fa65f89f" + integrity sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew== + dependencies: + browserslist "^4.23.0" + caniuse-lite "^1.0.30001599" + fraction.js "^4.3.7" + normalize-range "^0.1.2" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" @@ -3671,6 +3683,16 @@ browserslist@^4.21.9: node-releases "^2.0.13" update-browserslist-db "^1.0.11" +browserslist@^4.23.0: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== + dependencies: + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + bser@2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz" @@ -3779,6 +3801,11 @@ caniuse-lite@^1.0.30001517: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001520.tgz" integrity sha512-tahF5O9EiiTzwTUqAeFjIZbn4Dnqxzz7ktrgGlMYNLH43Ul26IgTMH/zvL3DG0lZxBYnlT04axvInszUsZULdA== +caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599: + version "1.0.30001611" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001611.tgz#4dbe78935b65851c2d2df1868af39f709a93a96e" + integrity sha512-19NuN1/3PjA3QI8Eki55N8my4LzfkMCRLgCVfrl/slbSAchQfV0+GwjPrK3rq37As4UCLlM/DHajbKkAqbv92Q== + capital-case@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz" @@ -4402,7 +4429,7 @@ doctrine@^2.1.0: doctrine@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" @@ -4475,6 +4502,11 @@ electron-to-chromium@^1.4.477: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.490.tgz" integrity sha512-6s7NVJz+sATdYnIwhdshx/N/9O6rvMxmhVoDSDFdj6iA45gHR8EQje70+RYsF4GeB+k0IeNSBnP7yG9ZXJFr7A== +electron-to-chromium@^1.4.668: + version "1.4.743" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.743.tgz#69a8cbaa72946b8c320e131e7bb8c2df86a6687a" + integrity sha512-AYgFmGUanfwZd4QmlGl9KBjoHRvJi6FUnbmfSr6NUk2JKCdHRHpljFGgxLp7L5h0p7uANrLzv0OgHo4TaCk4gA== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" @@ -4918,7 +4950,7 @@ eslint-scope@5.1.1, eslint-scope@^5.1.1: eslint-scope@^7.2.2: version "7.2.2" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" @@ -4992,7 +5024,7 @@ eslint@^8.57.0: espree@^9.6.0, espree@^9.6.1: version "9.6.1" - resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: acorn "^8.9.0" @@ -5297,7 +5329,7 @@ figures@^3.0.0: file-entry-cache@^6.0.1: version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: flat-cache "^3.0.4" @@ -5344,17 +5376,18 @@ find-up@^5.0.0: path-exists "^4.0.0" flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== dependencies: - flatted "^3.1.0" + flatted "^3.2.9" + keyv "^4.5.3" rimraf "^3.0.2" -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== for-each@^0.3.3: version "0.3.3" @@ -5390,6 +5423,11 @@ forwarded@0.2.0: resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== +fraction.js@^4.3.7: + version "4.3.7" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7" + integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== + framer-motion@6.5.1: version "6.5.1" resolved "https://registry.npmjs.org/framer-motion/-/framer-motion-6.5.1.tgz" @@ -5596,9 +5634,9 @@ globals@^11.1.0: integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.19.0: - version "13.21.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz" - integrity sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg== + version "13.24.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" @@ -6372,7 +6410,7 @@ jiti@^1.17.1, jiti@^1.18.2: resolved "https://registry.npmjs.org/jiti/-/jiti-1.19.1.tgz" integrity sha512-oVhqoRDaBXf7sjkll95LHVS6Myyyb1zaunVwk4Z0+WPSW4gjS0pl01zYKHScTuyEhQsFxV5L4DR5r+YqSyqyyg== -jiti@^1.19.1: +jiti@^1.21.0: version "1.21.0" resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d" integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q== @@ -6436,6 +6474,11 @@ jsesc@^2.5.1: resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" @@ -6512,6 +6555,13 @@ jsonify@^0.0.1: object.assign "^4.1.4" object.values "^1.1.6" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kleur@^4.0.3: version "4.1.5" resolved "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz" @@ -7435,6 +7485,11 @@ node-releases@^2.0.13: resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + normalize-package-data@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz" @@ -7457,6 +7512,11 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== + npm-install-checks@^6.0.0: version "6.3.0" resolved "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz" @@ -8039,7 +8099,7 @@ postcss-selector-parser@^6.0.11, postcss-selector-parser@^6.0.2, postcss-selecto cssesc "^3.0.0" util-deprecate "^1.0.2" -postcss-value-parser@^4.0.0, postcss-value-parser@^4.1.0: +postcss-value-parser@^4.0.0, postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== @@ -8076,10 +8136,10 @@ prelude-ls@^1.2.1: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier-plugin-tailwindcss@^0.5.11: - version "0.5.11" - resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.11.tgz#1aa9308c3285b3cb7942aaeaec8d0e0775ac54d0" - integrity sha512-AvI/DNyMctyyxGOjyePgi/gqj5hJYClZ1avtQvLlqMT3uDZkRbi4HhGUpok3DRzv9z7Lti85Kdj3s3/1CeNI0w== +prettier-plugin-tailwindcss@^0.5.14: + version "0.5.14" + resolved "https://registry.yarnpkg.com/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.14.tgz#4482eed357d5e22eac259541c70aca5a4c7b9d5c" + integrity sha512-Puaz+wPUAhFp8Lo9HuciYKM2Y2XExESjeT+9NQoVFXZsPPnc9VYss2SpxdQ6vbatmt8/4+SN0oe0I1cPDABg9Q== prettier@^2.7.1: version "2.8.8" @@ -8586,7 +8646,7 @@ rfdc@^1.3.0: rimraf@^3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" @@ -9207,10 +9267,10 @@ tailwind-merge@1.8.1: resolved "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.8.1.tgz" integrity sha512-+fflfPxvHFr81hTJpQ3MIwtqgvefHZFUHFiIHpVIRXvG/nX9+gu2P7JNlFu2bfDMJ+uHhi/pUgzaYacMoXv+Ww== -tailwindcss@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.1.tgz#f512ca5d1dd4c9503c7d3d28a968f1ad8f5c839d" - integrity sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA== +tailwindcss@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.3.tgz#be48f5283df77dfced705451319a5dffb8621519" + integrity sha512-U7sxQk/n397Bmx4JHbJx/iSOOv5G+II3f1kpLpY2QeUv5DcPdcTsYLlusZfq1NthHS1c1cZoyFmmkex1rzke0A== dependencies: "@alloc/quick-lru" "^5.2.0" arg "^5.0.2" @@ -9220,7 +9280,7 @@ tailwindcss@^3.4.1: fast-glob "^3.3.0" glob-parent "^6.0.2" is-glob "^4.0.3" - jiti "^1.19.1" + jiti "^1.21.0" lilconfig "^2.1.0" micromatch "^4.0.5" normalize-path "^3.0.0" @@ -9478,7 +9538,7 @@ type-detect@^4.0.0, type-detect@^4.0.8: type-fest@^0.20.2: version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== type-fest@^0.21.3: @@ -9683,6 +9743,14 @@ update-browserslist-db@^1.0.11: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + upper-case-first@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz" From 20bf34031ce363c05ea10aedfd16e4d11c1d2957 Mon Sep 17 00:00:00 2001 From: Mahmoud Moravej Date: Fri, 19 Apr 2024 13:26:26 -0400 Subject: [PATCH 2/7] fix material-ui imports --- app/components/ActivityForm.tsx | 5 +- .../AssignMissedActivitiesButton.tsx | 4 +- app/components/CycleForm.tsx | 13 +-- app/components/DatePickerInput.tsx | 9 +- app/components/DefaultSkeleton.tsx | 3 +- app/components/IndividualForm.tsx | 6 +- app/components/OrganizationForm.tsx | 4 +- app/components/VisionForm.tsx | 12 +-- app/routes/_auth.signin.($id).tsx | 5 +- app/routes/_auth.signup.($id).tsx | 4 +- .../_dashboard.activities.$id.edit/route.tsx | 4 +- .../_dashboard.cycles.$id.edit/route.tsx | 5 +- app/routes/_dashboard.cycles._index/route.tsx | 6 +- app/routes/_dashboard.cycles.new/route.tsx | 4 +- .../GenerateCycleSummaryButton.tsx | 4 +- .../route.tsx | 6 +- .../_dashboard.individuals.$id.edit/route.tsx | 4 +- .../AnalyzeButton/AnalyzeButton.tsx | 8 +- .../components/ImportModal/ImportModal.tsx | 39 ++++----- .../route.tsx | 85 +++++++++---------- .../route.tsx | 5 +- .../route.tsx | 6 +- .../route.tsx | 4 +- .../_dashboard.visions.$id.edit/route.tsx | 4 +- .../FetchContentButton/FetchContentButton.tsx | 5 +- .../_dashboard.visions._index/route.tsx | 7 +- app/routes/_dashboard.visions.new/route.tsx | 4 +- app/routes/_site._index.tsx | 7 +- app/widgets/cards/feature-card.tsx | 9 +- app/widgets/cards/team-card.tsx | 4 +- app/widgets/layout/dashboard-sidenav.tsx | 3 +- app/widgets/layout/dashboard-top-navbar.tsx | 6 +- app/widgets/layout/firstpage-footer.tsx | 4 +- app/widgets/layout/page-title.tsx | 4 +- app/widgets/layout/site-navbar.tsx | 11 +-- 35 files changed, 172 insertions(+), 141 deletions(-) diff --git a/app/components/ActivityForm.tsx b/app/components/ActivityForm.tsx index 7f5bcdf..b796af2 100644 --- a/app/components/ActivityForm.tsx +++ b/app/components/ActivityForm.tsx @@ -1,5 +1,8 @@ import { Form } from "@remix-run/react"; -import { Button, Typography, Textarea } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Button, Typography, Textarea } = material; + import { BoltIcon } from "@heroicons/react/24/solid"; import { ActivityUpdate } from "@app-types/graphql"; diff --git a/app/components/AssignMissedActivitiesButton/AssignMissedActivitiesButton.tsx b/app/components/AssignMissedActivitiesButton/AssignMissedActivitiesButton.tsx index 4165eb4..9d96281 100644 --- a/app/components/AssignMissedActivitiesButton/AssignMissedActivitiesButton.tsx +++ b/app/components/AssignMissedActivitiesButton/AssignMissedActivitiesButton.tsx @@ -1,6 +1,8 @@ import { useAssignActivitiesMutation } from "@app-types/graphql"; import { BoltIcon } from "@heroicons/react/24/solid"; -import { Tooltip, IconButton, Spinner, Button } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Tooltip, IconButton, Spinner, Button } = material; import { useState } from "react"; diff --git a/app/components/CycleForm.tsx b/app/components/CycleForm.tsx index d19d54b..2325213 100644 --- a/app/components/CycleForm.tsx +++ b/app/components/CycleForm.tsx @@ -1,13 +1,8 @@ import { Form, Link } from "@remix-run/react"; -import { - Input, - Button, - Typography, - Card, - CardBody, - CardFooter, - Textarea, -} from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Input, Button, Typography, Card, CardBody, CardFooter, Textarea } = + material; import { CycleUpdate } from "@app-types/graphql"; import DatePickerInput from "./DatePickerInput"; diff --git a/app/components/DatePickerInput.tsx b/app/components/DatePickerInput.tsx index 5f13dac..d4d8aaf 100644 --- a/app/components/DatePickerInput.tsx +++ b/app/components/DatePickerInput.tsx @@ -1,12 +1,9 @@ // https://www.material-tailwind.com/docs/react/plugins/date-picker import { ChevronLeftIcon, ChevronRightIcon } from "@heroicons/react/24/solid"; -import { - Popover, - PopoverHandler, - Input, - PopoverContent, -} from "@material-tailwind/react"; +import { default as material } from "@material-tailwind/react"; +const { Popover, PopoverHandler, Input, PopoverContent } = material; + import { DayPicker } from "react-day-picker"; import { format } from "date-fns"; import { size } from "@material-tailwind/react/types/components/input"; diff --git a/app/components/DefaultSkeleton.tsx b/app/components/DefaultSkeleton.tsx index 2e900c2..b342ca9 100644 --- a/app/components/DefaultSkeleton.tsx +++ b/app/components/DefaultSkeleton.tsx @@ -1,4 +1,5 @@ -import { Typography } from "@material-tailwind/react"; +import { default as material } from "@material-tailwind/react"; +const { Typography } = material; export function DefaultSkeleton() { return ( diff --git a/app/components/IndividualForm.tsx b/app/components/IndividualForm.tsx index a6219ea..3d4c3bf 100644 --- a/app/components/IndividualForm.tsx +++ b/app/components/IndividualForm.tsx @@ -1,5 +1,7 @@ import { Form, Link } from "@remix-run/react"; -import { + +import { default as material } from "@material-tailwind/react"; +const { Input, Button, Typography, @@ -9,7 +11,7 @@ import { Card, CardBody, CardFooter, -} from "@material-tailwind/react"; +} = material; import { IndividualUpdate } from "@app-types/graphql"; import { useUser } from "~/contexts"; diff --git a/app/components/OrganizationForm.tsx b/app/components/OrganizationForm.tsx index 937f780..7445126 100644 --- a/app/components/OrganizationForm.tsx +++ b/app/components/OrganizationForm.tsx @@ -1,5 +1,7 @@ import { Form } from "@remix-run/react"; -import { Radio } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Radio } = material; import { OrganizationUpdate } from "@app-types/graphql"; import { ChangeEventHandler } from "react"; diff --git a/app/components/VisionForm.tsx b/app/components/VisionForm.tsx index 0810b9b..6d6a130 100644 --- a/app/components/VisionForm.tsx +++ b/app/components/VisionForm.tsx @@ -1,13 +1,7 @@ import { Form } from "@remix-run/react"; -import { - Input, - Button, - Typography, - Textarea, - Select, - Option, - Switch, -} from "@material-tailwind/react"; +import { default as material } from "@material-tailwind/react"; +const { Input, Button, Typography, Textarea, Select, Option, Switch } = + material; import { VisionUpdate } from "@app-types/graphql"; import DatePickerInput from "./DatePickerInput"; diff --git a/app/routes/_auth.signin.($id).tsx b/app/routes/_auth.signin.($id).tsx index 6e70cc8..bccc6c9 100644 --- a/app/routes/_auth.signin.($id).tsx +++ b/app/routes/_auth.signin.($id).tsx @@ -1,5 +1,8 @@ import { Form, useLoaderData } from "@remix-run/react"; -import { Alert, Button, Typography } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Alert, Button, Typography } = material; + import { Link } from "react-router-dom"; import { LoaderFunctionArgs, json } from "@remix-run/node"; diff --git a/app/routes/_auth.signup.($id).tsx b/app/routes/_auth.signup.($id).tsx index d444fbd..632264f 100644 --- a/app/routes/_auth.signup.($id).tsx +++ b/app/routes/_auth.signup.($id).tsx @@ -1,6 +1,8 @@ import { Form, useLoaderData } from "@remix-run/react"; -import { Alert, Button, Typography } from "@material-tailwind/react"; +import { default as material } from "@material-tailwind/react"; +const { Alert, Button, Typography } = material; + import { Link } from "react-router-dom"; import cookie from "cookie"; diff --git a/app/routes/_dashboard.activities.$id.edit/route.tsx b/app/routes/_dashboard.activities.$id.edit/route.tsx index 1131a43..38b2756 100644 --- a/app/routes/_dashboard.activities.$id.edit/route.tsx +++ b/app/routes/_dashboard.activities.$id.edit/route.tsx @@ -1,6 +1,8 @@ import { useParams } from "@remix-run/react"; import { useEffect, useState } from "react"; -import { Card, Typography } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Card, Typography } = material; import { FindActivityQuery, diff --git a/app/routes/_dashboard.cycles.$id.edit/route.tsx b/app/routes/_dashboard.cycles.$id.edit/route.tsx index 8a82f79..9768eb4 100644 --- a/app/routes/_dashboard.cycles.$id.edit/route.tsx +++ b/app/routes/_dashboard.cycles.$id.edit/route.tsx @@ -1,6 +1,8 @@ import { useParams } from "@remix-run/react"; import { useEffect, useState } from "react"; -import { Card, Typography } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Card, Typography } = material; import { CycleUpdate, @@ -9,6 +11,7 @@ import { useFindCycleQuery, useUpdateCycleMutation, } from "@app-types/graphql"; + import { CycleForm, CycleFormData } from "~/components/CycleForm"; import { getPureObject } from "~/utils"; diff --git a/app/routes/_dashboard.cycles._index/route.tsx b/app/routes/_dashboard.cycles._index/route.tsx index a29331d..457fae6 100644 --- a/app/routes/_dashboard.cycles._index/route.tsx +++ b/app/routes/_dashboard.cycles._index/route.tsx @@ -1,7 +1,9 @@ import { useCyclesQuery } from "@app-types/graphql"; import { MagnifyingGlassIcon } from "@heroicons/react/24/outline"; import { UserPlusIcon } from "@heroicons/react/24/solid"; -import { + +import { default as material } from "@material-tailwind/react"; +const { Card, CardHeader, Input, @@ -10,7 +12,7 @@ import { CardBody, CardFooter, Spinner, -} from "@material-tailwind/react"; +} = material; import { Link } from "@remix-run/react"; import { noNull } from "~/utils"; diff --git a/app/routes/_dashboard.cycles.new/route.tsx b/app/routes/_dashboard.cycles.new/route.tsx index b8ae5d6..19b6410 100644 --- a/app/routes/_dashboard.cycles.new/route.tsx +++ b/app/routes/_dashboard.cycles.new/route.tsx @@ -1,6 +1,8 @@ import { useNavigate } from "@remix-run/react"; import { useState } from "react"; -import { Card, Typography } from "@material-tailwind/react"; +import { default as material } from "@material-tailwind/react"; +const { Card, Typography } = material; + import { useCreateCycleMutation } from "@app-types/graphql"; import { CycleForm, CycleFormData } from "~/components/CycleForm"; diff --git a/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx b/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx index a4080db..bdf1caf 100644 --- a/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx +++ b/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx @@ -3,7 +3,9 @@ import { useGenerateCycleAdviceMutation, } from "@app-types/graphql"; import { LightBulbIcon } from "@heroicons/react/24/outline"; -import { Spinner, Button } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Spinner, Button } = material; import { useState } from "react"; diff --git a/app/routes/_dashboard.individuals.$id.coach/route.tsx b/app/routes/_dashboard.individuals.$id.coach/route.tsx index 3f5192e..8872369 100644 --- a/app/routes/_dashboard.individuals.$id.coach/route.tsx +++ b/app/routes/_dashboard.individuals.$id.coach/route.tsx @@ -1,5 +1,7 @@ import { Link, useParams } from "@remix-run/react"; -import { + +import { default as material } from "@material-tailwind/react"; +const { Accordion, AccordionBody, AccordionHeader, @@ -8,7 +10,7 @@ import { Spinner, Tooltip, Typography, -} from "@material-tailwind/react"; +} = material; import { AdviceFragmentFragment, diff --git a/app/routes/_dashboard.individuals.$id.edit/route.tsx b/app/routes/_dashboard.individuals.$id.edit/route.tsx index b273e1d..34c1c77 100644 --- a/app/routes/_dashboard.individuals.$id.edit/route.tsx +++ b/app/routes/_dashboard.individuals.$id.edit/route.tsx @@ -1,6 +1,8 @@ import { useParams } from "@remix-run/react"; import { useEffect, useState } from "react"; -import { Card, Typography } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Card, Typography } = material; import { FindIndividualQuery, diff --git a/app/routes/_dashboard.individuals.($id).activities/components/AnalyzeButton/AnalyzeButton.tsx b/app/routes/_dashboard.individuals.($id).activities/components/AnalyzeButton/AnalyzeButton.tsx index 625d493..bff98cc 100644 --- a/app/routes/_dashboard.individuals.($id).activities/components/AnalyzeButton/AnalyzeButton.tsx +++ b/app/routes/_dashboard.individuals.($id).activities/components/AnalyzeButton/AnalyzeButton.tsx @@ -1,6 +1,6 @@ import { useAnalyzeActivityWithMinimumResultMutation } from "@app-types/graphql"; import { BoltIcon } from "@heroicons/react/24/solid"; -import { Tooltip, IconButton, Spinner } from "@material-tailwind/react"; +import { Tooltip, IconButton, CircularProgress } from "@mui/material"; import { useState } from "react"; export function AnalyzeButton({ @@ -38,10 +38,10 @@ export function AnalyzeButton({ return isAnalyzed ? ( "" ) : ( - - + + {isSaving ? ( - + ) : ( )} diff --git a/app/routes/_dashboard.individuals.($id).activities/components/ImportModal/ImportModal.tsx b/app/routes/_dashboard.individuals.($id).activities/components/ImportModal/ImportModal.tsx index 0132354..590d7ae 100644 --- a/app/routes/_dashboard.individuals.($id).activities/components/ImportModal/ImportModal.tsx +++ b/app/routes/_dashboard.individuals.($id).activities/components/ImportModal/ImportModal.tsx @@ -1,12 +1,12 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { Button, Dialog, - DialogHeader, - DialogBody, - DialogFooter, - Spinner, -} from "@material-tailwind/react"; + CircularProgress, + DialogTitle, + DialogContent, + DialogActions, +} from "@mui/material"; import { useImportActivitiesMutation } from "@app-types/graphql"; export interface ImportModalProps { @@ -46,14 +46,9 @@ export function ImportModal({ return ( <> - - Import Activities - + + Import Activities + Activities are getting imported every 5 minutes. But, if you want to sync them manually, you can do it here. This will try to import the following activities: @@ -65,29 +60,29 @@ export function ImportModal({
  • Recorded meetings from Google Meet
  • etc...
  • -
    - + + - +
    ); diff --git a/app/routes/_dashboard.individuals.($id).activities/route.tsx b/app/routes/_dashboard.individuals.($id).activities/route.tsx index f29b32e..225356a 100644 --- a/app/routes/_dashboard.individuals.($id).activities/route.tsx +++ b/app/routes/_dashboard.individuals.($id).activities/route.tsx @@ -8,18 +8,18 @@ import { CardHeader, Typography, Button, - CardBody, + CardContent, Chip, - CardFooter, + CardActions, IconButton, Tooltip, - Spinner, + CircularProgress, Tab, Tabs, - TabsHeader, - Option, + ListItem, Select, -} from "@material-tailwind/react"; + SelectChangeEvent, +} from "@mui/material"; import { Link, useParams, useLocation, useNavigate } from "@remix-run/react"; import { useState } from "react"; @@ -69,7 +69,7 @@ export default function Activities() { if (error) return

    {JSON.stringify(error)}

    ; if (loading || data?.activities?.nodes == null) - return ; + return ; const pageTitle = `${data?.individual.fullname ?? ""}'s activities`; @@ -105,8 +105,8 @@ export default function Activities() { /> ); - const handle_cycle_change = (value: string | undefined) => { - value = value ?? "0"; + const handle_cycle_change = (event: SelectChangeEvent) => { + const value = event.target.value ?? "0"; setSelectedCycle(parseInt(value)); if (value == "0") queryParams.delete("cycleid"); @@ -131,7 +131,7 @@ export default function Activities() {
    - + @@ -193,7 +190,7 @@ export default function Activities() { className="border-y border-blue-gray-100 bg-blue-gray-50/50 p-4" > @@ -253,7 +250,7 @@ export default function Activities() { {channelId == 1 ? "Contribution" : "Reviewed"} @@ -264,17 +261,17 @@ export default function Activities() {
    @@ -292,7 +289,7 @@ export default function Activities() {
    @@ -302,9 +299,9 @@ export default function Activities() {
    - - - + + + @@ -320,20 +317,20 @@ export default function Activities() { )}
    -
    - - + + + Page 1 of 10
    - -
    -
    +
    ); diff --git a/app/routes/_dashboard.individuals.($id).new/route.tsx b/app/routes/_dashboard.individuals.($id).new/route.tsx index ef61734..92d207b 100644 --- a/app/routes/_dashboard.individuals.($id).new/route.tsx +++ b/app/routes/_dashboard.individuals.($id).new/route.tsx @@ -1,6 +1,9 @@ import { useNavigate, useParams } from "@remix-run/react"; import { useState } from "react"; -import { Card, Typography } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Card, Typography } = material; + import { useCreateIndividualMutation, useGetManagersQuery, diff --git a/app/routes/_dashboard.individuals._index.($id)/route.tsx b/app/routes/_dashboard.individuals._index.($id)/route.tsx index 08d4f09..10d450a 100644 --- a/app/routes/_dashboard.individuals._index.($id)/route.tsx +++ b/app/routes/_dashboard.individuals._index.($id)/route.tsx @@ -6,7 +6,8 @@ import { HomeIcon, SignalIcon, } from "@heroicons/react/24/solid"; -import { +import { default as material } from "@material-tailwind/react"; +const { Card, CardHeader, Input, @@ -22,7 +23,8 @@ import { IconButton, Tooltip, Spinner, -} from "@material-tailwind/react"; +} = material; + import { Link, useNavigate, useParams } from "@remix-run/react"; import { useState } from "react"; import { useUser } from "~/contexts"; diff --git a/app/routes/_dashboard.organizations.$id.edit/route.tsx b/app/routes/_dashboard.organizations.$id.edit/route.tsx index f17a1de..fb754f7 100644 --- a/app/routes/_dashboard.organizations.$id.edit/route.tsx +++ b/app/routes/_dashboard.organizations.$id.edit/route.tsx @@ -1,6 +1,8 @@ import { useParams } from "@remix-run/react"; import { useEffect, useState } from "react"; -import { Card, Typography } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Card, Typography } = material; import { FindOrganizationQuery, diff --git a/app/routes/_dashboard.visions.$id.edit/route.tsx b/app/routes/_dashboard.visions.$id.edit/route.tsx index b53822e..143d04d 100644 --- a/app/routes/_dashboard.visions.$id.edit/route.tsx +++ b/app/routes/_dashboard.visions.$id.edit/route.tsx @@ -1,6 +1,8 @@ import { useParams } from "@remix-run/react"; import { useEffect, useState } from "react"; -import { Card, Typography } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Card, Typography } = material; import { FindVisionQuery, diff --git a/app/routes/_dashboard.visions._index/components/FetchContentButton/FetchContentButton.tsx b/app/routes/_dashboard.visions._index/components/FetchContentButton/FetchContentButton.tsx index 4145d88..650bcce 100644 --- a/app/routes/_dashboard.visions._index/components/FetchContentButton/FetchContentButton.tsx +++ b/app/routes/_dashboard.visions._index/components/FetchContentButton/FetchContentButton.tsx @@ -1,6 +1,9 @@ import { useAnalyzeActivityWithMinimumResultMutation } from "@app-types/graphql"; import { BoltIcon } from "@heroicons/react/24/solid"; -import { Tooltip, IconButton, Spinner } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; + +const { Tooltip, IconButton, Spinner } = material; import { useState } from "react"; export function FetchContentButton({ visionId }: { visionId: string }) { diff --git a/app/routes/_dashboard.visions._index/route.tsx b/app/routes/_dashboard.visions._index/route.tsx index 384ba21..4411826 100644 --- a/app/routes/_dashboard.visions._index/route.tsx +++ b/app/routes/_dashboard.visions._index/route.tsx @@ -3,7 +3,9 @@ import { ArrowTopRightOnSquareIcon, DocumentChartBarIcon, } from "@heroicons/react/24/solid"; -import { +import { default as material } from "@material-tailwind/react"; + +const { Card, CardHeader, Typography, @@ -19,7 +21,8 @@ import { TabsHeader, Select, Option, -} from "@material-tailwind/react"; +} = material; + import { Link, useParams, useLocation, useNavigate } from "@remix-run/react"; import { useState } from "react"; import { FetchContentButton } from "./components"; diff --git a/app/routes/_dashboard.visions.new/route.tsx b/app/routes/_dashboard.visions.new/route.tsx index 23a4df2..e572d53 100644 --- a/app/routes/_dashboard.visions.new/route.tsx +++ b/app/routes/_dashboard.visions.new/route.tsx @@ -1,6 +1,6 @@ import { useNavigate, useParams } from "@remix-run/react"; import { useState } from "react"; -import { Card, Typography } from "@material-tailwind/react"; +import { default as material } from "@material-tailwind/react"; import { useCreateVisionMutation, useGetVisionTypesAndCyclesQuery, @@ -8,6 +8,8 @@ import { import { VisionForm, VisionFormData } from "~/components/VisionForm"; import { noNull } from "~/utils"; +const { Card, Typography } = material; + type VisionCreateFormData = VisionFormData; export default function VisionCreate() { diff --git a/app/routes/_site._index.tsx b/app/routes/_site._index.tsx index ab8645e..1a2bf9d 100644 --- a/app/routes/_site._index.tsx +++ b/app/routes/_site._index.tsx @@ -1,5 +1,7 @@ import React from "react"; -import { + +import { default as material } from "@material-tailwind/react"; +const { Card, CardBody, CardHeader, @@ -9,7 +11,8 @@ import { Input, Textarea, Checkbox, -} from "@material-tailwind/react"; +} = material; + import { FingerPrintIcon } from "@heroicons/react/24/solid"; import { PageTitle, FirstPageFooter as Footer } from "~/widgets/layout"; import { FeatureCard, TeamCard } from "~/widgets/cards"; diff --git a/app/widgets/cards/feature-card.tsx b/app/widgets/cards/feature-card.tsx index 0167e62..293b4d7 100644 --- a/app/widgets/cards/feature-card.tsx +++ b/app/widgets/cards/feature-card.tsx @@ -1,10 +1,7 @@ import PropTypes from "prop-types"; -import { - Card, - CardBody, - Typography, - IconButton, -} from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Card, CardBody, Typography, IconButton } = material; export function FeatureCard({ color, diff --git a/app/widgets/cards/team-card.tsx b/app/widgets/cards/team-card.tsx index 495829c..75483f9 100644 --- a/app/widgets/cards/team-card.tsx +++ b/app/widgets/cards/team-card.tsx @@ -1,5 +1,7 @@ import PropTypes from "prop-types"; -import { Card, Avatar, Typography } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Card, Avatar, Typography } = material; export function TeamCard({ img, diff --git a/app/widgets/layout/dashboard-sidenav.tsx b/app/widgets/layout/dashboard-sidenav.tsx index 4d647ec..8434ced 100644 --- a/app/widgets/layout/dashboard-sidenav.tsx +++ b/app/widgets/layout/dashboard-sidenav.tsx @@ -1,6 +1,7 @@ import PropTypes from "prop-types"; import { Link, NavLink } from "react-router-dom"; -import { Button, Typography } from "@material-tailwind/react"; +import { default as material } from "@material-tailwind/react"; +const { Button, Typography } = material; import { RouteData } from "~/routesData"; import { useNavigate } from "@remix-run/react"; diff --git a/app/widgets/layout/dashboard-top-navbar.tsx b/app/widgets/layout/dashboard-top-navbar.tsx index a7012db..3c464fe 100644 --- a/app/widgets/layout/dashboard-top-navbar.tsx +++ b/app/widgets/layout/dashboard-top-navbar.tsx @@ -1,12 +1,14 @@ import { Link } from "react-router-dom"; -import { Navbar, Button, IconButton, Input } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Navbar, Button, IconButton, Input } = material; import { UserCircleIcon, Cog6ToothIcon, Bars3Icon, } from "@heroicons/react/24/solid"; import { signOutClient } from "~/utils"; -import { useApolloClient } from "@apollo/client"; +import { useApolloClient } from "@apollo/client/index.js"; import { useSettingsContext } from "~/contexts"; export function DashboardTopNavbar() { diff --git a/app/widgets/layout/firstpage-footer.tsx b/app/widgets/layout/firstpage-footer.tsx index 79890db..9136c8f 100644 --- a/app/widgets/layout/firstpage-footer.tsx +++ b/app/widgets/layout/firstpage-footer.tsx @@ -1,5 +1,7 @@ import PropTypes from "prop-types"; -import { Typography, IconButton } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Typography, IconButton } = material; const year = new Date().getFullYear(); diff --git a/app/widgets/layout/page-title.tsx b/app/widgets/layout/page-title.tsx index 154499d..71ab532 100644 --- a/app/widgets/layout/page-title.tsx +++ b/app/widgets/layout/page-title.tsx @@ -1,5 +1,7 @@ import PropTypes from "prop-types"; -import { Typography } from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Typography } = material; export function PageTitle({ section, diff --git a/app/widgets/layout/site-navbar.tsx b/app/widgets/layout/site-navbar.tsx index 978d965..1b987ef 100644 --- a/app/widgets/layout/site-navbar.tsx +++ b/app/widgets/layout/site-navbar.tsx @@ -1,13 +1,10 @@ import React from "react"; import PropTypes from "prop-types"; import { Link } from "react-router-dom"; -import { - Navbar as MTNavbar, - Typography, - Button, - IconButton, - Collapse, -} from "@material-tailwind/react"; + +import { default as material } from "@material-tailwind/react"; +const { Navbar: MTNavbar, Typography, Button, IconButton, Collapse } = material; + import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline"; import { siteRouteType } from "~/routesData"; From 7a7f6dc79acb9f7cf31926bd4ed5950bd496b698 Mon Sep 17 00:00:00 2001 From: Mahmoud Moravej Date: Fri, 19 Apr 2024 13:56:42 -0400 Subject: [PATCH 3/7] remain fixes for imports for apollo --- app/contexts/apollo/apolloServerProvider.tsx | 7 ++----- package.json | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/contexts/apollo/apolloServerProvider.tsx b/app/contexts/apollo/apolloServerProvider.tsx index be5cf5a..b165e3c 100644 --- a/app/contexts/apollo/apolloServerProvider.tsx +++ b/app/contexts/apollo/apolloServerProvider.tsx @@ -1,12 +1,9 @@ -import type { +import { ApolloClient, NormalizedCacheObject, + ApolloProvider, } from "@apollo/client/index.js"; -import { default as apollo } from "@apollo/client"; - -const { ApolloProvider } = apollo; - export const ApolloServerProvider = ({ client, children, diff --git a/package.json b/package.json index 0e13dc5..05c7e66 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "build": "remix vite:build", "dev": "remix vite:dev", - "start": "PORT=5000 remix-serve ./build/server/index.js", + "start": "PORT=6000 remix-serve ./build/server/index.js", "typecheck": "tsc", "graphql": "graphql-codegen --config graphql.codegen.ts", "lint": "eslint --quiet --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", From 2877e0857752b5b9e158b53f1947de914dab9fe9 Mon Sep 17 00:00:00 2001 From: Mahmoud Moravej Date: Fri, 19 Apr 2024 18:15:53 -0400 Subject: [PATCH 4/7] quick change from material-tailwind -> mui --- app/@types/graphql/schema.ts | 2 +- app/widgets/layout/dashboard-sidenav.tsx | 55 +++++++++------------ app/widgets/layout/dashboard-top-navbar.tsx | 39 +++++++-------- app/widgets/layout/firstpage-footer.tsx | 17 ++----- app/widgets/layout/page-title.tsx | 7 ++- app/widgets/layout/site-navbar.tsx | 34 ++++++------- 6 files changed, 62 insertions(+), 92 deletions(-) diff --git a/app/@types/graphql/schema.ts b/app/@types/graphql/schema.ts index 36839fd..c61cc00 100644 --- a/app/@types/graphql/schema.ts +++ b/app/@types/graphql/schema.ts @@ -1,5 +1,5 @@ import { gql } from "@apollo/client/index.js"; -import * as Apollo from "@apollo/client"; +import * as Apollo from "@apollo/client/index.js"; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { diff --git a/app/widgets/layout/dashboard-sidenav.tsx b/app/widgets/layout/dashboard-sidenav.tsx index 8434ced..f517df9 100644 --- a/app/widgets/layout/dashboard-sidenav.tsx +++ b/app/widgets/layout/dashboard-sidenav.tsx @@ -1,7 +1,14 @@ import PropTypes from "prop-types"; import { Link, NavLink } from "react-router-dom"; -import { default as material } from "@material-tailwind/react"; -const { Button, Typography } = material; + +import { + ListItem, + Typography, + List, + ListItemButton, + ListItemIcon, + ListItemText, +} from "@mui/material"; import { RouteData } from "~/routesData"; import { useNavigate } from "@remix-run/react"; @@ -51,47 +58,29 @@ export function Sidenav({
    {routes.map(({ title, pages }, key) => ( -
      + {title && ( -
    • + {title} -
    • + )} {pages.map(({ icon, name, path }) => ( -
    • - - {({ isActive }) => ( - - )} - -
    • + + {({ isActive }) => ( + + {icon} + {name} + + )} + ))} -
    + ))}
    diff --git a/app/widgets/layout/dashboard-top-navbar.tsx b/app/widgets/layout/dashboard-top-navbar.tsx index 3c464fe..ae2fa42 100644 --- a/app/widgets/layout/dashboard-top-navbar.tsx +++ b/app/widgets/layout/dashboard-top-navbar.tsx @@ -1,12 +1,11 @@ import { Link } from "react-router-dom"; -import { default as material } from "@material-tailwind/react"; -const { Navbar, Button, IconButton, Input } = material; import { UserCircleIcon, Cog6ToothIcon, Bars3Icon, } from "@heroicons/react/24/solid"; +import { AppBar, Button, IconButton, TextField } from "@mui/material"; import { signOutClient } from "~/utils"; import { useApolloClient } from "@apollo/client/index.js"; import { useSettingsContext } from "~/contexts"; @@ -21,15 +20,17 @@ export function DashboardTopNavbar() { // page = page ? page : ""; return ( -
    { @@ -63,11 +64,10 @@ export function DashboardTopNavbar() { }
    - +
    { setSideNavBarOpen(!sideNavBarOpen); @@ -78,7 +78,6 @@ export function DashboardTopNavbar() { - + @@ -174,11 +169,11 @@ export function DashboardTopNavbar() { */} - null}> + null}>
    -
    + ); } diff --git a/app/widgets/layout/firstpage-footer.tsx b/app/widgets/layout/firstpage-footer.tsx index 9136c8f..bf9dd0f 100644 --- a/app/widgets/layout/firstpage-footer.tsx +++ b/app/widgets/layout/firstpage-footer.tsx @@ -1,7 +1,6 @@ import PropTypes from "prop-types"; -import { default as material } from "@material-tailwind/react"; -const { Typography, IconButton } = material; +import { Typography, IconButton } from "@mui/material"; const year = new Date().getFullYear(); @@ -37,10 +36,7 @@ export function FirstPageFooter({ target="_blank" rel="noopener noreferrer" > - + @@ -53,7 +49,7 @@ export function FirstPageFooter({ {menus.map(({ name, items }) => (
    @@ -63,11 +59,8 @@ export function FirstPageFooter({ {items.map((item) => (
  • {item.name} @@ -83,7 +76,7 @@ export function FirstPageFooter({
    {copyright} diff --git a/app/widgets/layout/page-title.tsx b/app/widgets/layout/page-title.tsx index 71ab532..b73f916 100644 --- a/app/widgets/layout/page-title.tsx +++ b/app/widgets/layout/page-title.tsx @@ -1,7 +1,6 @@ import PropTypes from "prop-types"; -import { default as material } from "@material-tailwind/react"; -const { Typography } = material; +import { Typography } from "@mui/material"; export function PageTitle({ section, @@ -14,13 +13,13 @@ export function PageTitle({ }) { return (
    - + {section} {heading} - + {children}
    diff --git a/app/widgets/layout/site-navbar.tsx b/app/widgets/layout/site-navbar.tsx index 1b987ef..d15ece7 100644 --- a/app/widgets/layout/site-navbar.tsx +++ b/app/widgets/layout/site-navbar.tsx @@ -2,8 +2,13 @@ import React from "react"; import PropTypes from "prop-types"; import { Link } from "react-router-dom"; -import { default as material } from "@material-tailwind/react"; -const { Navbar: MTNavbar, Typography, Button, IconButton, Collapse } = material; +import { + AppBar, + Typography, + Button, + IconButton, + Collapse, +} from "@mui/material"; import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline"; import { siteRouteType } from "~/routesData"; @@ -29,13 +34,7 @@ export function SiteNavbar({ const navList = (
    - +
    {navList} - @@ -115,7 +109,7 @@ export function SiteNavbar({ })}
    - + ); } @@ -123,7 +117,7 @@ SiteNavbar.defaultProps = { brandName: "mAy I Coach", action: ( - From 56c985fd970e514bba65f2c25fafbe3ac245b00c Mon Sep 17 00:00:00 2001 From: Mahmoud Moravej Date: Mon, 22 Apr 2024 16:30:12 -0400 Subject: [PATCH 5/7] coachme page -> mui --- app/components/DefaultSkeleton.tsx | 28 +++++----- .../GenerateCycleSummaryButton.tsx | 8 ++- .../route.tsx | 51 ++++++++++--------- app/widgets/cards/feature-card.tsx | 4 +- app/widgets/layout/dashboard-sidenav.tsx | 4 +- app/widgets/layout/dashboard-top-navbar.tsx | 13 +++-- package.json | 2 +- 7 files changed, 55 insertions(+), 55 deletions(-) diff --git a/app/components/DefaultSkeleton.tsx b/app/components/DefaultSkeleton.tsx index b342ca9..7715afc 100644 --- a/app/components/DefaultSkeleton.tsx +++ b/app/components/DefaultSkeleton.tsx @@ -1,5 +1,4 @@ -import { default as material } from "@material-tailwind/react"; -const { Typography } = material; +import { Typography } from "@mui/material"; export function DefaultSkeleton() { return ( @@ -22,50 +21,49 @@ export function DefaultSkeleton() {
                  diff --git a/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx b/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx index bdf1caf..9df650e 100644 --- a/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx +++ b/app/routes/_dashboard.individuals.$id.coach/components/GenerateCycleSummaryButton/GenerateCycleSummaryButton.tsx @@ -4,8 +4,7 @@ import { } from "@app-types/graphql"; import { LightBulbIcon } from "@heroicons/react/24/outline"; -import { default as material } from "@material-tailwind/react"; -const { Spinner, Button } = material; +import { CircularProgress, Button } from "@mui/material"; import { useState } from "react"; @@ -56,13 +55,12 @@ export function GenerateCycleSummaryButton({ return (