Skip to content

Commit

Permalink
missed some fields
Browse files Browse the repository at this point in the history
  • Loading branch information
suejung-sentry committed Jan 2, 2025
1 parent 2eecb38 commit 7cbf5b2
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion src/services/user/useUpdateProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ import config from 'config'
import Api from 'shared/api'
import { NetworkErrorObject, rejectNetworkError } from 'shared/api/helpers'

const TypeProjectsSchema = z.array(
z.union([
z.literal('PERSONAL'),
z.literal('YOUR_ORG'),
z.literal('OPEN_SOURCE'),
z.literal('EDUCATIONAL'),
])
)

const GoalsSchema = z.array(
z.union([
z.literal('STARTING_WITH_TESTS'),
z.literal('IMPROVE_COVERAGE'),
z.literal('MAINTAIN_COVERAGE'),
z.literal('TEAM_REQUIREMENTS'),
z.literal('OTHER'),
])
)

const CurrentUserFragment = z.object({
email: z.string().nullish(),
privateAccess: z.boolean().nullish(),
Expand All @@ -27,6 +46,24 @@ const CurrentUserFragment = z.object({
service: z.string().nullish(),
ownerid: z.number().nullish(),
serviceId: z.string().nullish(),
plan: z.string().nullish(),
staff: z.boolean().nullish(),
hasYaml: z.boolean(),
bot: z.string().nullish(),
delinquent: z.boolean().nullish(),
didTrial: z.boolean().nullish(),
planProvider: z.string().nullish(),
planUserCount: z.number().nullish(),
createdAt: z.string().nullish(),
updatedAt: z.string().nullish(),
profile: z
.object({
createdAt: z.string().nullish(),
otherGoal: z.string().nullish(),
typeProjects: TypeProjectsSchema.nullish(),
goals: GoalsSchema.nullish(),
})
.nullish(),
})
.nullish(),
})
Expand Down Expand Up @@ -68,7 +105,6 @@ fragment CurrentUserFragment on Me {
plan
staff
hasYaml
service
bot
delinquent
didTrial
Expand Down

0 comments on commit 7cbf5b2

Please sign in to comment.