Compare commits

..

5 Commits

Author SHA1 Message Date
8367c2d0cd add createCustomerPortalSession 2026-04-30 11:44:34 -07:00
b0c62f6e80 Merge pull request 'Trim getFeed query fragment' (#237) from loewy/trim-get-feed-query-fragment into master
Reviewed-on: #237
2026-04-29 20:26:40 +00:00
bc1ff66467 trim uncessary requested fields
All checks were successful
Tests / Tests (pull_request) Successful in 38s
2026-04-28 12:53:25 -07:00
ae37a3d9d9 Merge pull request 'Default getLongestRunsLeaderboard limit to 50' (#236) from dean/leaderboard-default-top-50 into master
Reviewed-on: #236
2026-04-24 00:01:23 +00:00
Dean Wenstrand
114b21400e Default getLongestRunsLeaderboard limit to 50
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 16:56:56 -07:00
4 changed files with 90 additions and 109 deletions

View File

@@ -224,6 +224,11 @@ export type CreateBucketSetInput = {
keyName: Scalars["String"]["input"]; keyName: Scalars["String"]["input"];
}; };
export type CreateCustomerPortalSessionResultGql = {
__typename?: "CreateCustomerPortalSessionResultGQL";
portalUrl: Scalars["String"]["output"];
};
export type CreateSubscriptionResultGql = { export type CreateSubscriptionResultGql = {
__typename?: "CreateSubscriptionResultGQL"; __typename?: "CreateSubscriptionResultGQL";
checkoutUrl: Scalars["String"]["output"]; checkoutUrl: Scalars["String"]["output"];
@@ -2373,6 +2378,7 @@ export type Mutation = {
commentOnVideo: Scalars["Boolean"]["output"]; commentOnVideo: Scalars["Boolean"]["output"];
createBucketSet: BucketSetGql; createBucketSet: BucketSetGql;
createChallenge: Challenge; createChallenge: Challenge;
createCustomerPortalSession: CreateCustomerPortalSessionResultGql;
createRuleSet: RuleSet; createRuleSet: RuleSet;
createSubscription: CreateSubscriptionResultGql; createSubscription: CreateSubscriptionResultGql;
createUploadStream: CreateUploadStreamReturn; createUploadStream: CreateUploadStreamReturn;
@@ -2451,6 +2457,10 @@ export type MutationCreateChallengeArgs = {
startDate: Scalars["DateTime"]["input"]; startDate: Scalars["DateTime"]["input"];
}; };
export type MutationCreateCustomerPortalSessionArgs = {
returnUrl?: InputMaybe<Scalars["String"]["input"]>;
};
export type MutationCreateRuleSetArgs = { export type MutationCreateRuleSetArgs = {
description?: InputMaybe<Scalars["String"]["input"]>; description?: InputMaybe<Scalars["String"]["input"]>;
name: Scalars["String"]["input"]; name: Scalars["String"]["input"];
@@ -2462,7 +2472,6 @@ export type MutationCreateSubscriptionArgs = {
export type MutationCreateUploadStreamArgs = { export type MutationCreateUploadStreamArgs = {
expectedDurationSeconds?: InputMaybe<Scalars["Float"]["input"]>; expectedDurationSeconds?: InputMaybe<Scalars["Float"]["input"]>;
uploadKind?: InputMaybe<UploadKindEnum>;
videoMetadata: VideoMetadataInput; videoMetadata: VideoMetadataInput;
}; };
@@ -2960,11 +2969,9 @@ export type QuotaStatusGql = {
durationLimitSeconds?: Maybe<Scalars["Int"]["output"]>; durationLimitSeconds?: Maybe<Scalars["Int"]["output"]>;
durationRemainingSeconds?: Maybe<Scalars["Float"]["output"]>; durationRemainingSeconds?: Maybe<Scalars["Float"]["output"]>;
durationUsedSeconds: Scalars["Float"]["output"]; durationUsedSeconds: Scalars["Float"]["output"];
importUploadPermission: UploadPermissionGql;
maxVideoDurationSeconds?: Maybe<Scalars["Int"]["output"]>; maxVideoDurationSeconds?: Maybe<Scalars["Int"]["output"]>;
periodEnd: Scalars["DateTime"]["output"]; periodEnd: Scalars["DateTime"]["output"];
periodStart: Scalars["DateTime"]["output"]; periodStart: Scalars["DateTime"]["output"];
recordingPermission: UploadPermissionGql;
tierName: Scalars["String"]["output"]; tierName: Scalars["String"]["output"];
}; };
@@ -3350,11 +3357,6 @@ export type UpdateShotAnnotationReturn = {
shot?: Maybe<ShotGql>; shot?: Maybe<ShotGql>;
}; };
export enum UploadKindEnum {
Import = "IMPORT",
Recording = "RECORDING",
}
export type UploadLink = { export type UploadLink = {
__typename?: "UploadLink"; __typename?: "UploadLink";
headers: Array<Maybe<Header>>; headers: Array<Maybe<Header>>;
@@ -3367,12 +3369,6 @@ export type UploadLinkGetProfileUploadLinkErrors =
export type UploadLinkGetUploadLinkErrors = GetUploadLinkErrors | UploadLink; export type UploadLinkGetUploadLinkErrors = GetUploadLinkErrors | UploadLink;
export type UploadPermissionGql = {
__typename?: "UploadPermissionGQL";
allowed: Scalars["Boolean"]["output"];
reason?: Maybe<Scalars["String"]["output"]>;
};
export type UploadSegmentGql = { export type UploadSegmentGql = {
__typename?: "UploadSegmentGQL"; __typename?: "UploadSegmentGQL";
durationInSeconds?: Maybe<Scalars["Float"]["output"]>; durationInSeconds?: Maybe<Scalars["Float"]["output"]>;
@@ -4111,15 +4107,11 @@ export type GetFeedQuery = {
id: number; id: number;
name?: string | null; name?: string | null;
screenshotUri?: string | null; screenshotUri?: string | null;
totalShotsMade: number;
totalShots: number; totalShots: number;
makePercentage: number; makePercentage: number;
averageTimeBetweenShots?: number | null; averageTimeBetweenShots?: number | null;
averageDifficulty?: number | null; averageDifficulty?: number | null;
createdAt?: any | null;
updatedAt?: any | null;
startTime?: any | null; startTime?: any | null;
endTime?: any | null;
private: boolean; private: boolean;
elapsedTime?: number | null; elapsedTime?: number | null;
tableSize: number; tableSize: number;
@@ -4134,26 +4126,13 @@ export type GetFeedQuery = {
__typename?: "UploadStreamGQL"; __typename?: "UploadStreamGQL";
id: string; id: string;
lastIntendedSegmentBound?: number | null; lastIntendedSegmentBound?: number | null;
isCompleted: boolean;
streamSegmentType: StreamSegmentTypeEnum; streamSegmentType: StreamSegmentTypeEnum;
} | null; } | null;
tags: Array<{ tags: Array<{ __typename?: "VideoTag"; name: string }>;
__typename?: "VideoTag";
name: string;
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
}>;
currentProcessing?: { currentProcessing?: {
__typename?: "VideoProcessingGQL"; __typename?: "VideoProcessingGQL";
id: number; id: number;
status: ProcessingStatusEnum; status: ProcessingStatusEnum;
errors: Array<{
__typename?: "VideoProcessingErrorGQL";
message: string;
}>;
statuses: Array<{
__typename?: "VideoProcessingStatusGQL";
status: ProcessingStatusEnum;
}>;
} | null; } | null;
reactions: Array<{ reactions: Array<{
__typename?: "ReactionGQL"; __typename?: "ReactionGQL";
@@ -4213,15 +4192,11 @@ export type VideoCardFieldsFragment = {
id: number; id: number;
name?: string | null; name?: string | null;
screenshotUri?: string | null; screenshotUri?: string | null;
totalShotsMade: number;
totalShots: number; totalShots: number;
makePercentage: number; makePercentage: number;
averageTimeBetweenShots?: number | null; averageTimeBetweenShots?: number | null;
averageDifficulty?: number | null; averageDifficulty?: number | null;
createdAt?: any | null;
updatedAt?: any | null;
startTime?: any | null; startTime?: any | null;
endTime?: any | null;
private: boolean; private: boolean;
elapsedTime?: number | null; elapsedTime?: number | null;
tableSize: number; tableSize: number;
@@ -4236,23 +4211,13 @@ export type VideoCardFieldsFragment = {
__typename?: "UploadStreamGQL"; __typename?: "UploadStreamGQL";
id: string; id: string;
lastIntendedSegmentBound?: number | null; lastIntendedSegmentBound?: number | null;
isCompleted: boolean;
streamSegmentType: StreamSegmentTypeEnum; streamSegmentType: StreamSegmentTypeEnum;
} | null; } | null;
tags: Array<{ tags: Array<{ __typename?: "VideoTag"; name: string }>;
__typename?: "VideoTag";
name: string;
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
}>;
currentProcessing?: { currentProcessing?: {
__typename?: "VideoProcessingGQL"; __typename?: "VideoProcessingGQL";
id: number; id: number;
status: ProcessingStatusEnum; status: ProcessingStatusEnum;
errors: Array<{ __typename?: "VideoProcessingErrorGQL"; message: string }>;
statuses: Array<{
__typename?: "VideoProcessingStatusGQL";
status: ProcessingStatusEnum;
}>;
} | null; } | null;
reactions: Array<{ reactions: Array<{
__typename?: "ReactionGQL"; __typename?: "ReactionGQL";
@@ -4326,15 +4291,11 @@ export type GetVideoFeedQuery = {
id: number; id: number;
name?: string | null; name?: string | null;
screenshotUri?: string | null; screenshotUri?: string | null;
totalShotsMade: number;
totalShots: number; totalShots: number;
makePercentage: number; makePercentage: number;
averageTimeBetweenShots?: number | null; averageTimeBetweenShots?: number | null;
averageDifficulty?: number | null; averageDifficulty?: number | null;
createdAt?: any | null;
updatedAt?: any | null;
startTime?: any | null; startTime?: any | null;
endTime?: any | null;
private: boolean; private: boolean;
elapsedTime?: number | null; elapsedTime?: number | null;
tableSize: number; tableSize: number;
@@ -4349,26 +4310,13 @@ export type GetVideoFeedQuery = {
__typename?: "UploadStreamGQL"; __typename?: "UploadStreamGQL";
id: string; id: string;
lastIntendedSegmentBound?: number | null; lastIntendedSegmentBound?: number | null;
isCompleted: boolean;
streamSegmentType: StreamSegmentTypeEnum; streamSegmentType: StreamSegmentTypeEnum;
} | null; } | null;
tags: Array<{ tags: Array<{ __typename?: "VideoTag"; name: string }>;
__typename?: "VideoTag";
name: string;
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
}>;
currentProcessing?: { currentProcessing?: {
__typename?: "VideoProcessingGQL"; __typename?: "VideoProcessingGQL";
id: number; id: number;
status: ProcessingStatusEnum; status: ProcessingStatusEnum;
errors: Array<{
__typename?: "VideoProcessingErrorGQL";
message: string;
}>;
statuses: Array<{
__typename?: "VideoProcessingStatusGQL";
status: ProcessingStatusEnum;
}>;
} | null; } | null;
reactions: Array<{ reactions: Array<{
__typename?: "ReactionGQL"; __typename?: "ReactionGQL";
@@ -4763,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<{ export type GetAvailableSubscriptionOptionsQueryVariables = Exact<{
[key: string]: never; [key: string]: never;
}>; }>;
@@ -6533,41 +6493,26 @@ export const VideoCardFieldsFragmentDoc = gql`
} }
name name
screenshotUri screenshotUri
totalShotsMade
totalShots totalShots
makePercentage makePercentage
averageTimeBetweenShots averageTimeBetweenShots
averageDifficulty averageDifficulty
createdAt
updatedAt
startTime startTime
endTime
private private
elapsedTime elapsedTime
screenshotUri
stream { stream {
id id
lastIntendedSegmentBound lastIntendedSegmentBound
isCompleted
streamSegmentType streamSegmentType
} }
tableSize tableSize
pocketSize pocketSize
tags { tags {
tagClasses {
name
}
name name
} }
currentProcessing { currentProcessing {
id id
errors {
message
}
status status
statuses {
status
}
} }
reactions { reactions {
videoId videoId
@@ -9666,6 +9611,57 @@ export type CreateSubscriptionMutationOptions = Apollo.BaseMutationOptions<
CreateSubscriptionMutation, CreateSubscriptionMutation,
CreateSubscriptionMutationVariables 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` export const GetAvailableSubscriptionOptionsDocument = gql`
query GetAvailableSubscriptionOptions { query GetAvailableSubscriptionOptions {
getAvailableSubscriptionOptions { getAvailableSubscriptionOptions {

View File

@@ -31,41 +31,26 @@ fragment VideoCardFields on VideoGQL {
} }
name name
screenshotUri screenshotUri
totalShotsMade
totalShots totalShots
makePercentage makePercentage
averageTimeBetweenShots averageTimeBetweenShots
averageDifficulty averageDifficulty
createdAt
updatedAt
startTime startTime
endTime
private private
elapsedTime elapsedTime
screenshotUri
stream { stream {
id id
lastIntendedSegmentBound lastIntendedSegmentBound
isCompleted
streamSegmentType streamSegmentType
} }
tableSize tableSize
pocketSize pocketSize
tags { tags {
tagClasses {
name
}
name name
} }
currentProcessing { currentProcessing {
id id
errors {
message
}
status status
statuses {
status
}
} }
reactions { reactions {
videoId videoId

View File

@@ -20,6 +20,12 @@ mutation CreateSubscription($priceId: String!) {
} }
} }
mutation CreateCustomerPortalSession($returnUrl: String) {
createCustomerPortalSession(returnUrl: $returnUrl) {
portalUrl
}
}
query GetAvailableSubscriptionOptions { query GetAvailableSubscriptionOptions {
getAvailableSubscriptionOptions { getAvailableSubscriptionOptions {
products { products {

View File

@@ -28,7 +28,7 @@ type Query {
getLongestRunsLeaderboard( getLongestRunsLeaderboard(
interval: TimeInterval = null interval: TimeInterval = null
when: DateTime = null when: DateTime = null
limit: Int! = 100 limit: Int! = 50
requiredTags: [String!] = null requiredTags: [String!] = null
): RunLeaderboardGQL! ): RunLeaderboardGQL!
getMakesLeaderboard( getMakesLeaderboard(
@@ -998,17 +998,10 @@ type QuotaStatusGQL {
durationUsedSeconds: Float! durationUsedSeconds: Float!
durationLimitSeconds: Int durationLimitSeconds: Int
maxVideoDurationSeconds: Int maxVideoDurationSeconds: Int
recordingPermission: UploadPermissionGQL!
importUploadPermission: UploadPermissionGQL!
durationRemainingSeconds: Float durationRemainingSeconds: Float
canUpload: Boolean! canUpload: Boolean!
} }
type UploadPermissionGQL {
allowed: Boolean!
reason: String
}
type UserPlayTimeGQL { type UserPlayTimeGQL {
totalSeconds: Float! totalSeconds: Float!
} }
@@ -1124,6 +1117,9 @@ type Mutation {
ensureStripeCustomerExists: UserGQL! ensureStripeCustomerExists: UserGQL!
deleteUser: Boolean! deleteUser: Boolean!
createSubscription(priceId: String!): CreateSubscriptionResultGQL! createSubscription(priceId: String!): CreateSubscriptionResultGQL!
createCustomerPortalSession(
returnUrl: String = null
): CreateCustomerPortalSessionResultGQL!
cancelSubscription: UserSubscriptionStatusGQL! cancelSubscription: UserSubscriptionStatusGQL!
grantManualEntitlement( grantManualEntitlement(
userId: Int! userId: Int!
@@ -1141,7 +1137,6 @@ type Mutation {
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream( createUploadStream(
videoMetadata: VideoMetadataInput! videoMetadata: VideoMetadataInput!
uploadKind: UploadKindEnum = null
expectedDurationSeconds: Float = null expectedDurationSeconds: Float = null
): CreateUploadStreamReturn! ): CreateUploadStreamReturn!
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn! getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
@@ -1264,6 +1259,10 @@ type CreateSubscriptionResultGQL {
sessionId: String! sessionId: String!
} }
type CreateCustomerPortalSessionResultGQL {
portalUrl: String!
}
enum CancellationReasonEnum { enum CancellationReasonEnum {
DONT_PLAY_ENOUGH DONT_PLAY_ENOUGH
TOO_EXPENSIVE TOO_EXPENSIVE
@@ -1310,11 +1309,6 @@ input VideoResolution {
height: Int! height: Int!
} }
enum UploadKindEnum {
RECORDING
IMPORT
}
type GetUploadLinkReturn { type GetUploadLinkReturn {
value: UploadLinkGetUploadLinkErrors! value: UploadLinkGetUploadLinkErrors!
stream: UploadStreamGQL stream: UploadStreamGQL