feat(MED-161): move type to types file

This commit is contained in:
2025-09-17 11:16:50 +03:00
parent afac628bcf
commit e7650e3c32
8 changed files with 23 additions and 21 deletions

View File

@@ -6,20 +6,7 @@ import PersonalCode from '~/lib/utils';
import type { AnalysisResultDetails, AnalysisResultDetailsMapped, UserAnalysis } from '../types/analysis-results';
import type { AnalysisOrder } from '../types/analysis-orders';
export type AccountWithParams =
Database['medreport']['Tables']['accounts']['Row'] & {
accountParams:
| (Pick<
Database['medreport']['Tables']['account_params']['Row'],
'weight' | 'height'
> & {
isSmoker:
| Database['medreport']['Tables']['account_params']['Row']['is_smoker']
| null;
})
| null;
};
import { AccountWithParams } from '../types/accounts';
/**
* Class representing an API for interacting with user accounts.

View File

@@ -7,3 +7,17 @@ export enum ApplicationRoleEnum {
Doctor = 'doctor',
SuperAdmin = 'super_admin',
}
export type AccountWithParams =
Database['medreport']['Tables']['accounts']['Row'] & {
accountParams:
| (Pick<
Database['medreport']['Tables']['account_params']['Row'],
'weight' | 'height'
> & {
isSmoker:
| Database['medreport']['Tables']['account_params']['Row']['is_smoker']
| null;
})
| null;
};

View File

@@ -16,7 +16,8 @@
"./events": "./src/events/index.tsx",
"./components/*": "./src/components/*.tsx",
"./registry": "./src/registry/index.ts",
"./config": "./src/config/index.ts"
"./config": "./src/config/index.ts",
"./types/*": "./src/types/*.ts"
},
"devDependencies": {
"@kit/eslint-config": "workspace:*",