Merge pull request 'add createSubscription' (#191) from loewy/create-checkout-session into master

Reviewed-on: #191
This commit is contained in:
Ivan Malison 2025-07-09 07:57:38 -06:00
commit f5177a877c
2 changed files with 66 additions and 6 deletions

View File

@ -164,6 +164,12 @@ export type CreateBucketSetInput = {
keyName: Scalars["String"]["input"];
};
export type CreateSubscriptionResultGql = {
__typename?: "CreateSubscriptionResultGQL";
checkoutUrl: Scalars["String"]["output"];
sessionId: Scalars["String"]["output"];
};
export type CreateUploadStreamReturn = {
__typename?: "CreateUploadStreamReturn";
videoId: Scalars["Int"]["output"];
@ -2272,6 +2278,7 @@ export type Mutation = {
addAnnotationToShot: AddShotAnnotationReturn;
commentOnVideo: Scalars["Boolean"]["output"];
createBucketSet: BucketSetGql;
createSubscription: CreateSubscriptionResultGql;
createUploadStream: CreateUploadStreamReturn;
deleteComment: Scalars["Boolean"]["output"];
deleteTags: Scalars["Boolean"]["output"];
@ -2311,6 +2318,10 @@ export type MutationCreateBucketSetArgs = {
params: CreateBucketSetInput;
};
export type MutationCreateSubscriptionArgs = {
priceId: Scalars["String"]["input"];
};
export type MutationCreateUploadStreamArgs = {
videoMetadata: VideoMetadataInput;
};
@ -2492,6 +2503,7 @@ export type Query = {
__typename?: "Query";
doesUsernameExist: Scalars["Boolean"]["output"];
getAggregatedShotMetrics: Array<AggregateResultGql>;
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGql;
getBucketSet?: Maybe<BucketSetGql>;
getDeployedConfig: DeployedConfigGql;
getFeedVideos: VideoHistoryGql;
@ -2917,6 +2929,31 @@ export enum StreamSegmentTypeEnum {
RbChunkedMp4 = "RB_CHUNKED_MP4",
}
export type StripePriceGql = {
__typename?: "StripePriceGQL";
active: Scalars["Boolean"]["output"];
currency: Scalars["String"]["output"];
id: Scalars["String"]["output"];
recurringInterval?: Maybe<Scalars["String"]["output"]>;
recurringIntervalCount?: Maybe<Scalars["Int"]["output"]>;
type: Scalars["String"]["output"];
unitAmount?: Maybe<Scalars["Int"]["output"]>;
};
export type StripeProductGql = {
__typename?: "StripeProductGQL";
active: Scalars["Boolean"]["output"];
description?: Maybe<Scalars["String"]["output"]>;
id: Scalars["String"]["output"];
name: Scalars["String"]["output"];
prices: Array<StripePriceGql>;
};
export type StripeSubscriptionOptionsGql = {
__typename?: "StripeSubscriptionOptionsGQL";
products: Array<StripeProductGql>;
};
export type SuccessfulAdd = {
__typename?: "SuccessfulAdd";
value: Scalars["Boolean"]["output"];
@ -3163,11 +3200,8 @@ export type VideoProcessingErrorGql = {
export type VideoProcessingGql = {
__typename?: "VideoProcessingGQL";
currentSegment?: Maybe<Scalars["Int"]["output"]>;
errors: Array<VideoProcessingErrorGql>;
framesProcessed?: Maybe<Scalars["Int"]["output"]>;
id: Scalars["Int"]["output"];
progressPercentage?: Maybe<Scalars["Float"]["output"]>;
status: ProcessingStatusEnum;
statuses: Array<VideoProcessingStatusGql>;
};

View File

@ -81,6 +81,7 @@ type Query {
limit: Int = 100
after: String = null
): UserRelationshipsResult!
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
getUserVideos(
userId: Int = null
@ -568,9 +569,6 @@ type VideoProcessingGQL {
errors: [VideoProcessingErrorGQL!]!
status: ProcessingStatusEnum!
statuses: [VideoProcessingStatusGQL!]!
framesProcessed: Int
currentSegment: Int
progressPercentage: Float
}
type VideoProcessingErrorGQL {
@ -826,6 +824,28 @@ type UserRelationship {
toUserIsFollowedBy: Boolean!
}
type StripeSubscriptionOptionsGQL {
products: [StripeProductGQL!]!
}
type StripeProductGQL {
id: String!
name: String!
description: String
active: Boolean!
prices: [StripePriceGQL!]!
}
type StripePriceGQL {
id: String!
currency: String!
unitAmount: Int
recurringInterval: String
recurringIntervalCount: Int
type: String!
active: Boolean!
}
type UserPlayTimeGQL {
totalSeconds: Float!
}
@ -883,6 +903,7 @@ type Mutation {
unfollowUser(followedUserId: Int!): UserGQL!
retireTags(tagIds: [Int!]!): Boolean!
ensureStripeCustomerExists: UserGQL!
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream(
videoMetadata: VideoMetadataInput!
@ -992,6 +1013,11 @@ input EditUserInputGQL {
videosPrivateByDefault: Boolean = null
}
type CreateSubscriptionResultGQL {
checkoutUrl: String!
sessionId: String!
}
type CreateUploadStreamReturn {
videoId: Int!
}