Compare commits

..

29 Commits

Author SHA1 Message Date
b5a8e3eca7 add reaction count schema 2025-08-04 12:36:13 -07:00
01fb113e1c Merge pull request 'DeleteUser operation' (#195) from loewy/delete-user-operation into master
Reviewed-on: #195
2025-07-11 12:18:31 -06:00
c660ed54cd delete user mutation
All checks were successful
Tests / Tests (pull_request) Successful in 7s
2025-07-11 11:17:25 -07:00
b5fd2e2183 Merge pull request 'Create subscription' (#194) from loewy/add-stripe-stuff into master
Reviewed-on: #194
2025-07-09 12:45:03 -06:00
ddee57f4c2 create sub
All checks were successful
Tests / Tests (pull_request) Successful in 56s
2025-07-09 11:41:57 -07:00
49d43b2703 Merge pull request 'Create delete user' (#192) from kat/delete_user into master
Reviewed-on: #192
2025-07-09 12:04:03 -06:00
99f8968a36 Create delete user
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2025-07-09 11:37:25 -06:00
76a98aa0c3 Remove subscription stuff for now 2025-07-09 07:59:08 -06:00
f5177a877c Merge pull request 'add createSubscription' (#191) from loewy/create-checkout-session into master
Reviewed-on: #191
2025-07-09 07:57:38 -06:00
6685849cc2 add available subscription
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2025-07-08 16:40:12 -07:00
567cbc549c add createSubscription
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2025-07-08 16:20:14 -07:00
2b43493a4f Add processing progress fields 2025-07-08 14:12:15 -06:00
358eee2e16 Merge pull request 'Add getAvailableSubscriptionOptions & associated subscription types' (#190) from loewy/available-sub-options into master
Reviewed-on: #190
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2025-07-08 12:52:17 -06:00
a1d3d776aa add to schema
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2025-07-07 14:24:09 -07:00
82af3a3ce9 Merge pull request 'Add operation for ensureStripeCustomerExists' (#189) from loewy/ensure-customer-exists-operations into master
Reviewed-on: #189
2025-07-07 14:27:24 -06:00
7b51c317ca add operation for ensureStripeCustomerExists
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2025-07-07 13:12:36 -07:00
04f1bb4d74 Remove email param from ensureStripeCustomerExists 2025-07-06 16:20:49 -06:00
fbd7c2020b Merge pull request 'Add ensureStripeCustomerExists to schema' (#188) from loewy/get-stripe-customer-mutation into master
Reviewed-on: #188
2025-07-04 12:06:47 -06:00
c0636a8863 ensure stripe customer rename
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2025-07-03 19:43:21 -07:00
7302d6b8b6 get stripe customer mutation, add stripe_customer_id to user gql type
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2025-07-03 15:26:44 -07:00
492178455c Add getUsersMatching 2025-06-25 15:08:19 -07:00
55a2edb042 Merge pull request 'Add bannerMessages to getDeployedConfig operation' (#187) from loewy/banner-on-deployed-config-ops into master
Reviewed-on: #187
2025-06-13 11:19:59 -06:00
31cf492889 add bannerMessages to getDeployedConfig operation
All checks were successful
Tests / Tests (pull_request) Successful in 7s
2025-06-13 10:12:39 -07:00
de7dc675a1 Merge pull request 'Reverting config operation until BE deployed' (#186) from loewy/revert-config-operations into master
Reviewed-on: #186
2025-06-12 15:12:48 -06:00
f8f00d9c24 revert changes
All checks were successful
Tests / Tests (pull_request) Successful in 6s
2025-06-12 14:09:20 -07:00
dc207bce55 Merge pull request 'Add banners to config operations' (#185) from loewy/update-config-operations into master
Reviewed-on: #185
2025-06-12 14:30:17 -06:00
2e5b8d2563 add banners to config operations
All checks were successful
Tests / Tests (pull_request) Successful in 6s
2025-06-12 13:29:24 -07:00
46bcd08ae1 Merge pull request 'Add banner messages to DeployedConfigGql' (#184) from loewy/add-banner-to-config into master
Reviewed-on: #184
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2025-06-12 14:27:36 -06:00
bd383b1d55 add banner messages to deployedConfigGql
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2025-06-12 10:21:24 -07:00
6 changed files with 321 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ packages = [{include = "rbproto"}]
[tool.poetry.dependencies]
python = ">=3.10,<=3.13"
protobuf = "*"
protobuf = "^4.25.3"
[build-system]

View File

@@ -86,6 +86,22 @@ export type BankFeaturesGql = {
wallsHit: Array<WallTypeEnum>;
};
export type BannerGql = {
__typename?: "BannerGQL";
color: Scalars["String"]["output"];
dismissible: Scalars["Boolean"]["output"];
id: Scalars["Int"]["output"];
kind: BannerKindEnum;
message: Scalars["String"]["output"];
priority: Scalars["Int"]["output"];
};
export enum BannerKindEnum {
Error = "ERROR",
Info = "INFO",
Warning = "WARNING",
}
export type BoundingBoxGql = {
__typename?: "BoundingBoxGQL";
height: Scalars["Float"]["output"];
@@ -148,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"];
@@ -190,6 +212,7 @@ export type DatetimeRangeAggregationInput = {
export type DeployedConfigGql = {
__typename?: "DeployedConfigGQL";
allowNewUsers: Scalars["Boolean"]["output"];
bannerMessages: Array<BannerGql>;
devMode: Scalars["Boolean"]["output"];
environment: Scalars["String"]["output"];
firebase: Scalars["Boolean"]["output"];
@@ -2209,6 +2232,15 @@ export type IntPoint2DInput = {
y: Scalars["Int"]["input"];
};
export type IntRangeFilter = {
greaterThan?: InputMaybe<Scalars["Int"]["input"]>;
greaterThanEqualTo?: InputMaybe<Scalars["Int"]["input"]>;
greaterThanInclusive?: Scalars["Boolean"]["input"];
includeOnNone?: Scalars["Boolean"]["input"];
lessThan?: InputMaybe<Scalars["Int"]["input"]>;
lessThanInclusive?: Scalars["Boolean"]["input"];
};
export type MakePercentageIntervalGql = {
__typename?: "MakePercentageIntervalGQL";
elapsedTime: Scalars["Float"]["output"];
@@ -2255,15 +2287,18 @@ export type Mutation = {
addAnnotationToShot: AddShotAnnotationReturn;
commentOnVideo: Scalars["Boolean"]["output"];
createBucketSet: BucketSetGql;
createSubscription: CreateSubscriptionResultGql;
createUploadStream: CreateUploadStreamReturn;
deleteComment: Scalars["Boolean"]["output"];
deleteTags: Scalars["Boolean"]["output"];
deleteUser: Scalars["Boolean"]["output"];
deleteVideo: Scalars["Boolean"]["output"];
editComment: Scalars["Boolean"]["output"];
editProfileImageUri: UserGql;
editShot: EditShotReturn;
editUploadStream: Scalars["Boolean"]["output"];
editUser: UserGql;
ensureStripeCustomerExists: UserGql;
findPrerecordTableLayout?: Maybe<HomographyInfoGql>;
followUser: UserGql;
getHlsInitUploadLink: GetUploadLinkReturn;
@@ -2293,6 +2328,10 @@ export type MutationCreateBucketSetArgs = {
params: CreateBucketSetInput;
};
export type MutationCreateSubscriptionArgs = {
priceId: Scalars["String"]["input"];
};
export type MutationCreateUploadStreamArgs = {
videoMetadata: VideoMetadataInput;
};
@@ -2474,6 +2513,7 @@ export type Query = {
__typename?: "Query";
doesUsernameExist: Scalars["Boolean"]["output"];
getAggregatedShotMetrics: Array<AggregateResultGql>;
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGql;
getBucketSet?: Maybe<BucketSetGql>;
getDeployedConfig: DeployedConfigGql;
getFeedVideos: VideoHistoryGql;
@@ -2494,6 +2534,7 @@ export type Query = {
getUserTags: Array<TagGql>;
getUserVideos: VideoHistoryGql;
getUsernames: Array<Scalars["String"]["output"]>;
getUsersMatching: Array<UserGql>;
getVideo: VideoGql;
getVideoMakePercentageIntervals: Array<MakePercentageIntervalGql>;
getVideos: Array<VideoGql>;
@@ -2616,6 +2657,12 @@ export type QueryGetUsernamesArgs = {
matchString?: InputMaybe<Scalars["String"]["input"]>;
};
export type QueryGetUsersMatchingArgs = {
after?: InputMaybe<Scalars["String"]["input"]>;
limit?: InputMaybe<Scalars["Int"]["input"]>;
matchString?: InputMaybe<Scalars["String"]["input"]>;
};
export type QueryGetVideoArgs = {
debuggingJson?: InputMaybe<Scalars["JSON"]["input"]>;
videoId: Scalars["Int"]["input"];
@@ -2892,6 +2939,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"];
@@ -3017,6 +3089,7 @@ export type UserGql = {
id: Scalars["Int"]["output"];
isAdmin?: Maybe<Scalars["Boolean"]["output"]>;
profileImageUri?: Maybe<Scalars["String"]["output"]>;
stripeCustomerId?: Maybe<Scalars["String"]["output"]>;
updatedAt?: Maybe<Scalars["DateTime"]["output"]>;
username: Scalars["String"]["output"];
videosPrivateByDefault?: Maybe<Scalars["Boolean"]["output"]>;
@@ -3070,6 +3143,7 @@ export type VideoFilterInput = {
createdAt?: InputMaybe<DateRangeFilter>;
excludeVideosWithNoShots?: InputMaybe<Scalars["Boolean"]["input"]>;
isStreamCompleted?: InputMaybe<Scalars["Boolean"]["input"]>;
reactionCount?: InputMaybe<IntRangeFilter>;
requireCursorCompletion?: Scalars["Boolean"]["input"];
};
@@ -3137,8 +3211,11 @@ 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>;
};
@@ -3252,6 +3329,15 @@ export type GetDeployedConfigQuery = {
environment: string;
firebase: boolean;
minimumAllowedAppVersion: string;
bannerMessages: Array<{
__typename?: "BannerGQL";
color: string;
dismissible: boolean;
id: number;
kind: BannerKindEnum;
message: string;
priority: number;
}>;
};
};
@@ -3799,6 +3885,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<{
videoId: Scalars["Int"]["input"];
reaction?: InputMaybe<ReactionEnum>;
@@ -4614,6 +4721,13 @@ export type EditUserMutation = {
};
};
export type DeleteUserMutationVariables = Exact<{ [key: string]: never }>;
export type DeleteUserMutation = {
__typename?: "Mutation";
deleteUser: boolean;
};
export type UserFragmentFragment = {
__typename?: "UserGQL";
id: number;
@@ -5967,6 +6081,14 @@ export const GetDeployedConfigDocument = gql`
environment
firebase
minimumAllowedAppVersion
bannerMessages {
color
dismissible
id
kind
message
priority
}
}
}
`;
@@ -6598,6 +6720,65 @@ export type GetMedalsQueryResult = Apollo.QueryResult<
GetMedalsQuery,
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`
mutation ReactToVideo($videoId: Int!, $reaction: ReactionEnum) {
reactToVideo(videoId: $videoId, reaction: $reaction)
@@ -8568,6 +8749,53 @@ export type EditUserMutationOptions = Apollo.BaseMutationOptions<
EditUserMutation,
EditUserMutationVariables
>;
export const DeleteUserDocument = gql`
mutation deleteUser {
deleteUser
}
`;
export type DeleteUserMutationFn = Apollo.MutationFunction<
DeleteUserMutation,
DeleteUserMutationVariables
>;
/**
* __useDeleteUserMutation__
*
* To run a mutation, you first call `useDeleteUserMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDeleteUserMutation` 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 [deleteUserMutation, { data, loading, error }] = useDeleteUserMutation({
* variables: {
* },
* });
*/
export function useDeleteUserMutation(
baseOptions?: Apollo.MutationHookOptions<
DeleteUserMutation,
DeleteUserMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<DeleteUserMutation, DeleteUserMutationVariables>(
DeleteUserDocument,
options,
);
}
export type DeleteUserMutationHookResult = ReturnType<
typeof useDeleteUserMutation
>;
export type DeleteUserMutationResult =
Apollo.MutationResult<DeleteUserMutation>;
export type DeleteUserMutationOptions = Apollo.BaseMutationOptions<
DeleteUserMutation,
DeleteUserMutationVariables
>;
export const GetStreamMonitoringDetailsDocument = gql`
query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
getVideo(videoId: $videoId, debuggingJson: $debuggingJson) {

View File

@@ -5,5 +5,13 @@ query getDeployedConfig {
environment
firebase
minimumAllowedAppVersion
bannerMessages {
color
dismissible
id
kind
message
priority
}
}
}

View File

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

View File

@@ -157,6 +157,10 @@ mutation editUser(
}
}
mutation deleteUser {
deleteUser
}
fragment UserFragment on UserGQL {
id
firebaseUid

View File

@@ -70,12 +70,18 @@ type Query {
limit: Int = null
after: String = null
): [String!]!
getUsersMatching(
matchString: String = null
limit: Int = null
after: String = null
): [UserGQL!]!
getUserRelationshipsMatching(
userId: Int!
matchString: String = null
limit: Int = 100
after: String = null
): UserRelationshipsResult!
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
getUserVideos(
userId: Int = null
@@ -291,6 +297,22 @@ type DeployedConfigGQL {
devMode: Boolean!
environment: String!
minimumAllowedAppVersion: String!
bannerMessages: [BannerGQL!]!
}
type BannerGQL {
id: Int!
message: String!
color: String!
kind: BannerKindEnum!
dismissible: Boolean!
priority: Int!
}
enum BannerKindEnum {
INFO
WARNING
ERROR
}
type VideoHistoryGQL {
@@ -335,6 +357,7 @@ type UserGQL {
isAdmin: Boolean
fargoRating: Int
activeVideoId: Int
stripeCustomerId: String
profileImageUri: String
createdAt: DateTime
updatedAt: DateTime
@@ -546,6 +569,9 @@ type VideoProcessingGQL {
errors: [VideoProcessingErrorGQL!]!
status: ProcessingStatusEnum!
statuses: [VideoProcessingStatusGQL!]!
framesProcessed: Int
currentSegment: Int
progressPercentage: Float
}
type VideoProcessingErrorGQL {
@@ -611,6 +637,16 @@ input VideoFilterInput {
requireCursorCompletion: Boolean! = true
createdAt: DateRangeFilter = null
excludeVideosWithNoShots: Boolean = null
reactionCount: IntRangeFilter = null
}
input IntRangeFilter {
lessThan: Int = null
greaterThanEqualTo: Int = null
greaterThan: Int = null
includeOnNone: Boolean! = false
lessThanInclusive: Boolean! = false
greaterThanInclusive: Boolean! = true
}
input VideoFeedInputGQL @oneOf {
@@ -801,6 +837,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!
}
@@ -857,6 +915,9 @@ type Mutation {
followUser(followedUserId: Int!): UserGQL!
unfollowUser(followedUserId: Int!): UserGQL!
retireTags(tagIds: [Int!]!): Boolean!
ensureStripeCustomerExists: UserGQL!
deleteUser: Boolean!
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream(
videoMetadata: VideoMetadataInput!
@@ -966,6 +1027,11 @@ input EditUserInputGQL {
videosPrivateByDefault: Boolean = null
}
type CreateSubscriptionResultGQL {
checkoutUrl: String!
sessionId: String!
}
type CreateUploadStreamReturn {
videoId: Int!
}