test(auth): add multi-user regression coverage
- Enable backend tests in CI (remove if: false) - Fix test_products_helpers.py to pass current_user parameter - Fix test_routines_helpers.py to include short_id in products - Fix llm_context.py to use product_effect_profile correctly - All 221 tests passing
This commit is contained in:
parent
b11f64d5a1
commit
dac787b81b
45 changed files with 5298 additions and 23 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
|
@ -12,6 +12,10 @@ export type AiCallLog = {
|
|||
* Id
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id?: string | null;
|
||||
/**
|
||||
* Created At
|
||||
*/
|
||||
|
|
@ -187,6 +191,98 @@ export type ActiveIngredient = {
|
|||
irritation_potential?: StrengthLevel | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* AuthHouseholdMembershipPublic
|
||||
*/
|
||||
export type AuthHouseholdMembershipPublic = {
|
||||
/**
|
||||
* Household Id
|
||||
*/
|
||||
household_id: string;
|
||||
role: HouseholdRole;
|
||||
};
|
||||
|
||||
/**
|
||||
* AuthIdentityPublic
|
||||
*/
|
||||
export type AuthIdentityPublic = {
|
||||
/**
|
||||
* Issuer
|
||||
*/
|
||||
issuer: string;
|
||||
/**
|
||||
* Subject
|
||||
*/
|
||||
subject: string;
|
||||
/**
|
||||
* Email
|
||||
*/
|
||||
email?: string | null;
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name?: string | null;
|
||||
/**
|
||||
* Preferred Username
|
||||
*/
|
||||
preferred_username?: string | null;
|
||||
/**
|
||||
* Groups
|
||||
*/
|
||||
groups?: Array<string>;
|
||||
};
|
||||
|
||||
/**
|
||||
* AuthProfilePublic
|
||||
*/
|
||||
export type AuthProfilePublic = {
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id: string | null;
|
||||
/**
|
||||
* Birth Date
|
||||
*/
|
||||
birth_date?: string | null;
|
||||
/**
|
||||
* Sex At Birth
|
||||
*/
|
||||
sex_at_birth?: string | null;
|
||||
/**
|
||||
* Created At
|
||||
*/
|
||||
created_at: string;
|
||||
/**
|
||||
* Updated At
|
||||
*/
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* AuthSessionResponse
|
||||
*/
|
||||
export type AuthSessionResponse = {
|
||||
user: AuthUserPublic;
|
||||
identity: AuthIdentityPublic;
|
||||
profile?: AuthProfilePublic | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* AuthUserPublic
|
||||
*/
|
||||
export type AuthUserPublic = {
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
id: string;
|
||||
role: Role;
|
||||
household_membership?: AuthHouseholdMembershipPublic | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* BarrierState
|
||||
*/
|
||||
|
|
@ -265,6 +361,10 @@ export type GroomingSchedule = {
|
|||
* Id
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id?: string | null;
|
||||
/**
|
||||
* Day Of Week
|
||||
*/
|
||||
|
|
@ -316,6 +416,11 @@ export type HttpValidationError = {
|
|||
detail?: Array<ValidationError>;
|
||||
};
|
||||
|
||||
/**
|
||||
* HouseholdRole
|
||||
*/
|
||||
export type HouseholdRole = 'owner' | 'member';
|
||||
|
||||
/**
|
||||
* IngredientFunction
|
||||
*/
|
||||
|
|
@ -383,6 +488,10 @@ export type LabResult = {
|
|||
* Record Id
|
||||
*/
|
||||
record_id?: string;
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id?: string | null;
|
||||
/**
|
||||
* Collected At
|
||||
*/
|
||||
|
|
@ -649,6 +758,10 @@ export type MedicationEntry = {
|
|||
* Record Id
|
||||
*/
|
||||
record_id?: string;
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id?: string | null;
|
||||
kind: MedicationKind;
|
||||
/**
|
||||
* Product Name
|
||||
|
|
@ -728,6 +841,10 @@ export type MedicationUsage = {
|
|||
* Record Id
|
||||
*/
|
||||
record_id?: string;
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id?: string | null;
|
||||
/**
|
||||
* Medication Record Id
|
||||
*/
|
||||
|
|
@ -1010,10 +1127,18 @@ export type ProductInventory = {
|
|||
* Id
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id?: string | null;
|
||||
/**
|
||||
* Product Id
|
||||
*/
|
||||
product_id: string;
|
||||
/**
|
||||
* Is Household Shared
|
||||
*/
|
||||
is_household_shared?: boolean;
|
||||
/**
|
||||
* Is Opened
|
||||
*/
|
||||
|
|
@ -1689,6 +1814,11 @@ export type ResponseMetadata = {
|
|||
*/
|
||||
export type ResultFlag = 'N' | 'ABN' | 'POS' | 'NEG' | 'L' | 'H';
|
||||
|
||||
/**
|
||||
* Role
|
||||
*/
|
||||
export type Role = 'admin' | 'member';
|
||||
|
||||
/**
|
||||
* Routine
|
||||
*/
|
||||
|
|
@ -1697,6 +1827,10 @@ export type Routine = {
|
|||
* Id
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id?: string | null;
|
||||
/**
|
||||
* Routine Date
|
||||
*/
|
||||
|
|
@ -1739,6 +1873,10 @@ export type RoutineStep = {
|
|||
* Id
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* User Id
|
||||
*/
|
||||
user_id?: string | null;
|
||||
/**
|
||||
* Routine Id
|
||||
*/
|
||||
|
|
@ -1877,6 +2015,36 @@ export type RoutineUpdate = {
|
|||
notes?: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* SessionSyncRequest
|
||||
*/
|
||||
export type SessionSyncRequest = {
|
||||
/**
|
||||
* Iss
|
||||
*/
|
||||
iss?: string | null;
|
||||
/**
|
||||
* Sub
|
||||
*/
|
||||
sub?: string | null;
|
||||
/**
|
||||
* Email
|
||||
*/
|
||||
email?: string | null;
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
name?: string | null;
|
||||
/**
|
||||
* Preferred Username
|
||||
*/
|
||||
preferred_username?: string | null;
|
||||
/**
|
||||
* Groups
|
||||
*/
|
||||
groups?: Array<string> | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* SexAtBirth
|
||||
*/
|
||||
|
|
@ -2364,6 +2532,50 @@ export type ValidationError = {
|
|||
};
|
||||
};
|
||||
|
||||
export type SyncSessionAuthSessionSyncPostData = {
|
||||
/**
|
||||
* Payload
|
||||
*/
|
||||
body?: SessionSyncRequest | null;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/auth/session/sync';
|
||||
};
|
||||
|
||||
export type SyncSessionAuthSessionSyncPostErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type SyncSessionAuthSessionSyncPostError = SyncSessionAuthSessionSyncPostErrors[keyof SyncSessionAuthSessionSyncPostErrors];
|
||||
|
||||
export type SyncSessionAuthSessionSyncPostResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: AuthSessionResponse;
|
||||
};
|
||||
|
||||
export type SyncSessionAuthSessionSyncPostResponse = SyncSessionAuthSessionSyncPostResponses[keyof SyncSessionAuthSessionSyncPostResponses];
|
||||
|
||||
export type GetMeAuthMeGetData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/auth/me';
|
||||
};
|
||||
|
||||
export type GetMeAuthMeGetResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: AuthSessionResponse;
|
||||
};
|
||||
|
||||
export type GetMeAuthMeGetResponse = GetMeAuthMeGetResponses[keyof GetMeAuthMeGetResponses];
|
||||
|
||||
export type ListProductsProductsGetData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue