feat(MED-161): move analysis types separately from accounts types
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
import { AnalysisResultDetails, UserAnalysis } from '../types/accounts';
|
||||
import type { UuringElement, UuringuVastus } from '@kit/shared/types/medipost-analysis';
|
||||
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;
|
||||
})
|
||||
| (Pick<
|
||||
Database['medreport']['Tables']['account_params']['Row'],
|
||||
'weight' | 'height'
|
||||
> & {
|
||||
isSmoker:
|
||||
| Database['medreport']['Tables']['account_params']['Row']['is_smoker']
|
||||
| null;
|
||||
})
|
||||
| null;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -25,7 +27,7 @@ export type AccountWithParams =
|
||||
* @param {SupabaseClient<Database>} client - The Supabase client instance.
|
||||
*/
|
||||
class AccountsApi {
|
||||
constructor(private readonly client: SupabaseClient<Database>) {}
|
||||
constructor(private readonly client: SupabaseClient<Database>) { }
|
||||
|
||||
/**
|
||||
* @name getAccount
|
||||
|
||||
Reference in New Issue
Block a user