-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmutations.ts
More file actions
77 lines (66 loc) · 1.54 KB
/
mutations.ts
File metadata and controls
77 lines (66 loc) · 1.54 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import type { LocalMediaItem, Post } from './post'
import type { Profile } from './profile'
type AddProfileMutationInput = {
username: string
}
type DeleteProfileMutationInput = {
profile: Profile
}
type ChangePasswordMutationInput = {
currentPassword: string
newPassword: string
}
type ChangeEmailMutationInput = {
currentPassword: string
newEmail: string
}
type SignInMutationInput = {
email: string
password: string
}
type SignUpMutationInput = {
email: string
password: string
username: string
}
type SavePostMutationInput = {
isEditing: boolean
post: Post | null | undefined
profileId: string
nextPosition: number
caption: string
subtitle: string
status: Post['status']
mediaItems: LocalMediaItem[]
}
type DeletePostMutationInput = {
post: Post
profileId: string
}
type ReorderPostsMutationInput = {
/** Posts in display order; `grid_position` is set to each index. */
orderedPosts: Pick<Post, 'id'>[]
}
type UpdateProfileMutationInput = {
profileId: string
username: string
displayName: string
bio: string
gridRatio: Profile['grid_ratio']
existingAvatarUrl: string | null
newAvatarFile: File | null
/** True when preview was cleared and a stored avatar should be removed. */
removeStoredAvatar: boolean
}
export type {
AddProfileMutationInput,
ChangeEmailMutationInput,
ChangePasswordMutationInput,
DeletePostMutationInput,
DeleteProfileMutationInput,
ReorderPostsMutationInput,
SavePostMutationInput,
SignInMutationInput,
SignUpMutationInput,
UpdateProfileMutationInput
}