fix(api): type imports from generated graphql types (#1215)

## Summary by CodeRabbit

- Enhanced internal type handling by updating import statements to use
type-only syntax, ensuring clearer and more consistent type-checking
across modules.
- No changes to application behavior or user-facing functionality have
been introduced.
This commit is contained in:
Pujit Mehrotra
2025-03-03 14:54:01 -05:00
committed by GitHub
parent 4641894240
commit bce06cd76c
4 changed files with 7 additions and 4 deletions

View File

@@ -10,13 +10,13 @@ import { AuthActionVerb } from 'nest-authz';
import { v4 as uuidv4 } from 'uuid';
import { ZodError } from 'zod';
import type { Permission } from '@app/graphql/generated/api/types.js';
import { environment } from '@app/environment.js';
import { ApiKeySchema, ApiKeyWithSecretSchema } from '@app/graphql/generated/api/operations.js';
import {
AddPermissionInput,
ApiKey,
ApiKeyWithSecret,
Permission,
Resource,
Role,
} from '@app/graphql/generated/api/types.js';

View File

@@ -1,6 +1,7 @@
import { ChoicesFor, Question, QuestionSet, WhenFor } from 'nest-commander';
import { Permission, Role } from '@app/graphql/generated/api/types.js';
import type { Permission } from '@app/graphql/generated/api/types.js';
import { Role } from '@app/graphql/generated/api/types.js';
import { ApiKeyService } from '@app/unraid-api/auth/api-key.service.js';
import { LogService } from '@app/unraid-api/cli/log.service.js';

View File

@@ -1,7 +1,8 @@
import { AuthActionVerb } from 'nest-authz';
import { Command, CommandRunner, InquirerService, Option } from 'nest-commander';
import { Permission, Resource, Role } from '@app/graphql/generated/api/types.js';
import type { Permission } from '@app/graphql/generated/api/types.js';
import { Resource, Role } from '@app/graphql/generated/api/types.js';
import { ApiKeyService } from '@app/unraid-api/auth/api-key.service.js';
import { AddApiKeyQuestionSet } from '@app/unraid-api/cli/apikey/add-api-key.questions.js';
import { LogService } from '@app/unraid-api/cli/log.service.js';

View File

@@ -2,9 +2,10 @@ import { Query, Resolver } from '@nestjs/graphql';
import { AuthActionVerb, AuthPossession, UsePermissions } from 'nest-authz';
import type { Service } from '@app/graphql/generated/api/types.js';
import { bootTimestamp } from '@app/common/dashboard/boot-timestamp.js';
import { API_VERSION } from '@app/environment.js';
import { DynamicRemoteAccessType, Resource, Service } from '@app/graphql/generated/api/types.js';
import { DynamicRemoteAccessType, Resource } from '@app/graphql/generated/api/types.js';
import { store } from '@app/store/index.js';
@Resolver('Services')