Compare commits
57 Commits
ivan/remov
...
loewy/incl
| Author | SHA1 | Date | |
|---|---|---|---|
| cdf438c089 | |||
| 7dbfadf13a | |||
| a74a11e789 | |||
| 3b2f88c0e0 | |||
| a3ac769cd4 | |||
| 00fc2ab44b | |||
| 58ab272289 | |||
| 242afae92b | |||
| 6bf597a2ec | |||
|
|
aac9879afc | ||
| 5c62d45068 | |||
| a7649351b3 | |||
| 051555f9fc | |||
| d7bbe882b7 | |||
| e783050a02 | |||
| d8ee83c627 | |||
| d32cd87a60 | |||
| b956cfe0f9 | |||
| 3f520a0331 | |||
| a563834269 | |||
| 80a5bded47 | |||
| 16d8510465 | |||
| 9b21ce1e3a | |||
| dde4cfd99b | |||
| 845fb361b9 | |||
| 9f5fcc066e | |||
| dfb0361e12 | |||
| 77477d63db | |||
| 01fb113e1c | |||
| c660ed54cd | |||
| b5fd2e2183 | |||
| ddee57f4c2 | |||
| a497abd44d | |||
| 49d43b2703 | |||
| 99f8968a36 | |||
| 76a98aa0c3 | |||
| f5177a877c | |||
| 6685849cc2 | |||
| 567cbc549c | |||
| 2b43493a4f | |||
| 358eee2e16 | |||
| a1d3d776aa | |||
| 82af3a3ce9 | |||
| 7b51c317ca | |||
| 04f1bb4d74 | |||
| fbd7c2020b | |||
| c0636a8863 | |||
| 7302d6b8b6 | |||
| 492178455c | |||
| 55a2edb042 | |||
| 31cf492889 | |||
| de7dc675a1 | |||
| f8f00d9c24 | |||
| dc207bce55 | |||
| 2e5b8d2563 | |||
| 46bcd08ae1 | |||
| bd383b1d55 |
1385
src/index.tsx
1385
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,14 @@ query getDeployedConfig {
|
|||||||
environment
|
environment
|
||||||
firebase
|
firebase
|
||||||
minimumAllowedAppVersion
|
minimumAllowedAppVersion
|
||||||
|
subscriptionGatingEnabled
|
||||||
|
bannerMessages {
|
||||||
|
color
|
||||||
|
dismissible
|
||||||
|
id
|
||||||
|
kind
|
||||||
|
message
|
||||||
|
priority
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
src/operations/content-moderation.gql
Normal file
15
src/operations/content-moderation.gql
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
mutation blockContent($videoId: Int!) {
|
||||||
|
blockContent(videoId: $videoId)
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation blockUser($userId: Int!) {
|
||||||
|
blockUser(userId: $userId)
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation reportContent(
|
||||||
|
$videoId: Int!
|
||||||
|
$reason: ReportReasonEnum!
|
||||||
|
$customReason: String = null
|
||||||
|
) {
|
||||||
|
reportContent(videoId: $videoId, reason: $reason, customReason: $customReason)
|
||||||
|
}
|
||||||
58
src/operations/notifications.gql
Normal file
58
src/operations/notifications.gql
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
query GetNotifications(
|
||||||
|
$limit: Int! = 20
|
||||||
|
$offset: Int! = 0
|
||||||
|
$filters: NotificationFilters = null
|
||||||
|
) {
|
||||||
|
notifications(limit: $limit, offset: $offset, filters: $filters) {
|
||||||
|
notifications {
|
||||||
|
...Notification
|
||||||
|
}
|
||||||
|
totalCount
|
||||||
|
unreadCount
|
||||||
|
hasMore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetUnreadNotificationCount {
|
||||||
|
unreadNotificationCount
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation MarkNotificationAsRead($notificationId: Int!) {
|
||||||
|
markNotificationAsRead(notificationId: $notificationId)
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation MarkNotificationsAsRead($notificationIds: [Int!]!) {
|
||||||
|
markNotificationsAsRead(notificationIds: $notificationIds)
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation MarkAllNotificationsAsRead {
|
||||||
|
markAllNotificationsAsRead
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation DeleteNotification($notificationId: Int!) {
|
||||||
|
deleteNotification(notificationId: $notificationId)
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment Notification on NotificationGQL {
|
||||||
|
id
|
||||||
|
notificationType
|
||||||
|
actor {
|
||||||
|
id
|
||||||
|
username
|
||||||
|
profileImageUri
|
||||||
|
}
|
||||||
|
videoId
|
||||||
|
comment {
|
||||||
|
id
|
||||||
|
message
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
username
|
||||||
|
profileImageUri
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reactionType
|
||||||
|
isRead
|
||||||
|
createdAt
|
||||||
|
readAt
|
||||||
|
}
|
||||||
65
src/operations/payments.gql
Normal file
65
src/operations/payments.gql
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
mutation EnsureStripeCustomerExists {
|
||||||
|
ensureStripeCustomerExists {
|
||||||
|
id
|
||||||
|
firebaseUid
|
||||||
|
username
|
||||||
|
stripeCustomerId
|
||||||
|
profileImageUri
|
||||||
|
isAdmin
|
||||||
|
fargoRating
|
||||||
|
videosPrivateByDefault
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation CreateSubscription($priceId: String!) {
|
||||||
|
createSubscription(priceId: $priceId) {
|
||||||
|
checkoutUrl
|
||||||
|
sessionId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetAvailableSubscriptionOptions {
|
||||||
|
getAvailableSubscriptionOptions {
|
||||||
|
products {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
description
|
||||||
|
active
|
||||||
|
prices {
|
||||||
|
id
|
||||||
|
currency
|
||||||
|
unitAmount
|
||||||
|
recurringInterval
|
||||||
|
recurringIntervalCount
|
||||||
|
type
|
||||||
|
active
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetSubscriptionStatus {
|
||||||
|
getUserSubscriptionStatus {
|
||||||
|
hasActiveSubscription
|
||||||
|
subscriptionStatus
|
||||||
|
currentPeriodStart
|
||||||
|
currentPeriodEnd
|
||||||
|
validUntil
|
||||||
|
stripePriceId
|
||||||
|
stripeSubscriptionId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation CancelSubscription {
|
||||||
|
cancelSubscription {
|
||||||
|
hasActiveSubscription
|
||||||
|
subscriptionStatus
|
||||||
|
currentPeriodStart
|
||||||
|
currentPeriodEnd
|
||||||
|
validUntil
|
||||||
|
stripePriceId
|
||||||
|
stripeSubscriptionId
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -191,6 +191,9 @@ fragment ShotWithAllFeatures on ShotGQL {
|
|||||||
id
|
id
|
||||||
streamSegmentType
|
streamSegmentType
|
||||||
}
|
}
|
||||||
|
playlist {
|
||||||
|
segmentDurations
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,12 +140,14 @@ mutation editUser(
|
|||||||
$username: String
|
$username: String
|
||||||
$fargoRating: Int
|
$fargoRating: Int
|
||||||
$videosPrivateByDefault: Boolean
|
$videosPrivateByDefault: Boolean
|
||||||
|
$agreesToMarketing: Boolean
|
||||||
) {
|
) {
|
||||||
editUser(
|
editUser(
|
||||||
input: {
|
input: {
|
||||||
username: $username
|
username: $username
|
||||||
fargoRating: $fargoRating
|
fargoRating: $fargoRating
|
||||||
videosPrivateByDefault: $videosPrivateByDefault
|
videosPrivateByDefault: $videosPrivateByDefault
|
||||||
|
agreesToMarketing: $agreesToMarketing
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
@@ -154,9 +156,14 @@ mutation editUser(
|
|||||||
fargoRating
|
fargoRating
|
||||||
updatedAt
|
updatedAt
|
||||||
videosPrivateByDefault
|
videosPrivateByDefault
|
||||||
|
agreesToMarketing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutation deleteUser {
|
||||||
|
deleteUser
|
||||||
|
}
|
||||||
|
|
||||||
fragment UserFragment on UserGQL {
|
fragment UserFragment on UserGQL {
|
||||||
id
|
id
|
||||||
firebaseUid
|
firebaseUid
|
||||||
@@ -168,4 +175,5 @@ fragment UserFragment on UserGQL {
|
|||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
videosPrivateByDefault
|
videosPrivateByDefault
|
||||||
|
agreesToMarketing
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,6 +97,9 @@ query GetVideoSocialDetailsById($videoId: Int!) {
|
|||||||
getVideo(videoId: $videoId) {
|
getVideo(videoId: $videoId) {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
screenshotUri
|
||||||
|
makePercentage
|
||||||
|
totalShots
|
||||||
owner {
|
owner {
|
||||||
id
|
id
|
||||||
firebaseUid
|
firebaseUid
|
||||||
|
|||||||
140
src/schema.gql
140
src/schema.gql
@@ -28,6 +28,12 @@ type Query {
|
|||||||
when: DateTime = null
|
when: DateTime = null
|
||||||
): CountLeaderboardGQL!
|
): CountLeaderboardGQL!
|
||||||
getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL!
|
getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL!
|
||||||
|
notifications(
|
||||||
|
limit: Int! = 20
|
||||||
|
offset: Int! = 0
|
||||||
|
filters: NotificationFilters = null
|
||||||
|
): NotificationConnection!
|
||||||
|
unreadNotificationCount: Int!
|
||||||
getRuns(
|
getRuns(
|
||||||
filterInput: RunFilterInput!
|
filterInput: RunFilterInput!
|
||||||
runIds: [Int!] = null
|
runIds: [Int!] = null
|
||||||
@@ -70,12 +76,19 @@ type Query {
|
|||||||
limit: Int = null
|
limit: Int = null
|
||||||
after: String = null
|
after: String = null
|
||||||
): [String!]!
|
): [String!]!
|
||||||
|
getUsersMatching(
|
||||||
|
matchString: String = null
|
||||||
|
limit: Int = null
|
||||||
|
after: String = null
|
||||||
|
): [UserGQL!]!
|
||||||
getUserRelationshipsMatching(
|
getUserRelationshipsMatching(
|
||||||
userId: Int!
|
userId: Int!
|
||||||
matchString: String = null
|
matchString: String = null
|
||||||
limit: Int = 100
|
limit: Int = 100
|
||||||
after: String = null
|
after: String = null
|
||||||
): UserRelationshipsResult!
|
): UserRelationshipsResult!
|
||||||
|
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
|
||||||
|
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
|
||||||
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
||||||
getUserVideos(
|
getUserVideos(
|
||||||
userId: Int = null
|
userId: Int = null
|
||||||
@@ -291,11 +304,29 @@ type DeployedConfigGQL {
|
|||||||
devMode: Boolean!
|
devMode: Boolean!
|
||||||
environment: String!
|
environment: String!
|
||||||
minimumAllowedAppVersion: String!
|
minimumAllowedAppVersion: String!
|
||||||
|
subscriptionGatingEnabled: Boolean!
|
||||||
|
bannerMessages: [BannerGQL!]!
|
||||||
|
}
|
||||||
|
|
||||||
|
type BannerGQL {
|
||||||
|
id: Int!
|
||||||
|
message: String!
|
||||||
|
color: String!
|
||||||
|
kind: BannerKindEnum!
|
||||||
|
dismissible: Boolean!
|
||||||
|
priority: Int!
|
||||||
|
}
|
||||||
|
|
||||||
|
enum BannerKindEnum {
|
||||||
|
INFO
|
||||||
|
WARNING
|
||||||
|
ERROR
|
||||||
}
|
}
|
||||||
|
|
||||||
type VideoHistoryGQL {
|
type VideoHistoryGQL {
|
||||||
videos: [VideoGQL!]!
|
videos: [VideoGQL!]!
|
||||||
pageInfo: PageInfoGQL!
|
pageInfo: PageInfoGQL!
|
||||||
|
hasFollowing: Boolean!
|
||||||
}
|
}
|
||||||
|
|
||||||
type VideoGQL {
|
type VideoGQL {
|
||||||
@@ -335,10 +366,12 @@ type UserGQL {
|
|||||||
isAdmin: Boolean
|
isAdmin: Boolean
|
||||||
fargoRating: Int
|
fargoRating: Int
|
||||||
activeVideoId: Int
|
activeVideoId: Int
|
||||||
|
stripeCustomerId: String
|
||||||
profileImageUri: String
|
profileImageUri: String
|
||||||
createdAt: DateTime
|
createdAt: DateTime
|
||||||
updatedAt: DateTime
|
updatedAt: DateTime
|
||||||
videosPrivateByDefault: Boolean
|
videosPrivateByDefault: Boolean
|
||||||
|
agreesToMarketing: Boolean
|
||||||
following: [UserGQL!]
|
following: [UserGQL!]
|
||||||
followers: [UserGQL!]
|
followers: [UserGQL!]
|
||||||
}
|
}
|
||||||
@@ -546,6 +579,9 @@ type VideoProcessingGQL {
|
|||||||
errors: [VideoProcessingErrorGQL!]!
|
errors: [VideoProcessingErrorGQL!]!
|
||||||
status: ProcessingStatusEnum!
|
status: ProcessingStatusEnum!
|
||||||
statuses: [VideoProcessingStatusGQL!]!
|
statuses: [VideoProcessingStatusGQL!]!
|
||||||
|
framesProcessed: Int
|
||||||
|
currentSegment: Int
|
||||||
|
progressPercentage: Float
|
||||||
}
|
}
|
||||||
|
|
||||||
type VideoProcessingErrorGQL {
|
type VideoProcessingErrorGQL {
|
||||||
@@ -685,6 +721,37 @@ input MedalScope @oneOf {
|
|||||||
datetimeRange: DatetimeRangeAggregationInput
|
datetimeRange: DatetimeRangeAggregationInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type NotificationConnection {
|
||||||
|
notifications: [NotificationGQL!]!
|
||||||
|
totalCount: Int!
|
||||||
|
unreadCount: Int!
|
||||||
|
hasMore: Boolean!
|
||||||
|
}
|
||||||
|
|
||||||
|
type NotificationGQL {
|
||||||
|
id: Int!
|
||||||
|
notificationType: NotificationTypeEnum!
|
||||||
|
actor: UserGQL!
|
||||||
|
videoId: Int
|
||||||
|
comment: CommentGQL
|
||||||
|
reactionType: String
|
||||||
|
isRead: Boolean!
|
||||||
|
createdAt: DateTime!
|
||||||
|
readAt: DateTime
|
||||||
|
}
|
||||||
|
|
||||||
|
enum NotificationTypeEnum {
|
||||||
|
COMMENT
|
||||||
|
COMMENT_REPLY
|
||||||
|
REACTION
|
||||||
|
FOLLOW
|
||||||
|
}
|
||||||
|
|
||||||
|
input NotificationFilters {
|
||||||
|
isRead: Boolean = null
|
||||||
|
notificationTypes: [NotificationTypeEnum!] = null
|
||||||
|
}
|
||||||
|
|
||||||
type GetRunsResult {
|
type GetRunsResult {
|
||||||
runs: [RunGQL!]!
|
runs: [RunGQL!]!
|
||||||
count: Int
|
count: Int
|
||||||
@@ -801,6 +868,49 @@ type UserRelationship {
|
|||||||
toUserIsFollowedBy: Boolean!
|
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 UserSubscriptionStatusGQL {
|
||||||
|
hasActiveSubscription: Boolean!
|
||||||
|
subscriptionStatus: StripeSubscriptionStatusEnum
|
||||||
|
currentPeriodStart: DateTime
|
||||||
|
currentPeriodEnd: DateTime
|
||||||
|
validUntil: DateTime
|
||||||
|
stripePriceId: String
|
||||||
|
stripeSubscriptionId: String
|
||||||
|
}
|
||||||
|
|
||||||
|
enum StripeSubscriptionStatusEnum {
|
||||||
|
INCOMPLETE
|
||||||
|
INCOMPLETE_EXPIRED
|
||||||
|
TRIALING
|
||||||
|
ACTIVE
|
||||||
|
PAST_DUE
|
||||||
|
CANCELED
|
||||||
|
UNPAID
|
||||||
|
PAUSED
|
||||||
|
}
|
||||||
|
|
||||||
type UserPlayTimeGQL {
|
type UserPlayTimeGQL {
|
||||||
totalSeconds: Float!
|
totalSeconds: Float!
|
||||||
}
|
}
|
||||||
@@ -836,6 +946,17 @@ type Mutation {
|
|||||||
): Boolean!
|
): Boolean!
|
||||||
editComment(videoId: Int!, commentId: Int!, newMessage: String!): Boolean!
|
editComment(videoId: Int!, commentId: Int!, newMessage: String!): Boolean!
|
||||||
deleteComment(videoId: Int!, commentId: Int!): Boolean!
|
deleteComment(videoId: Int!, commentId: Int!): Boolean!
|
||||||
|
blockContent(videoId: Int!): Boolean!
|
||||||
|
blockUser(userId: Int!): Boolean!
|
||||||
|
reportContent(
|
||||||
|
videoId: Int!
|
||||||
|
reason: ReportReasonEnum!
|
||||||
|
customReason: String = null
|
||||||
|
): Boolean!
|
||||||
|
markNotificationAsRead(notificationId: Int!): Boolean!
|
||||||
|
markAllNotificationsAsRead: Boolean!
|
||||||
|
markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
|
||||||
|
deleteNotification(notificationId: Int!): Boolean!
|
||||||
addAnnotationToShot(
|
addAnnotationToShot(
|
||||||
shotId: Int!
|
shotId: Int!
|
||||||
annotationName: String!
|
annotationName: String!
|
||||||
@@ -857,6 +978,10 @@ type Mutation {
|
|||||||
followUser(followedUserId: Int!): UserGQL!
|
followUser(followedUserId: Int!): UserGQL!
|
||||||
unfollowUser(followedUserId: Int!): UserGQL!
|
unfollowUser(followedUserId: Int!): UserGQL!
|
||||||
retireTags(tagIds: [Int!]!): Boolean!
|
retireTags(tagIds: [Int!]!): Boolean!
|
||||||
|
ensureStripeCustomerExists: UserGQL!
|
||||||
|
deleteUser: Boolean!
|
||||||
|
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
||||||
|
cancelSubscription: UserSubscriptionStatusGQL!
|
||||||
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
||||||
createUploadStream(
|
createUploadStream(
|
||||||
videoMetadata: VideoMetadataInput!
|
videoMetadata: VideoMetadataInput!
|
||||||
@@ -879,6 +1004,15 @@ input CreateBucketSetInput {
|
|||||||
buckets: [BucketInputGQL!]!
|
buckets: [BucketInputGQL!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum ReportReasonEnum {
|
||||||
|
SPAM
|
||||||
|
NUDITY
|
||||||
|
VIOLENCE
|
||||||
|
HATE
|
||||||
|
COPYRIGHT
|
||||||
|
OTHER
|
||||||
|
}
|
||||||
|
|
||||||
type AddShotAnnotationReturn {
|
type AddShotAnnotationReturn {
|
||||||
value: SuccessfulAddAddShotAnnotationErrors!
|
value: SuccessfulAddAddShotAnnotationErrors!
|
||||||
}
|
}
|
||||||
@@ -964,6 +1098,12 @@ input EditUserInputGQL {
|
|||||||
username: String = null
|
username: String = null
|
||||||
fargoRating: Int = null
|
fargoRating: Int = null
|
||||||
videosPrivateByDefault: Boolean = null
|
videosPrivateByDefault: Boolean = null
|
||||||
|
agreesToMarketing: Boolean = null
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateSubscriptionResultGQL {
|
||||||
|
checkoutUrl: String!
|
||||||
|
sessionId: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
type CreateUploadStreamReturn {
|
type CreateUploadStreamReturn {
|
||||||
|
|||||||
Reference in New Issue
Block a user