Skip to content

Commit

Permalink
use underscore to silence lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-codecov committed Nov 19, 2024
1 parent 2f67f48 commit 4c9f62b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/pages/TermsOfService/hooks/useTermsOfService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@ export type SaveTermsAgreementInput = z.infer<
typeof SaveTermsAgreementInputConfig
>

// TODO need to figure out where/how to share api resolver error type and to reflect the graphql schema. Maybe do resolver level schema validation in shared?
// Lets discuss this as we migrate more of the api to typescript.
// TODO this mutation is not handling all potential union types, there is also
// unauthenticated error and validation error types that also need to be handled
// With the migration to TS Query V5, we should also actually use the zod schema
// to validate the response that is returned from the mutationFn.

const ResolverError = z.object({
message: z.string(),
})
const SaveTermsAgreementPayloadConfig = z.object({
const _SaveTermsAgreementPayloadConfig = z.object({
data: z.object({
saveTermsAgreement: z.object({
error: z.union([ResolverError, ResolverError]).nullish(),
}),
}),
})
export type SaveTermsAgreementPayload = z.infer<
typeof SaveTermsAgreementPayloadConfig
typeof _SaveTermsAgreementPayloadConfig
>

interface SaveTermsAgreementOptions {
Expand Down

0 comments on commit 4c9f62b

Please sign in to comment.