-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.ts
More file actions
42 lines (31 loc) · 1.33 KB
/
user.ts
File metadata and controls
42 lines (31 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import type { paths } from "../schema";
import { GetClaimInProgressForCompanyResponse } from "./company";
import { FemaDisaster } from "./disaster";
export type CreateUserRequest = paths["/users"]["post"]["requestBody"]["content"]["application/json"];
export type CreateUserResponse = paths["/users"]["post"]["responses"];
export type UpdateUserRequest = paths["/users"]["patch"]["requestBody"]["content"]["application/json"];
export type UpdateUserResponse = paths["/users"]["patch"]["responses"][201]["content"]["application/json"];
export type User = paths["/users"]["post"]["responses"][201]["content"]["application/json"];
export type loginInitialState = {
success: boolean;
message: string;
};
export type signupInitialState = {
success: boolean;
message: string;
email?: string;
};
export enum requiredOnboardingProgress {
USER = "user",
COMPANY = "company",
FINISHED = "finished",
}
export const progressToNumber: Record<requiredOnboardingProgress, number> = {
[requiredOnboardingProgress.USER]: 0,
[requiredOnboardingProgress.COMPANY]: 1,
[requiredOnboardingProgress.FINISHED]: 2,
};
export type BannerData =
| { status: "no-disaster" }
| { status: "no-claim"; disaster: FemaDisaster }
| { status: "has-claim"; disaster: FemaDisaster; claim: GetClaimInProgressForCompanyResponse };