Merge pull request 'Add operation for ensureStripeCustomerExists' (#189) from loewy/ensure-customer-exists-operations into master

Reviewed-on: #189
This commit is contained in:
loewy 2025-07-07 14:27:24 -06:00
commit 82af3a3ce9
2 changed files with 94 additions and 0 deletions

View File

@ -3834,6 +3834,27 @@ export type GetMedalsQuery = {
}; };
}; };
export type EnsureStripeCustomerExistsMutationVariables = Exact<{
[key: string]: never;
}>;
export type EnsureStripeCustomerExistsMutation = {
__typename?: "Mutation";
ensureStripeCustomerExists: {
__typename?: "UserGQL";
id: number;
firebaseUid?: string | null;
username: string;
stripeCustomerId?: string | null;
profileImageUri?: string | null;
isAdmin?: boolean | null;
fargoRating?: number | null;
videosPrivateByDefault?: boolean | null;
createdAt?: any | null;
updatedAt?: any | null;
};
};
export type ReactToVideoMutationVariables = Exact<{ export type ReactToVideoMutationVariables = Exact<{
videoId: Scalars["Int"]["input"]; videoId: Scalars["Int"]["input"];
reaction?: InputMaybe<ReactionEnum>; reaction?: InputMaybe<ReactionEnum>;
@ -6641,6 +6662,65 @@ export type GetMedalsQueryResult = Apollo.QueryResult<
GetMedalsQuery, GetMedalsQuery,
GetMedalsQueryVariables GetMedalsQueryVariables
>; >;
export const EnsureStripeCustomerExistsDocument = gql`
mutation EnsureStripeCustomerExists {
ensureStripeCustomerExists {
id
firebaseUid
username
stripeCustomerId
profileImageUri
isAdmin
fargoRating
videosPrivateByDefault
createdAt
updatedAt
}
}
`;
export type EnsureStripeCustomerExistsMutationFn = Apollo.MutationFunction<
EnsureStripeCustomerExistsMutation,
EnsureStripeCustomerExistsMutationVariables
>;
/**
* __useEnsureStripeCustomerExistsMutation__
*
* To run a mutation, you first call `useEnsureStripeCustomerExistsMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useEnsureStripeCustomerExistsMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [ensureStripeCustomerExistsMutation, { data, loading, error }] = useEnsureStripeCustomerExistsMutation({
* variables: {
* },
* });
*/
export function useEnsureStripeCustomerExistsMutation(
baseOptions?: Apollo.MutationHookOptions<
EnsureStripeCustomerExistsMutation,
EnsureStripeCustomerExistsMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
EnsureStripeCustomerExistsMutation,
EnsureStripeCustomerExistsMutationVariables
>(EnsureStripeCustomerExistsDocument, options);
}
export type EnsureStripeCustomerExistsMutationHookResult = ReturnType<
typeof useEnsureStripeCustomerExistsMutation
>;
export type EnsureStripeCustomerExistsMutationResult =
Apollo.MutationResult<EnsureStripeCustomerExistsMutation>;
export type EnsureStripeCustomerExistsMutationOptions =
Apollo.BaseMutationOptions<
EnsureStripeCustomerExistsMutation,
EnsureStripeCustomerExistsMutationVariables
>;
export const ReactToVideoDocument = gql` export const ReactToVideoDocument = gql`
mutation ReactToVideo($videoId: Int!, $reaction: ReactionEnum) { mutation ReactToVideo($videoId: Int!, $reaction: ReactionEnum) {
reactToVideo(videoId: $videoId, reaction: $reaction) reactToVideo(videoId: $videoId, reaction: $reaction)

View File

@ -0,0 +1,14 @@
mutation EnsureStripeCustomerExists {
ensureStripeCustomerExists {
id
firebaseUid
username
stripeCustomerId
profileImageUri
isAdmin
fargoRating
videosPrivateByDefault
createdAt
updatedAt
}
}