Compare commits
21 Commits
dean/video
...
apple-iap-
| Author | SHA1 | Date | |
|---|---|---|---|
| fe95ab824e | |||
| 079e4e8719 | |||
| af68bc3c60 | |||
| f12d2c5a1b | |||
| 4e3f649a2c | |||
| 7cef75b2ca | |||
|
|
6d5cd9b1ed | ||
|
|
d59e21c10e | ||
| 9358205327 | |||
| 88634a32e9 | |||
| f7200a2e9f | |||
| 7d839c0fa6 | |||
| ab1e604871 | |||
| deb724b430 | |||
| c586bdf1a6 | |||
|
|
9250e4c639 | ||
| a12b3e1210 | |||
|
|
5cf2dbaf01 | ||
| 239a143554 | |||
|
|
296522afb8 | ||
| f42579076e |
798
src/index.tsx
798
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ query getDeployedConfig {
|
||||
firebase
|
||||
minimumAllowedAppVersion
|
||||
subscriptionGatingEnabled
|
||||
quotaEnforcementEnabled
|
||||
bannerMessages {
|
||||
color
|
||||
dismissible
|
||||
|
||||
@@ -101,6 +101,27 @@ query GetVideoFeedSessionCount(
|
||||
}
|
||||
}
|
||||
|
||||
# Minimal query for the Home recency nudge ("you haven't recorded in N days").
|
||||
# Only the most recent session's start time — avoids pulling the full
|
||||
# VideoCardFields payload (reactions, comments, player summaries, etc.).
|
||||
query GetLastSessionDate(
|
||||
$filters: VideoFilterInput = null
|
||||
$includePrivate: IncludePrivateEnum = MINE
|
||||
$feedInput: VideoFeedInputGQL = null
|
||||
) {
|
||||
getFeedVideos(
|
||||
limit: 1
|
||||
filters: $filters
|
||||
includePrivate: $includePrivate
|
||||
feedInput: $feedInput
|
||||
) {
|
||||
videos {
|
||||
id
|
||||
startTime
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideoFeed(
|
||||
$limit: Int! = 5
|
||||
$after: String = null
|
||||
|
||||
@@ -50,6 +50,9 @@ query GetAvailableSubscriptionOptions {
|
||||
query GetSubscriptionStatus {
|
||||
getUserSubscriptionStatus {
|
||||
hasActiveSubscription
|
||||
entitlementSource
|
||||
entitlementStartsAt
|
||||
entitlementEndsAt
|
||||
subscriptionStatus
|
||||
currentPeriodStart
|
||||
currentPeriodEnd
|
||||
@@ -59,9 +62,35 @@ query GetSubscriptionStatus {
|
||||
}
|
||||
}
|
||||
|
||||
query GetAppleAppAccountToken {
|
||||
getAppleAppAccountToken
|
||||
}
|
||||
|
||||
mutation SyncAppleSubscription($signedTransactionInfo: String!) {
|
||||
syncAppleSubscription(
|
||||
input: { signedTransactionInfo: $signedTransactionInfo }
|
||||
) {
|
||||
ok
|
||||
errorCode
|
||||
errorMessage
|
||||
hasActiveSubscription
|
||||
entitlementSource
|
||||
entitlementStartsAt
|
||||
entitlementEndsAt
|
||||
appleStatus
|
||||
originalTransactionId
|
||||
latestTransactionId
|
||||
productId
|
||||
expiresAt
|
||||
}
|
||||
}
|
||||
|
||||
mutation CancelSubscription {
|
||||
cancelSubscription {
|
||||
hasActiveSubscription
|
||||
entitlementSource
|
||||
entitlementStartsAt
|
||||
entitlementEndsAt
|
||||
subscriptionStatus
|
||||
currentPeriodStart
|
||||
currentPeriodEnd
|
||||
|
||||
@@ -8,6 +8,9 @@ fragment PlayerSummaryFields on PlayerSummaryGQL {
|
||||
totalShotsMade
|
||||
makePercentage
|
||||
score
|
||||
longestRun
|
||||
averageDifficulty
|
||||
averageTimeBetweenShots
|
||||
}
|
||||
|
||||
fragment PlayerClusterShotFields on PlayerClusterShotGQL {
|
||||
@@ -27,6 +30,8 @@ fragment PlayerClusterFields on PlayerClusterGQL {
|
||||
clusterId
|
||||
nShots
|
||||
userId
|
||||
username
|
||||
profileImageUri
|
||||
confirmed
|
||||
score
|
||||
shots {
|
||||
|
||||
@@ -132,6 +132,38 @@ query GetShotsByIds($ids: [Int!]!) {
|
||||
}
|
||||
}
|
||||
|
||||
# Lightweight clip boundaries for condensed session playback. The inline
|
||||
# session player only needs each shot's frame/time window to seek between
|
||||
# shots — this skips the heavy ShotWithAllFeatures payload (cue/pocketing
|
||||
# features, serialized shot paths, annotations, nested video/playlist). The
|
||||
# startTime/endTime @client resolvers derive their values from the frame
|
||||
# fields + the video (looked up internally), so this is all they require.
|
||||
fragment ShotClipRange on ShotGQL {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
startTime @client
|
||||
endTime @client
|
||||
}
|
||||
|
||||
query GetShotClipRanges(
|
||||
$filterInput: FilterInput!
|
||||
$shotsOrdering: GetShotsOrdering
|
||||
$limit: Int
|
||||
) {
|
||||
getOrderedShots(
|
||||
filterInput: $filterInput
|
||||
shotsOrdering: $shotsOrdering
|
||||
limit: $limit
|
||||
) {
|
||||
count
|
||||
shots {
|
||||
...ShotClipRange
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment ShotWithAllFeatures on ShotGQL {
|
||||
id
|
||||
videoId
|
||||
|
||||
@@ -49,6 +49,39 @@ query GetUserPlayTime($userId: Int!, $filters: VideoFilterInput) {
|
||||
}
|
||||
}
|
||||
|
||||
query GetUploadQuotaStatus {
|
||||
getQuotaStatus {
|
||||
tierName
|
||||
periodStart
|
||||
periodEnd
|
||||
durationUsedSeconds
|
||||
durationLimitSeconds
|
||||
maxVideoDurationSeconds
|
||||
durationRemainingSeconds
|
||||
canUpload
|
||||
importQuotaBuckets {
|
||||
quotaKey
|
||||
appliesToUploadKind
|
||||
periodStart
|
||||
periodEnd
|
||||
durationUsedSeconds
|
||||
durationLimitSeconds
|
||||
durationRemainingSeconds
|
||||
canUpload
|
||||
}
|
||||
recordingQuotaBuckets {
|
||||
quotaKey
|
||||
appliesToUploadKind
|
||||
periodStart
|
||||
periodEnd
|
||||
durationUsedSeconds
|
||||
durationLimitSeconds
|
||||
durationRemainingSeconds
|
||||
canUpload
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query getUsernames(
|
||||
$matchString: String!
|
||||
$limit: Int = null
|
||||
|
||||
@@ -139,6 +139,15 @@ query GetVideoSocialDetailsById($videoId: Int!) {
|
||||
}
|
||||
}
|
||||
|
||||
# Full card payload for a single video — reuses the same VideoCardFields
|
||||
# fragment the feed list uses, so the session-detail meta header shares one
|
||||
# source of truth (and the normalized Apollo cache) with the feed card.
|
||||
query GetVideoCard($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
...VideoCardFields
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideos($videoIds: [Int!]!) {
|
||||
getVideos(videoIds: $videoIds) {
|
||||
...VideoStreamMetadata
|
||||
|
||||
@@ -98,6 +98,7 @@ type Query {
|
||||
): UserRelationshipsResult!
|
||||
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
|
||||
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
|
||||
getAppleAppAccountToken: String!
|
||||
getQuotaStatus: QuotaStatusGQL!
|
||||
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
||||
getUserVideos(
|
||||
@@ -676,6 +677,9 @@ type PlayerSummaryGQL {
|
||||
totalShotsMade: Int!
|
||||
makePercentage: Float!
|
||||
score: Int
|
||||
longestRun: Int!
|
||||
averageDifficulty: Float
|
||||
averageTimeBetweenShots: Float
|
||||
}
|
||||
|
||||
type DeployedConfigGQL {
|
||||
@@ -685,6 +689,7 @@ type DeployedConfigGQL {
|
||||
environment: String!
|
||||
minimumAllowedAppVersion: String!
|
||||
subscriptionGatingEnabled: Boolean!
|
||||
quotaEnforcementEnabled: Boolean!
|
||||
bannerMessages: [BannerGQL!]!
|
||||
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
|
||||
bucketUrl: String!
|
||||
@@ -879,6 +884,8 @@ type PlayerClusterGQL {
|
||||
clusterId: Int!
|
||||
nShots: Int!
|
||||
userId: Int
|
||||
username: String
|
||||
profileImageUri: String
|
||||
confirmed: Boolean!
|
||||
score: Int
|
||||
shots: [PlayerClusterShotGQL!]!
|
||||
@@ -1014,6 +1021,7 @@ enum EntitlementSourceTypeEnum {
|
||||
ADMIN
|
||||
MANUAL
|
||||
STRIPE
|
||||
APPLE
|
||||
ALPHA_LEGACY
|
||||
}
|
||||
|
||||
@@ -1035,6 +1043,19 @@ type QuotaStatusGQL {
|
||||
durationUsedSeconds: Float!
|
||||
durationLimitSeconds: Int
|
||||
maxVideoDurationSeconds: Int
|
||||
importQuotaBuckets: [QuotaBucketStatusGQL!]!
|
||||
recordingQuotaBuckets: [QuotaBucketStatusGQL!]!
|
||||
durationRemainingSeconds: Float
|
||||
canUpload: Boolean!
|
||||
}
|
||||
|
||||
type QuotaBucketStatusGQL {
|
||||
quotaKey: String!
|
||||
appliesToUploadKind: String!
|
||||
periodStart: DateTime!
|
||||
periodEnd: DateTime!
|
||||
durationUsedSeconds: Float!
|
||||
durationLimitSeconds: Int
|
||||
durationRemainingSeconds: Float
|
||||
canUpload: Boolean!
|
||||
}
|
||||
@@ -1156,6 +1177,9 @@ type Mutation {
|
||||
retireTags(tagIds: [Int!]!): Boolean!
|
||||
ensureStripeCustomerExists: UserGQL!
|
||||
deleteUser: Boolean!
|
||||
syncAppleSubscription(
|
||||
input: SyncAppleSubscriptionInputGQL!
|
||||
): SyncAppleSubscriptionResultGQL!
|
||||
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
||||
createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
|
||||
cancelSubscription: UserSubscriptionStatusGQL!
|
||||
@@ -1309,6 +1333,26 @@ input EditUserInputGQL {
|
||||
agreesToMarketing: Boolean = null
|
||||
}
|
||||
|
||||
type SyncAppleSubscriptionResultGQL {
|
||||
ok: Boolean!
|
||||
errorCode: String
|
||||
errorMessage: String
|
||||
hasActiveSubscription: Boolean!
|
||||
entitlementSource: EntitlementSourceTypeEnum
|
||||
entitlementStartsAt: DateTime
|
||||
entitlementEndsAt: DateTime
|
||||
appleStatus: Int
|
||||
originalTransactionId: String
|
||||
latestTransactionId: String
|
||||
productId: String
|
||||
expiresAt: DateTime
|
||||
}
|
||||
|
||||
input SyncAppleSubscriptionInputGQL {
|
||||
signedTransactionInfo: String!
|
||||
signedRenewalInfo: String = null
|
||||
}
|
||||
|
||||
type CreateSubscriptionResultGQL {
|
||||
checkoutUrl: String!
|
||||
sessionId: String!
|
||||
|
||||
Reference in New Issue
Block a user