add createCustomerPortalSession
All checks were successful
Tests / Tests (pull_request) Successful in 10s
All checks were successful
Tests / Tests (pull_request) Successful in 10s
This commit is contained in:
@@ -224,6 +224,11 @@ export type CreateBucketSetInput = {
|
||||
keyName: Scalars["String"]["input"];
|
||||
};
|
||||
|
||||
export type CreateCustomerPortalSessionResultGql = {
|
||||
__typename?: "CreateCustomerPortalSessionResultGQL";
|
||||
portalUrl: Scalars["String"]["output"];
|
||||
};
|
||||
|
||||
export type CreateSubscriptionResultGql = {
|
||||
__typename?: "CreateSubscriptionResultGQL";
|
||||
checkoutUrl: Scalars["String"]["output"];
|
||||
@@ -2373,6 +2378,7 @@ export type Mutation = {
|
||||
commentOnVideo: Scalars["Boolean"]["output"];
|
||||
createBucketSet: BucketSetGql;
|
||||
createChallenge: Challenge;
|
||||
createCustomerPortalSession: CreateCustomerPortalSessionResultGql;
|
||||
createRuleSet: RuleSet;
|
||||
createSubscription: CreateSubscriptionResultGql;
|
||||
createUploadStream: CreateUploadStreamReturn;
|
||||
@@ -2451,6 +2457,10 @@ export type MutationCreateChallengeArgs = {
|
||||
startDate: Scalars["DateTime"]["input"];
|
||||
};
|
||||
|
||||
export type MutationCreateCustomerPortalSessionArgs = {
|
||||
returnUrl?: InputMaybe<Scalars["String"]["input"]>;
|
||||
};
|
||||
|
||||
export type MutationCreateRuleSetArgs = {
|
||||
description?: InputMaybe<Scalars["String"]["input"]>;
|
||||
name: Scalars["String"]["input"];
|
||||
@@ -4701,6 +4711,18 @@ export type CreateSubscriptionMutation = {
|
||||
};
|
||||
};
|
||||
|
||||
export type CreateCustomerPortalSessionMutationVariables = Exact<{
|
||||
returnUrl?: InputMaybe<Scalars["String"]["input"]>;
|
||||
}>;
|
||||
|
||||
export type CreateCustomerPortalSessionMutation = {
|
||||
__typename?: "Mutation";
|
||||
createCustomerPortalSession: {
|
||||
__typename?: "CreateCustomerPortalSessionResultGQL";
|
||||
portalUrl: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetAvailableSubscriptionOptionsQueryVariables = Exact<{
|
||||
[key: string]: never;
|
||||
}>;
|
||||
@@ -9589,6 +9611,57 @@ export type CreateSubscriptionMutationOptions = Apollo.BaseMutationOptions<
|
||||
CreateSubscriptionMutation,
|
||||
CreateSubscriptionMutationVariables
|
||||
>;
|
||||
export const CreateCustomerPortalSessionDocument = gql`
|
||||
mutation CreateCustomerPortalSession($returnUrl: String) {
|
||||
createCustomerPortalSession(returnUrl: $returnUrl) {
|
||||
portalUrl
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type CreateCustomerPortalSessionMutationFn = Apollo.MutationFunction<
|
||||
CreateCustomerPortalSessionMutation,
|
||||
CreateCustomerPortalSessionMutationVariables
|
||||
>;
|
||||
|
||||
/**
|
||||
* __useCreateCustomerPortalSessionMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useCreateCustomerPortalSessionMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useCreateCustomerPortalSessionMutation` 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 [createCustomerPortalSessionMutation, { data, loading, error }] = useCreateCustomerPortalSessionMutation({
|
||||
* variables: {
|
||||
* returnUrl: // value for 'returnUrl'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useCreateCustomerPortalSessionMutation(
|
||||
baseOptions?: Apollo.MutationHookOptions<
|
||||
CreateCustomerPortalSessionMutation,
|
||||
CreateCustomerPortalSessionMutationVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useMutation<
|
||||
CreateCustomerPortalSessionMutation,
|
||||
CreateCustomerPortalSessionMutationVariables
|
||||
>(CreateCustomerPortalSessionDocument, options);
|
||||
}
|
||||
export type CreateCustomerPortalSessionMutationHookResult = ReturnType<
|
||||
typeof useCreateCustomerPortalSessionMutation
|
||||
>;
|
||||
export type CreateCustomerPortalSessionMutationResult =
|
||||
Apollo.MutationResult<CreateCustomerPortalSessionMutation>;
|
||||
export type CreateCustomerPortalSessionMutationOptions =
|
||||
Apollo.BaseMutationOptions<
|
||||
CreateCustomerPortalSessionMutation,
|
||||
CreateCustomerPortalSessionMutationVariables
|
||||
>;
|
||||
export const GetAvailableSubscriptionOptionsDocument = gql`
|
||||
query GetAvailableSubscriptionOptions {
|
||||
getAvailableSubscriptionOptions {
|
||||
|
||||
@@ -20,6 +20,12 @@ mutation CreateSubscription($priceId: String!) {
|
||||
}
|
||||
}
|
||||
|
||||
mutation CreateCustomerPortalSession($returnUrl: String) {
|
||||
createCustomerPortalSession(returnUrl: $returnUrl) {
|
||||
portalUrl
|
||||
}
|
||||
}
|
||||
|
||||
query GetAvailableSubscriptionOptions {
|
||||
getAvailableSubscriptionOptions {
|
||||
products {
|
||||
|
||||
@@ -1117,6 +1117,9 @@ type Mutation {
|
||||
ensureStripeCustomerExists: UserGQL!
|
||||
deleteUser: Boolean!
|
||||
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
||||
createCustomerPortalSession(
|
||||
returnUrl: String = null
|
||||
): CreateCustomerPortalSessionResultGQL!
|
||||
cancelSubscription: UserSubscriptionStatusGQL!
|
||||
grantManualEntitlement(
|
||||
userId: Int!
|
||||
@@ -1256,6 +1259,10 @@ type CreateSubscriptionResultGQL {
|
||||
sessionId: String!
|
||||
}
|
||||
|
||||
type CreateCustomerPortalSessionResultGQL {
|
||||
portalUrl: String!
|
||||
}
|
||||
|
||||
enum CancellationReasonEnum {
|
||||
DONT_PLAY_ENOUGH
|
||||
TOO_EXPENSIVE
|
||||
|
||||
Reference in New Issue
Block a user