Compare commits

..

361 Commits

Author SHA1 Message Date
08183ed952 Merge pull request 'rename pkg to rbproto' (#8) from mk/fixing-rbproto into master
Reviewed-on: #8
2024-05-22 12:01:23 -06:00
4fac231c43 rename pkg to rbproto
All checks were successful
Tests / Tests (pull_request) Successful in 7s
2024-05-22 12:00:39 -06:00
30e356e3e0 Add Protobuf with Testing + Codegen (#7)
Reviewed-on: #7
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
Co-authored-by: Mike Kalange <countablecloud@gmail.com>
Co-committed-by: Mike Kalange <countablecloud@gmail.com>
2024-05-22 11:27:54 -06:00
36712557cb Merge pull request 'Add workflow' (#6) from ivan/add-workflow into master
Reviewed-on: #6
2024-05-21 14:34:15 -06:00
c6aeca7e2b Add workflow to check gql has been executed
All checks were successful
Tests / Tests (pull_request) Successful in 7s
2024-05-21 14:33:36 -06:00
92c18f8bf7 Add user to shot gql 2024-05-21 14:14:02 -06:00
e86f40c620 regenerate gql, fix type imports 2024-05-20 22:39:47 -07:00
072235f032 Create playlist, video generator and video player (#489)
Co-authored-by: Ivan Malison <IvanMalison@gmail.com>
Reviewed-on: railbird/railbird-mobile#489
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-05-20 21:52:38 -06:00
9b76a6b599 Surface errors in upload process w/ audio & text alert/prompt (#485)
CLOSES #480
CLOSES #93 (ground-work completed by @dean)

ADDRESSES #488 (will not show if recorded video is not active upload)

Reviewed-on: railbird/railbird-mobile#485
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
Co-authored-by: Loewy <loewymalkov@gmail.com>
Co-committed-by: Loewy <loewymalkov@gmail.com>
2024-05-20 19:05:10 -06:00
d94dbd6c03 Make startFrame endFrame required for Shot 2024-05-20 16:35:42 -06:00
b2db5bde2b remove operations 2024-05-15 09:39:28 -07:00
f8c5cf74f8 add currentProcessing and errors to schema/index and getStreamMonitoringDetails operation 2024-05-14 18:35:24 -07:00
231076496a use the same gql query for cursor management & polling 2024-05-09 19:05:05 -07:00
a1b3baa5c9 introduce lastIntendedSegmentBound to cursor management layer, method to checkAndHandleUploadCompletion 2024-05-09 19:05:05 -07:00
8378f7ae0b just gql stuff + use it on uncompletedStreams hook 2024-05-06 15:16:06 -07:00
d4b75bcb71 Require cursor completion 2024-05-02 22:08:57 -06:00
b0c7de2e92 use a map to create uploadProgress objects for the upload provider 2024-05-01 18:18:16 -07:00
844e218197 Show screenshots 2024-05-01 18:49:35 -06:00
a7c8e07eb7 Expose upload completion cursor 2024-05-01 17:39:52 -06:00
5d99ec7673 Add rudamentary difficulty score 2024-05-01 12:47:50 -06:00
2f92820895 Add upload to video gql 2024-04-30 21:55:48 -06:00
527113a099 Merge branch 'master' into mk/add-screenshot-uri 2024-04-29 17:23:26 -06:00
381b4ce0c2 Add screenshot uri to video 2024-04-29 17:19:39 -06:00
6d8f5d5d65 Upload Service Class (#436)
CLOSES #400

Reviewed-on: railbird/railbird-mobile#436
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
Co-authored-by: Loewy <loewymalkov@gmail.com>
Co-committed-by: Loewy <loewymalkov@gmail.com>
2024-04-25 17:32:52 -06:00
b74fb2b1d7 add lowest unuploaded segment to gql 2024-04-25 16:36:32 -06:00
d67b413860 Add two new gql properties to support upload service 2024-04-25 11:41:57 -06:00
ec1f5afb84 Merge pull request 'Restore cursor from api' (#424) from loewy/restore-cursor-state-from-api into master
Reviewed-on: railbird/railbird-mobile#424
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-04-23 21:22:35 -06:00
1ce4267945 Frames per second is float 2024-04-23 20:25:27 -06:00
Loewy
2da00ca814 Merge branch 'master' into loewy/restore-cursor-state-from-api 2024-04-23 15:36:37 -07:00
Loewy
f7c0dff73c remove feed, add method to videofilemanager 2024-04-23 13:21:54 -07:00
Loewy
422bb77f61 trim gql call, comments, plug in queries 2024-04-23 12:37:31 -07:00
Loewy
d51d2491ca new lighter weight queries 2024-04-23 11:49:42 -07:00
db39c5a576 Add generated api hooks 2024-04-22 22:20:59 -06:00
c6c5971325 Use relevant fields 2024-04-22 21:13:16 -06:00
5181612f62 Create get videos with playlist gql 2024-04-22 16:18:06 -06:00
Loewy
5f33fae3d7 scaffold + operations 2024-04-22 11:27:15 -07:00
24fcac9318 Expose upload cursor in video gql 2024-04-16 17:49:50 -06:00
514f2ef928 Add user to shot gql 2024-04-09 22:34:54 -06:00
7d252d3cc8 Add pull to refresh to video details page
Fixes #169
Fixes #363
2024-04-09 19:08:23 -06:00
a1581379fd Remove unused field from GetFeed operation 2024-04-05 16:29:35 -06:00
a5f90ab105 Rename video endpoint to getUserVideos 2024-04-05 15:51:51 -06:00
ddd7e2d50b Add devMode 2024-04-02 00:24:11 -06:00
3bacc356af Make tag classes optional 2024-04-01 18:04:54 -06:00
797ca3a387 Don't load shots in feed 2024-03-31 22:17:29 -06:00
ed751f5cdd Support multiple aggregation types in gql 2024-03-31 18:17:30 -06:00
01a580cee5 Merge pull request 'Use tag class and tag value input in FilterInput' (#312) from kat/temp into master
Reviewed-on: railbird/railbird-mobile#312
Reviewed-by: loewy <loewymalkov@gmail.com>
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-03-28 16:12:54 -06:00
6fd14d3c49 Use tag input 2024-03-28 15:20:39 -06:00
a1b524ab9d Remove float feature 2024-03-28 05:02:44 +00:00
9bd0e237ea Resolve comments 2024-03-27 18:48:04 -07:00
97d4f2cbe9 Add Hours Played 2024-03-27 12:35:44 -07:00
9307fbcbf4 Add getPlayTime endpoint, remove elapsedTime 2024-03-27 00:32:20 -06:00
679150326f Add elapsedTime to getUser gql operation 2024-03-26 16:53:03 -06:00
773a2eaed0 Merge branch 'master' into kat/add-bool-filter 2024-03-25 19:26:13 -06:00
203d343880 Process tags from a VideoGQL & use on VideoFeed (#293)
currently will select first item if multiple tags present for a given class

if we want to change the UI I can make it process & display multiple values for gameTypes/tableSizes, but as of now it's meant to handle a single one

CLOSES #288

Co-authored-by: Loewy <loewy@chainstarters.com>
Reviewed-on: railbird/railbird-mobile#293
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-03-25 19:25:48 -06:00
26ed50a7a1 Make filter is boolean filter 2024-03-25 19:18:06 -06:00
050705c370 Generalize terminateUploadStream into editUploadStream 2024-03-24 21:07:53 -06:00
d3c5979d3e Move homography history to video 2024-03-23 17:03:11 -06:00
8102a0f40b Add an operation to get details for updating a video
Fixes railbird/railbird#1164
2024-03-22 20:00:00 -06:00
87fabdc8f9 Add VideoMakePercentageIntervals call & connected to graph (#281)
should be tested after startTime/endTime is implemented to verify system works

CLOSES #1078

Co-authored-by: Loewy <loewy@chainstarters.com>
Reviewed-on: railbird/railbird-mobile#281
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-03-22 16:44:02 -06:00
Mike Kalange
7889476bc9 Remove deprecated statistics interface; add getLoggedInUser op. 2024-03-22 12:52:44 -06:00
abfaf06f1a Merge pull request 'Create game type filter' (#273) from kat/filter-game-type into master
Reviewed-on: railbird/railbird-mobile#273
Reviewed-by: loewy <loewymalkov@gmail.com>
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-03-20 12:53:21 -06:00
8bd9e039da Create game type filter 2024-03-19 21:02:49 -06:00
Loewy
5cfccb97b1 wip: set up AppConfig provider, use value in Login screen, update gql 2024-03-19 17:09:45 -07:00
Mike Kalange
54428112f8 adds get deployed configuration query 2024-03-18 16:46:23 -06:00
18c12e60fe Rename filters for consistency 2024-03-18 15:09:47 -06:00
1000eb6d2c Add make input filter 2024-03-17 22:33:52 -06:00
27114615a5 Do not return target metrics as list 2024-03-14 14:39:11 -06:00
43c1f7be09 Return elapsed time in make percentge time series gql 2024-03-14 12:57:31 -06:00
Mike Kalange
09bbbf0b3d Adds changes to schema for altering user profile image 2024-03-12 19:47:10 -06:00
Mike Kalange
2db886ea13 make index commensurate with operations 2024-03-12 13:06:14 -06:00
Mike Kalange
e88d875bd9 Delete video implemented on backend; schema changes 2024-03-12 12:50:28 -06:00
57c3ee0360 Use list int directly for user id input 2024-03-12 11:59:20 -06:00
e1600751e0 Add nix LD_LIBRARY_PATH fix 2024-03-11 21:52:15 -06:00
be47dcdba2 Add an overlay that shows streaming state 2024-03-10 18:16:41 -06:00
fd30ae04bf Add filtering support to aggregate gql 2024-03-09 10:21:43 -07:00
19628736c1 Add aggregation filter attributes 2024-03-09 00:59:13 -07:00
4ced3d39df Update gql for get-video resolver changes 2024-03-08 17:15:37 -07:00
be59f7a2c6 Support InListFilter GQL 2024-03-08 16:32:50 -07:00
1665cf1eb9 Create video id filter gql 2024-03-08 13:23:01 -07:00
47df3adce5 Update GetVideoMakePercentage query 2024-03-05 01:24:03 -07:00
f64fc0e54a Support make percentage time series 2024-03-05 01:05:54 -07:00
314957218e Require video metadata 2024-03-04 22:22:42 -07:00
babb111fa6 Update upload_stream and terminate_stream gql 2024-03-04 20:10:49 -07:00
Loewy
b051809869 update getUploadLink call with headers' 2024-03-04 17:20:11 -08:00
Mike Kalange
32ec7a2339 Adds headers to get link return 2024-03-04 17:48:59 -07:00
3bce7ea344 Add username 2024-02-25 14:25:54 -08:00
76ed63395c Use prettier when checking for changes 2024-02-22 20:02:47 -07:00
19f324a1cf Fix prettier 2024-02-22 19:27:29 -07:00
4b41d3b039 Change feed operation to use limit instead of first in cursor 2024-02-22 19:23:28 -07:00
2ce41be8cc Merge pull request 'ivan/use-subtree-for-railbird-gql' (#142) from ivan/use-subtree-for-railbird-gql into master
Reviewed-on: railbird/railbird-mobile#142
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-22 18:37:41 -07:00
c9f2187cc2 Run prettier on gql stuff 2024-02-22 18:36:15 -07:00
a47fb5fed7 Merge pull request 'Video Details -- UI w/ mocked data' (#136) from loewy/session-details into master
Reviewed-on: railbird/railbird-mobile#136
2024-02-22 18:11:07 -07:00
318a2a24fd Ignore 2024-02-22 18:01:42 -07:00
2224a8ccbd Remove after before 2024-02-22 18:00:52 -07:00
48e2bec9ce Elapsed time in seconds 2024-02-22 17:55:37 -07:00
6a1807efc8 Make created at, ended at optional 2024-02-22 17:13:46 -07:00
0ad6e63733 Make video name optional 2024-02-22 17:07:29 -07:00
6255e246e7 Merge pull request 'Remove @includes from feed' (#5) from kat/include into master
Reviewed-on: #5
2024-02-22 16:46:09 -07:00
808fae0480 Remove @includes from feed 2024-02-22 16:45:26 -07:00
Loewy
44d2402f4b componetize session 2024-02-22 11:24:18 -08:00
Loewy
7da14dbb6c back header types, transform-ignore-pattern & tidy up docs for imagefallback 2024-02-21 21:11:28 -08:00
cc597b3cfb Merge pull request 'Create gql feed' (#4) from kat/update-video-gql into master
Reviewed-on: #4
2024-02-21 19:18:20 -07:00
60af058ba4 Create feed 2024-02-21 19:13:30 -07:00
Loewy
608e784205 Merge branch 'master' into loewy/session-details 2024-02-21 17:58:56 -08:00
Loewy
36041dd41b make header component, clean up styles, scrollview + graph 2024-02-21 17:20:30 -08:00
17aee8f220 Drop frame count from videl gql 2024-02-21 17:54:00 -07:00
294198958d Merge pull request 'Fix nav param + rename to useRecordingDetails' (#132) from loewy/fix-nav-param into master
Reviewed-on: railbird/railbird-mobile#132
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-21 15:29:15 -07:00
Loewy
fe824f90ef add fix nav param and rename to useRecordingDetails for consistency 2024-02-21 13:48:09 -08:00
Loewy
a560ebdb70 revert gradle.properties/env.dev 2024-02-21 13:05:50 -08:00
63faa9397e Merge pull request 'renamed files to be consistent with naming paradigm of videos and recordings (removing references to sessions)' (#131) from rename-session-as-video into master
Reviewed-on: railbird/railbird-mobile#131
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-21 14:04:23 -07:00
4df6e51e82 renamed files and directories to get rid of session references 2024-02-21 12:39:58 -08:00
cef4119afa Merge pull request 'Create Session Card' (#126) from dean/session-card into master
Reviewed-on: railbird/railbird-mobile#126
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-20 22:25:11 -07:00
bee765714e cleanup comments 2024-02-20 20:53:29 -08:00
edff79abb6 kat/add-apollo-timeout (#128)
Reviewed-on: railbird/railbird-mobile#128
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-02-20 20:07:05 -07:00
Loewy
2505fc1bf7 make some components, almost done, need to do ui for notes/free play 2024-02-20 18:49:08 -08:00
d400434e89 Merge pull request 'Bump railbird-gql version' (#127) from ivan/bump-gql into master
Reviewed-on: railbird/railbird-mobile#127
2024-02-20 19:49:03 -07:00
4bd438d692 Bump railbird-gql version 2024-02-20 19:45:25 -07:00
828140ed2b Updates 2024-02-20 19:18:29 -07:00
9a2cae0c70 Add scripts for checking that graphql-codegen results in no changes 2024-02-20 19:18:29 -07:00
3a621b8323 fixed typescript error and properly dealt with new dependency 2024-02-20 17:24:18 -08:00
0360fb413c correct linter errors 2024-02-20 17:12:06 -08:00
5b86a0f6d9 fixed things for linter 2024-02-20 17:12:06 -08:00
24c14fb7ca added session feed page and session component with click to details 2024-02-20 17:12:06 -08:00
fbbcd51df5 added session-card component 2024-02-20 17:12:06 -08:00
5a9578d554 Merge pull request 'Orientation Context' (#124) from dean/orientation-context into master
Reviewed-on: railbird/railbird-mobile#124
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-02-20 18:00:00 -07:00
Loewy
5cb1069c1c wip 2024-02-20 16:17:21 -08:00
Loewy
0c8cad6608 revert changes to env & gradle.properties 2024-02-20 16:17:21 -08:00
Loewy
b865f78e22 wip: use react-native-modal, swipe close + scrollview for content 2024-02-20 16:17:21 -08:00
Loewy
bc7b066864 wip: tidy up styles, wireframed 2024-02-20 16:17:21 -08:00
Loewy
7b4af08296 rebase 2024-02-20 16:17:19 -08:00
c77bc476aa undo chat hallucination 2024-02-20 13:12:40 -08:00
b802bb01e6 best practices cleanup chats code review 2024-02-20 13:06:01 -08:00
61f9add741 deleted unnecessary comments 2024-02-20 12:50:34 -08:00
d8e9eef8b1 add orientation context 2024-02-20 12:36:20 -08:00
7bddeca783 Merge pull request 'Finalize recording' (#117) from loewy/finalize-video-flow into master
Reviewed-on: railbird/railbird-mobile#117
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-20 11:28:14 -07:00
Loewy
d03565ba26 remove log 2024-02-19 17:50:04 -08:00
Loewy
36fe81cb3e add permission error, issue with useState, await requestPermission 2024-02-19 17:49:23 -08:00
Loewy
f9edab8f36 rename isOpen to isDropdownOpen 2024-02-19 14:01:44 -08:00
Loewy
ffe95a12f2 useDropdown hook, review requests 2024-02-19 13:19:21 -08:00
Loewy
bcef200765 add ' to tableSize label 2024-02-19 09:51:47 -08:00
Loewy
dc0e3989d4 revert railbird-gql version to point to master 2024-02-19 09:51:47 -08:00
Loewy
b9f821652c seperate concerns, make hook for videoDetails 2024-02-19 09:51:47 -08:00
Loewy
b04c6aa345 render video detail inputs conditionally, terminateUpload on save
working, needs testing

wip: sync styles for inputs, remove notes/tags for now

wip: use single screen and switch on mode

need to rebase

working, needs testing

wip: sync styles for inputs, remove notes/tags for now

wip: use single screen and switch on mode

need to rebase

working, needs testing

add game type and table size to terminateUpload
2024-02-19 09:51:47 -08:00
b05e354459 kat/refactor-use-graph-data (#121)
Reviewed-on: railbird/railbird-mobile#121
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-02-18 23:14:07 -07:00
ce8cfd6a68 Merge pull request 'TerminateUploadStream -- add fields' (#3) from loewy/terminate-upload-add-fields into master
Reviewed-on: #3
2024-02-15 21:38:15 -07:00
Loewy
234d4d0fa9 run codegen 2024-02-15 18:30:33 -08:00
Loewy
4d05d9a539 update operations 2024-02-15 18:14:54 -08:00
Loewy
3f16310f67 wip: add videoName, gameType & tableSize 2024-02-15 15:45:38 -08:00
762351f76e Merge pull request 'BarGraph -- update to work with a ChartContainer' (#118) from loewy/bar-graph-update-for-chart-container into master
Reviewed-on: railbird/railbird-mobile#118
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-15 13:00:33 -07:00
Loewy
2f33b7fd86 bargraph now can be called from chart container, add chartType to chartcomponents, conditional xaxis props, remove bar graph test and test from chart-container 2024-02-15 11:44:15 -08:00
8efbd676ce Merge pull request 'Move to segment index' (#115) from ivan/move-to-segment-index into master
Reviewed-on: railbird/railbird-mobile#115
2024-02-14 09:59:27 -07:00
2fc7c8ab1e Move to segment index 2024-02-14 09:56:32 -07:00
dc5a90cf1a Merge pull request 'ChartContainer -- axis render parent component for graphs' (#42) from loewy/chart-container-wrapper into master
Reviewed-on: railbird/railbird-mobile#42
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-13 16:16:50 -07:00
Loewy
2e49bc4709 link issues to todo comments 2024-02-13 15:00:35 -08:00
Loewy
4e7046bd28 update test to be for the container rather than component 2024-02-13 15:00:35 -08:00
Loewy
3eab510f5a wip: types updated, works with x axis wrapped in container 2024-02-13 15:00:35 -08:00
Loewy
8c3b745d4d wip: minor changes 2024-02-13 15:00:35 -08:00
db9475cf3b Merge pull request 'Set up svg transformer' (#114) from loewy/set-up-svg-transformer into master
Reviewed-on: railbird/railbird-mobile#114
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-13 15:59:57 -07:00
Loewy
31c212807b remove comments 2024-02-12 21:59:01 -08:00
Loewy
aca8caa5c3 test with icon 2024-02-12 21:56:26 -08:00
Loewy
b30ef2ef2b wip: builds, need to test with icons, fixes import issue for assets 2024-02-12 21:35:09 -08:00
62637badcb Merge pull request 'Move camera access permissions' (#113) from loewy/permissions into master
Reviewed-on: railbird/railbird-mobile#113
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-12 14:57:21 -07:00
Loewy
ddcd9899b3 add type to consts + remove if block 2024-02-12 13:47:50 -08:00
Loewy
d3db06a90c add function to check platform and return alert 2024-02-12 12:51:04 -08:00
Loewy
92e211a21a fix prettier 2024-02-12 10:32:53 -08:00
Loewy
1098ba4c7d move permissions to record 2024-02-12 10:32:53 -08:00
2c5a843835 Merge pull request 'Login + Profile -- UI' (#109) from loewy/login-ui into master
Reviewed-on: railbird/railbird-mobile#109
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-12 11:22:03 -07:00
204e289627 Actually regenerate code 2024-02-11 22:46:11 -07:00
fd731b2ecf Fix video uplaod 2024-02-11 22:44:18 -07:00
e733e413ef Small tweaks 2024-02-11 22:42:37 -07:00
Loewy
e1abd8e85c prettier 2024-02-08 13:31:01 -08:00
Loewy
3b1abc9ae8 working, needs testing on physical device 2024-02-08 13:03:39 -08:00
Loewy
6b8737e182 wip: needs testing on physical devices 2024-02-08 13:03:39 -08:00
Loewy
baab800a1c working with email on create user / sign in -- not getting expected error from firebase 2024-02-08 13:03:39 -08:00
Loewy
e2bde3bd01 wip, ui toggle mocked 2024-02-08 13:03:39 -08:00
Loewy
f849780aac some stuff 2024-02-08 13:03:39 -08:00
Loewy
37004a1f6e minor changes 2024-02-08 13:03:39 -08:00
Loewy
d483be05a6 sketch out profile screen so we have a logout, minor clean up 2024-02-08 13:03:39 -08:00
0c89178542 Merge pull request 'Properly support orientation in recorded video' (#106) from ivan/orientation into master
Reviewed-on: railbird/railbird-mobile#106
2024-02-08 11:34:19 -07:00
c8999f8250 Properly support orientation in recorded video
Fixes #72
2024-02-08 11:19:11 -07:00
2fd1f26325 Merge pull request 'move App.tsx to src' (#105) from loewy/move-app-tsx-to-src into master
Reviewed-on: railbird/railbird-mobile#105
2024-02-07 23:04:39 -07:00
Loewy
03774a540f move App.tsx to src 2024-02-07 21:24:24 -08:00
f559c1e215 Merge pull request 'Auth-Context -- Navigation' (#103) from loewy/auth-context into master
Reviewed-on: railbird/railbird-mobile#103
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-02-07 22:02:20 -07:00
Loewy
ea130df02b remove loading for now 2024-02-07 17:49:08 -08:00
Loewy
2ac780bdaa put sign out back on sessiontsx for now 2024-02-07 17:37:58 -08:00
Loewy
a9f474fa62 revert screens, ready for pr 2024-02-07 17:33:27 -08:00
Andy Malkin
3a476e0db4 here you go loewy 2024-02-07 16:59:11 -08:00
Loewy
b9221fa949 wip: almost there, needs dev mode sorted + loading 2024-02-07 15:39:11 -08:00
Loewy
07db6e21db undo some changes to keep history clean 2024-02-07 11:22:25 -08:00
Loewy
e5e998df36 sketch out nav with auth 2024-02-07 11:21:41 -08:00
112ed5b140 Merge pull request 'Add cmake to flake' (#101) from ivan/add-cmake-to-flake into master
Reviewed-on: railbird/railbird-mobile#101
2024-02-07 00:38:04 -07:00
a781510a41 Add cmake to flake 2024-02-07 00:08:36 -07:00
bbbcffcfcb Merge pull request 'write script to use env variables' (#100) from andy/start-script into master
Reviewed-on: railbird/railbird-mobile#100
2024-02-06 21:09:27 -07:00
Loewy
13bdfff9f8 remove logs, tested 2024-02-06 16:15:46 -08:00
Andy Malkin
ef7c39e4e9 update script to keep colors 2024-02-06 16:06:09 -08:00
Andy Malkin
ee085cbbb1 write script to use env variables 2024-02-06 15:53:04 -08:00
35a94b4a75 Merge pull request 'loewy/move-app-to-src' (#99) from loewy/move-app-to-src into master
Reviewed-on: railbird/railbird-mobile#99
2024-02-06 16:52:12 -07:00
Loewy
da68d87a5f import sort 2024-02-06 15:12:54 -08:00
Loewy
af28d5c65b mvoe mock, fix imports 2024-02-06 15:08:19 -08:00
Loewy
b5ca868050 move folders etc, need to solve app import issue 2024-02-06 14:24:49 -08:00
4a5dd47bc0 Merge pull request 'Pass firebase token to headers / signOut' (#98) from loewy/firebase-token-headers into master
Reviewed-on: railbird/railbird-mobile#98
2024-02-06 14:14:05 -07:00
Loewy
71a5f72381 prettier 2024-02-06 13:03:44 -08:00
Loewy
c1ba1ceb7c token passed, tested with a call, change up env a bit 2024-02-06 13:02:15 -08:00
Loewy
035ce9f1b9 fix prettier conflicts 2024-02-06 11:34:52 -08:00
Loewy
eb2534ff94 wip: working, needs some unit tests for auth functions 2024-02-06 11:09:22 -08:00
Loewy
d93d73dc3a wip: token passed to headers, need to make hook for onAuthStateChanged 2024-02-05 23:58:39 -08:00
Loewy
6bfd0621ad wip: connect firebase token to apollo headers 2024-02-05 22:50:24 -08:00
Andy Malkin
b88f5bf2e4 added env vars types and start scripts 2024-02-05 22:48:29 -08:00
43ff5d416a Merge pull request 'Bump gql' (#91) from bump-gql into master
Reviewed-on: railbird/railbird-mobile#91
2024-02-05 19:56:25 -07:00
90fc81776f Merge pull request 'Add shots and bucketed shot gql' (#2) from update-agg-gql into master
Reviewed-on: #2
2024-02-05 19:56:07 -07:00
0e8316b9f5 Bump gql 2024-02-05 12:57:25 -07:00
01f1f94dd6 Merge pull request 'ivan/upload-flow-v1' (#87) from ivan/upload-flow-v1 into master
Reviewed-on: railbird/railbird-mobile#87
2024-02-05 02:00:36 -07:00
bfd5a58461 Igonre files types 2024-02-05 01:58:19 -07:00
240831d6e5 Fix error 2024-02-05 01:55:53 -07:00
394bff34e5 Set binaryStreamOnly 2024-02-05 01:52:37 -07:00
000918844a Queue uploads 2024-02-05 01:42:58 -07:00
f44a1597c0 Use react-native-fs instead 2024-02-05 01:42:58 -07:00
1cfc6a9ae3 WIP 2024-02-05 01:42:58 -07:00
b4a5fdebab Remove CameraRoll saving 2024-02-05 01:42:58 -07:00
4970018afb Merge pull request 'Disable android build for now' (#86) from ivan/disable-android-build into master
Reviewed-on: railbird/rn-playground#86
2024-02-03 22:22:28 -07:00
8998cc3ac4 Disable android build for now 2024-02-03 22:21:37 -07:00
bee4dc403b Merge pull request 'Oops' (#85) from ivan/fix-android-build into master
Reviewed-on: railbird/rn-playground#85
2024-02-03 22:09:11 -07:00
edbe916247 Oops 2024-02-03 22:08:51 -07:00
73334a7dd7 Merge pull request 'Fix android build' (#84) from ivan/fix-android-build into master
Reviewed-on: railbird/rn-playground#84
2024-02-03 21:59:46 -07:00
497068627c Fix android build 2024-02-03 21:58:54 -07:00
89361e17e6 Merge pull request 'Automatically organize imports' (#83) from ivan/automatically-organize-imports into master
Reviewed-on: railbird/rn-playground#83
2024-02-03 21:48:28 -07:00
18ec4bf9f1 Separate android into its own job 2024-02-03 21:48:05 -07:00
2e75f784dd Try a different variable 2024-02-03 21:35:31 -07:00
c7179bd0a0 Fix android build 2024-02-03 21:30:32 -07:00
b38c099414 Fix? 2024-02-03 21:27:33 -07:00
e7f5d19707 Please work 2024-02-03 21:17:08 -07:00
4ae2e70586 Take 2 2024-02-03 21:14:18 -07:00
c93072d9b4 Fix CI? 2024-02-03 21:10:16 -07:00
721e728275 Add android build and make tsc find react-native-vision-camera 2024-02-03 21:06:47 -07:00
bfd96d9ccc Automatically organize imports 2024-02-03 20:30:00 -07:00
3f0e0bb9a9 Merge pull request 'Actually respect prettier configuration' (#82) from ivan/respect-prettier-configuration into master
Reviewed-on: railbird/rn-playground#82
2024-02-03 20:25:25 -07:00
2276605e6d Actually respect prettier configuration 2024-02-03 20:23:54 -07:00
a6883a624a Merge pull request 'ivan/add-dev-auth' (#81) from ivan/add-dev-auth into master
Reviewed-on: railbird/rn-playground#81
2024-02-03 20:18:02 -07:00
fc3cf92dcf Set dev mode auth headers 2024-02-03 20:15:39 -07:00
e69f9dc2d8 Add ApolloLink to inject auth headers 2024-02-03 18:10:58 -07:00
473d79a32d Bump react native vision callback 2024-02-03 18:09:55 -07:00
2f8f0227ba Merge pull request 'Record flow -- Entry screen + navigation stack' (#79) from loewy/camera-screen-stack into master
Reviewed-on: railbird/rn-playground#79
2024-02-03 16:45:39 -07:00
7bf0053974 Merge pull request 'Add railbird-gql as a dependency' (#80) from ivan/railbird-gql into master
Reviewed-on: railbird/rn-playground#80
2024-02-03 16:44:30 -07:00
5f7e7e31bf Add typescript to flake 2024-02-03 16:37:27 -07:00
a1bc5377db Add typescript as dev dependency 2024-02-03 16:18:58 -07:00
f4b93253a8 Add railbird-gql as a dependency 2024-02-03 15:53:53 -07:00
Loewy
56733c854c add record entry screen/modal and required nav flow 2024-02-02 18:52:19 -08:00
9e170380db Merge pull request 'Add onVideoChunkReady' (#78) from ivan/addOnVideoChunkReady into master
Reviewed-on: railbird/rn-playground#78
2024-02-01 19:55:44 -07:00
23f0beb646 Add onVideoChunkReady 2024-02-01 19:43:44 -07:00
a0af0ad300 Merge pull request 'react-native-vision-camera working with iOS build' (#71) from loewy/ios-pods-camera into master
Reviewed-on: railbird/rn-playground#71
2024-02-01 17:20:07 -07:00
Loewy
9187021cda add pod for VisionCamera & other ios config, update expo-constants version 2024-02-01 16:12:47 -08:00
4fb8fe7d08 Merge pull request 'Minimal Navigation' (#66) from loewy/rn-navigation into master
Reviewed-on: railbird/rn-playground#66
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-01 15:13:45 -07:00
Loewy
c882786726 Merge branch 'master' into loewy/rn-navigation 2024-02-01 11:42:50 -08:00
7f6a05c101 Merge pull request 'ivan/react-native-vision-camera-submodule' (#68) from ivan/react-native-vision-camera-submodule into master
Reviewed-on: railbird/rn-playground#68
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-02-01 00:59:58 -07:00
06f1aad38e Lint/tsc fixes 2024-02-01 00:58:23 -07:00
2aa9b4b2d1 Add eslintignore for submodule 2024-02-01 00:39:38 -07:00
152ede26e3 Use http submodule in CI 2024-02-01 00:36:48 -07:00
3f43c8d946 It works!!! 2024-01-31 23:39:55 -07:00
85b1cb8759 Close 2024-01-31 22:45:00 -07:00
82069f3bef Use react-native-vision-camera submodule 2024-01-31 18:40:12 -07:00
3a31135807 Merge pull request 'Camera Orientation Toggling' (#63) from loewy/camera-orientation-toggle into master
Reviewed-on: railbird/rn-playground#63
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-01-31 18:20:43 -07:00
Loewy
6482d43af0 remove unused styles color 2024-01-31 15:56:48 -08:00
Loewy
e221ef070f app navigator, tab navigator, session screen, minimal config on tabs & container 2024-01-31 15:55:33 -08:00
Loewy
6b547c4ddd add types, rebase 2024-01-30 17:05:43 -08:00
Loewy
63ef099dc3 add button to change orientation of camera -- passed to props -- needs to be set up 2024-01-30 16:35:47 -08:00
f4cf600d22 Merge pull request 'Camera -- mount & record' (#62) from loewy/rn-vision-camera-preview into master
Reviewed-on: railbird/rn-playground#62
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-30 17:33:16 -07:00
Loewy
f9111ffe5e tested on emulator, works on some physical devices, will record + save to local camera roll & produce logs 2024-01-30 14:18:19 -08:00
Loewy
cd3329baae add logs, try removing props from Camera component 2024-01-30 14:18:19 -08:00
Loewy
feafd48443 working on emulator but crashing on physical device after calling startRecording 2024-01-30 14:18:19 -08:00
Loewy
eb152bc6c7 boots on android, no recording/file logging/etc, just camera access and button ui 2024-01-30 14:18:19 -08:00
4376f9dc26 Merge pull request 'Android Firebase-Auth' (#61) from loewy/firebase-auth-integration into master
Reviewed-on: railbird/rn-playground#61
2024-01-30 15:02:53 -07:00
Loewy
7f7487836c add some comments and add text to log output 2024-01-29 14:51:24 -08:00
Loewy
7046b23a27 code tested on android, gets a token, logs a user 2024-01-29 14:51:24 -08:00
6ebceb4ce7 Merge pull request 'Android Firebase SDK set up' (#55) from loewy/android-generate-firebase-sdk into master
Reviewed-on: railbird/rn-playground#55
2024-01-29 14:26:59 -07:00
Loewy
3d9845e1b3 revert App.tsx 2024-01-27 15:17:09 -08:00
Loewy
07118a870f android google-service.json linking 2024-01-27 15:11:42 -08:00
abb718603e Merge pull request 'Android folders from nix shell' (#52) from loewy/renamed-android-folders into master
Reviewed-on: railbird/rn-playground#52
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-27 15:40:20 -07:00
Loewy
9f170c1186 revert the nix/store hash on gradle.properties 2024-01-27 14:21:02 -08:00
Loewy
94d4f13a28 get android running in nix shell 2024-01-26 16:41:50 -08:00
4c6bf597a9 Merge pull request 'Firebase SDK for iOS -- duplicate' (#49) from loewy/firebase-sdk into master
Reviewed-on: railbird/rn-playground#49
2024-01-26 13:19:03 -07:00
Loewy
4c091745dd rebased with master + reset package json to previous spacing/commands 2024-01-25 17:27:24 -08:00
Loewy
406f6f5cdd revert commands in package json 2024-01-25 17:08:58 -08:00
Loewy
4250eca710 firebase sdk installation and set up for iOS + connection test 2024-01-25 17:08:58 -08:00
3bd414506a Merge pull request 'iOS Directory' (#46) from loewy/renamed_ios_folders into master
Reviewed-on: railbird/rn-playground#46
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-25 17:33:13 -07:00
Loewy
a9dbd503e3 build ios directory + rename app.json name and slug 2024-01-25 11:31:21 -08:00
ec0904ffb1 Merge pull request 'Line Graph -- render component' (#39) from loewy/line-graph-render-component into master
Reviewed-on: railbird/rn-playground#39
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-18 20:10:09 -07:00
Loewy
b80b05fbd8 add line graph, associated changes to utils/config/styles & test 2024-01-18 16:21:01 -08:00
d9a4247b8e Merge pull request 'Update CustomGrid' (#37) from loewy/custom-grid-vertical into master
Reviewed-on: railbird/rn-playground#37
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-18 14:30:46 -07:00
Loewy
9d5164bd13 add vertical option for custom-grid, add dev docs 2024-01-18 13:21:39 -08:00
ec6d36b44c ChartLabel -- graph helper component to render title + labels for a chart/graph (#30)
-- question: helper functions can be used directly in chartLabel OR I could have them be part of useGraphData hook since this component will be called on a graph.

image: shows the Chart Label up top with capital cased keys/labels and color boxes

FIXES #29

Co-authored-by: Loewy <loewy@chainstarters.com>
Reviewed-on: billnerds/rn-playground#30
Reviewed-by: Kat Huang <kkathuang@gmail.com>
Co-authored-by: loewy <loewymalkov@gmail.com>
Co-committed-by: loewy <loewymalkov@gmail.com>
2024-01-17 14:29:28 -07:00
7e7a571f5a Merge pull request 'Bar Graph Render Component' (#28) from loewy/bar-graph-render into master
Reviewed-on: billnerds/rn-playground#28
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-16 15:16:59 -07:00
Loewy
9a61ea59b2 fix import issue caused by renaming 2024-01-15 18:05:21 -08:00
Loewy
5dc141a14a remove index file for now, do default exports in seperate pr 2024-01-15 18:01:50 -08:00
Loewy
a0f8ec156b fix spacing 2024-01-15 17:55:19 -08:00
Loewy
7383c85b58 merge chart-view from master, implement in component 2024-01-15 17:52:10 -08:00
Loewy
aed0faebf0 add bar graph, make changes to customgrid and custombars to match new structure 2024-01-15 17:40:24 -08:00
f0b9f8043b Merge pull request 'ChartView styled component' (#27) from loewy/chart-view into master
Reviewed-on: billnerds/rn-playground#27
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-15 15:52:31 -07:00
Loewy
58dfe98448 remove uneeded comment 2024-01-15 13:18:23 -08:00
Loewy
f14ba0e97f chart-view, styles and tests 2024-01-15 13:02:51 -08:00
Loewy
981b5cebca add code, bring over chart view and pr first 2024-01-15 12:33:08 -08:00
4e3a93f126 Merge pull request 'Logic handler for bar graph' (#21) from loewy/bar-graph-data into master
Reviewed-on: billnerds/rn-playground#21
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-15 12:53:32 -07:00
Loewy
c391a07d70 fix lint issue with master rebase 2024-01-15 11:51:43 -08:00
Loewy
7faa25e103 update types/naming to reflect intended usage for useGraphData hook 2024-01-15 11:50:20 -08:00
Loewy
12c3a6ef6f add func logic for bar graph 2024-01-15 11:50:20 -08:00
4c1bd21f3d Merge pull request 'Support new feature tables' (#26) from support-new-feature-schema into master
Reviewed-on: billnerds/rn-playground#26
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-01-14 17:46:55 -07:00
abfc6c4c47 Support new feature tables 2024-01-14 17:39:25 -07:00
afb2ef21f5 Merge pull request 'Temp remove shot from app' (#20) from remove-shot-component into master
Reviewed-on: billnerds/rn-playground#20
2024-01-12 12:04:33 -07:00
06bb8feeb5 Temp remove shot from app 2024-01-12 12:03:48 -07:00
a112586c2d Merge pull request 'charts folder in component' (#19) from loewy/add-charts-folder into master
Reviewed-on: billnerds/rn-playground#19
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-12 12:02:01 -07:00
Loewy
8d40008e5d add path 2024-01-11 23:01:05 -08:00
Loewy
a9afd7e0a9 add charts folder in component 2024-01-11 22:59:15 -08:00
28a0426096 Merge pull request 'loewy/custom-bars' (#18) from loewy/custom-bars into master
Reviewed-on: billnerds/rn-playground#18
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
Reviewed-by: Kat Huang <kkathuang@gmail.com>
2024-01-10 19:14:27 -07:00
Loewy
dee04269bd update tests, change naming 2024-01-10 18:12:58 -08:00
Loewy
6c7ceb3eb3 add tests for helper functions on bar 2024-01-10 18:12:58 -08:00
Loewy
4dda9eb24c add custom-grid and associated files + test - test needs plugin config to work with d3-path and jest 2024-01-10 18:12:58 -08:00
92258f4925 Merge pull request 'Filter utils to create filter input for query' (#17) from filter-query into master
Reviewed-on: billnerds/rn-playground#17
2024-01-10 18:08:19 -07:00
5b1b1cdaaa WIP 2024-01-10 16:23:18 -07:00
875989e3a9 Add filter input 2024-01-10 16:23:18 -07:00
74c17f433a Merge pull request 'Custom grid component' (#16) from loewy/custom-grid into master
Reviewed-on: billnerds/rn-playground#16
2024-01-09 16:46:53 -07:00
Loewy
2903207670 remove custom grid 2024-01-09 15:42:38 -08:00
Loewy
c0723665af add custom-grid and mock code, add direnv to gitignore 2024-01-09 15:25:36 -08:00
83a648eb90 Merge pull request 'Implement Containers for fetching shots' (#15) from get-shot-with-fragment into master
Reviewed-on: billnerds/rn-playground#15
2024-01-09 10:47:58 -07:00
5204599a08 Register fragment 2024-01-08 23:52:08 -07:00
fcdce8706f Create shot features fragment 2024-01-08 23:52:08 -07:00
5192212e0e Render fetched shots 2024-01-08 23:52:08 -07:00
376d695416 Merge pull request 'Create higher order component that wraps display components' (#12) from create-query-hoc into master
Reviewed-on: billnerds/rn-playground#12
2024-01-08 19:26:44 -07:00
e25425ffe9 Add react native testing library 2024-01-08 17:27:52 -07:00
78d40f1abc Create with query wrapper 2024-01-08 17:21:47 -07:00
78d99da6df Merge pull request 'Create Apollo Client' (#11) from create-gql-client into master
Reviewed-on: billnerds/rn-playground#11
2024-01-08 00:22:41 -07:00
f797c98d45 Create Apollo Provider 2024-01-08 00:21:36 -07:00
491ca28ab2 Get dotenv working with typescript 2024-01-06 23:58:36 -07:00
7f71c89ffb Create apollo provider 2024-01-06 23:48:47 -07:00
411d5720b9 Merge pull request 'Fix uri path' (#10) from fix-env into master
Reviewed-on: billnerds/rn-playground#10
2024-01-06 23:38:19 -07:00
872dd3fd71 Fix uri path 2024-01-06 23:36:24 -07:00
521e9da4e3 Merge pull request 'Add prettier' (#9) from ivan/add-prettier into master
Reviewed-on: billnerds/rn-playground#9
2024-01-06 19:38:04 -07:00
ed8371e08a Make eslint compatible with prettier 2024-01-06 19:32:00 -07:00
160590658b Add prettier 2024-01-06 19:25:17 -07:00
002ac7902d Merge pull request 'Add jest for unit tests' (#8) from add-jest into master
Reviewed-on: billnerds/rn-playground#8
2024-01-06 19:08:37 -07:00
e527b198f9 Add a unit test 2024-01-06 19:07:16 -07:00
d68561b372 Add jest for unit tests 2024-01-06 18:46:03 -07:00
c292289f29 Merge pull request 'Add type checking' (#7) from type-check into master
Reviewed-on: billnerds/rn-playground#7
2024-01-06 18:06:53 -07:00
e053517765 Add type checking 2024-01-06 18:04:03 -07:00
66d045c2a7 Merge pull request 'Use environment variables for uri' (#5) from env-files into master
Reviewed-on: billnerds/rn-playground#5
2024-01-06 15:19:38 -07:00
e1410ed402 Merge branch 'master' into env-files 2024-01-06 06:26:45 -07:00
1031794d85 Merge pull request 'Remove main from action' (#6) from ivan/remove-main-branch-from-actions into master
Reviewed-on: billnerds/rn-playground#6
2024-01-06 06:26:20 -07:00
5d2b45b3e5 Again? 2024-01-06 02:31:02 -07:00
73b09fe9cb Fix? 2024-01-06 02:13:39 -07:00
cd2ecb22b1 Set yarn cache folder 2024-01-06 02:07:26 -07:00
ad66131e01 Fix? 2024-01-05 23:27:48 -07:00
f401c418c5 Only use yarn.lock 2024-01-05 23:25:08 -07:00
7b8db90f75 Fix action 2024-01-05 23:19:39 -07:00
0431ba12c5 Run action on push master 2024-01-05 22:48:28 -07:00
3731bb7532 Add gitea action 2024-01-05 22:47:04 -07:00
a1a3fa45b1 Use environment variables for uri 2024-01-05 19:50:07 -07:00
59541ec0e8 Merge pull request 'Fix lint errors' (#4) from fix-lint-errors into master
Reviewed-on: billnerds/rn-playground#4
2024-01-05 19:20:57 -07:00
b334cc377f Fix lint errors 2024-01-05 19:19:45 -07:00
b1467838da Merge pull request 'Install eslint' (#3) from linter into master
Reviewed-on: billnerds/rn-playground#3
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-01-05 19:06:40 -07:00
20901fb26c Add lint rules 2024-01-05 15:39:57 -07:00
295f948104 Install eslint 2024-01-05 14:43:38 -07:00
977ab8f6c9 Creating new repo 2023-12-28 17:18:54 -07:00
c3e2d23a63 Initial commit
Generated by create-expo-app 2.1.1.
2023-12-28 16:44:12 -07:00
27 changed files with 3985 additions and 595 deletions

View File

@@ -0,0 +1,17 @@
name: Tests
on:
pull_request:
env:
NIXPKGS_ALLOW_UNFREE: 1
jobs:
install:
name: Tests
runs-on: nixos-x86_64-linux
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: codegen causes no changes
run: ./bin/assert-no-changes-wrapper.sh

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
node_modules
dist
.direnv
/after.txt
/before.txt

1
README.md Normal file
View File

@@ -0,0 +1 @@
# rbgql

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
GQL_DIR=$(dirname $(dirname "$(realpath "$BASH_SOURCE")"))
cd $GQL_DIR
LD_LIBRARY_PATH="" nix develop --impure --command bash "$GQL_DIR/bin/assert-no-changes.sh"

17
bin/assert-no-changes.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
git ls-files | xargs md5sum > before.txt
yarn install
yarn graphql-codegen
prettier ./src --write
for proto in $(find ./rbproto -iname '*.proto'); do
name=$(basename "$proto" .proto)
protoc -I=./rbproto --python_out=./rbproto/python --pyi_out=./rbproto/python ./rbproto/shot.proto
yarn pbjs ./rbproto/shot.proto --ts ./rbproto/ts/shot.ts
done
prettier ./rbproto --write
git ls-files | xargs md5sum > after.txt
diff before.txt after.txt

4
flake.lock generated
View File

@@ -20,9 +20,7 @@
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": ["nixpkgs"]
},
"locked": {
"lastModified": 1703887061,

View File

@@ -21,7 +21,7 @@
in
with pkgs; {
devShell = mkShell {
buildInputs = [nodejs yarn watchman alejandra nodePackages.prettier];
buildInputs = [nodejs yarn watchman alejandra nodePackages.prettier just protobuf];
};
});
}

39
justfile Normal file
View File

@@ -0,0 +1,39 @@
NIX := "LD_LIBRARY_PATH='' nix"
PROTOBUF_DIR := "$PWD/rbproto"
prettier-gql:
#!/usr/bin/env bash
set -euxo pipefail
{{NIX}} develop --impure --command prettier ./src --write
gql-codegen:
#!/usr/bin/env bash
set -euxo pipefail
{{NIX}} develop --impure --command bash -c 'yarn install && yarn graphql-codegen'
gql: gql-codegen prettier-gql
protobuf-compile-a-python name:
protoc -I={{ PROTOBUF_DIR }} --python_out={{ PROTOBUF_DIR }}/python --pyi_out={{ PROTOBUF_DIR }}/python {{ PROTOBUF_DIR }}/shot.proto
protobuf-compile-a-js name:
#!/usr/bin/env bash
set -euxo pipefail
{{NIX}} develop --impure --command bash -c 'yarn pbjs {{ PROTOBUF_DIR }}/shot.proto --ts {{ PROTOBUF_DIR }}/ts/shot.ts && yarn prettier ./rbproto --write'
protobuf-compile-all-js:
#!/usr/bin/env bash
for proto in $(find {{ PROTOBUF_DIR }} -iname '*.proto'); do
name=$(basename "$proto" .proto)
just protobuf-compile-a-js $name
done
protobuf-compile-all-python:
#!/usr/bin/env bash
for proto in $(find {{ PROTOBUF_DIR }} -iname '*.proto'); do
name=$(basename "$proto" .proto)
just protobuf-compile-a-python $name
done
protobuf-compile-everything: protobuf-compile-all-js protobuf-compile-all-python

View File

@@ -17,7 +17,15 @@
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@graphql-codegen/typescript-react-apollo": "^4.2.0",
"graphql": "^16.8.1"
"graphql": "^16.8.1",
"pbjs": "^0.0.14",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4"
},
"prettier": {
"plugins": [
"prettier-plugin-organize-imports"
]
},
"devDependencies": {
"typescript": "^4.x"

16
pyproject.toml Normal file
View File

@@ -0,0 +1,16 @@
[tool.poetry]
name = "rbproto"
version = "0.1.0"
description = ""
authors = ["Mike Kalange <countablecloud@gmail.com>"]
readme = "README.md"
packages = [{include = "rbproto"}]
[tool.poetry.dependencies]
python = ">=3.10,<3.12"
protobuf = "^4.25.3"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

1
rbproto/__init__.py Normal file
View File

@@ -0,0 +1 @@
from .python.shot_pb2 import * # noqa: F401

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: shot.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nshot.proto\x12\x0fserialized_shot\",\n\x05Point\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\r\n\x05\x63ount\x18\x03 \x01(\x05\"i\n\x04Path\x12\x13\n\x0bstart_frame\x18\x01 \x01(\x05\x12\x11\n\tend_frame\x18\x02 \x01(\x05\x12\x11\n\tis_static\x18\x03 \x01(\x08\x12&\n\x06points\x18\x04 \x03(\x0b\x32\x16.serialized_shot.Point\"J\n\tBallPaths\x12\x17\n\x0f\x62\x61ll_identifier\x18\x01 \x01(\x05\x12$\n\x05paths\x18\x02 \x03(\x0b\x32\x15.serialized_shot.Path\"^\n\x04Shot\x12\x13\n\x0bstart_frame\x18\x01 \x01(\x05\x12\x11\n\tend_frame\x18\x02 \x01(\x05\x12.\n\nball_paths\x18\x03 \x03(\x0b\x32\x1a.serialized_shot.BallPathsb\x06proto3')
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'shot_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
_globals['_POINT']._serialized_start=31
_globals['_POINT']._serialized_end=75
_globals['_PATH']._serialized_start=77
_globals['_PATH']._serialized_end=182
_globals['_BALLPATHS']._serialized_start=184
_globals['_BALLPATHS']._serialized_end=258
_globals['_SHOT']._serialized_start=260
_globals['_SHOT']._serialized_end=354
# @@protoc_insertion_point(module_scope)

View File

@@ -0,0 +1,46 @@
from google.protobuf.internal import containers as _containers
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
DESCRIPTOR: _descriptor.FileDescriptor
class Point(_message.Message):
__slots__ = ["x", "y", "count"]
X_FIELD_NUMBER: _ClassVar[int]
Y_FIELD_NUMBER: _ClassVar[int]
COUNT_FIELD_NUMBER: _ClassVar[int]
x: float
y: float
count: int
def __init__(self, x: _Optional[float] = ..., y: _Optional[float] = ..., count: _Optional[int] = ...) -> None: ...
class Path(_message.Message):
__slots__ = ["start_frame", "end_frame", "is_static", "points"]
START_FRAME_FIELD_NUMBER: _ClassVar[int]
END_FRAME_FIELD_NUMBER: _ClassVar[int]
IS_STATIC_FIELD_NUMBER: _ClassVar[int]
POINTS_FIELD_NUMBER: _ClassVar[int]
start_frame: int
end_frame: int
is_static: bool
points: _containers.RepeatedCompositeFieldContainer[Point]
def __init__(self, start_frame: _Optional[int] = ..., end_frame: _Optional[int] = ..., is_static: bool = ..., points: _Optional[_Iterable[_Union[Point, _Mapping]]] = ...) -> None: ...
class BallPaths(_message.Message):
__slots__ = ["ball_identifier", "paths"]
BALL_IDENTIFIER_FIELD_NUMBER: _ClassVar[int]
PATHS_FIELD_NUMBER: _ClassVar[int]
ball_identifier: int
paths: _containers.RepeatedCompositeFieldContainer[Path]
def __init__(self, ball_identifier: _Optional[int] = ..., paths: _Optional[_Iterable[_Union[Path, _Mapping]]] = ...) -> None: ...
class Shot(_message.Message):
__slots__ = ["start_frame", "end_frame", "ball_paths"]
START_FRAME_FIELD_NUMBER: _ClassVar[int]
END_FRAME_FIELD_NUMBER: _ClassVar[int]
BALL_PATHS_FIELD_NUMBER: _ClassVar[int]
start_frame: int
end_frame: int
ball_paths: _containers.RepeatedCompositeFieldContainer[BallPaths]
def __init__(self, start_frame: _Optional[int] = ..., end_frame: _Optional[int] = ..., ball_paths: _Optional[_Iterable[_Union[BallPaths, _Mapping]]] = ...) -> None: ...

27
rbproto/shot.proto Normal file
View File

@@ -0,0 +1,27 @@
syntax = "proto3";
package serialized_shot;
message Point {
float x = 1;
float y = 2;
int32 count = 3;
}
message Path {
int32 start_frame = 1;
int32 end_frame = 2;
bool is_static = 3;
repeated Point points = 4;
}
message BallPaths {
int32 ball_identifier = 1;
repeated Path paths = 2;
}
message Shot {
int32 start_frame = 1;
int32 end_frame = 2;
repeated BallPaths ball_paths = 3;
}

879
rbproto/ts/shot.ts Normal file
View File

@@ -0,0 +1,879 @@
export interface Point {
x?: number;
y?: number;
count?: number;
}
export function encodePoint(message: Point): Uint8Array {
let bb = popByteBuffer();
_encodePoint(message, bb);
return toUint8Array(bb);
}
function _encodePoint(message: Point, bb: ByteBuffer): void {
// optional float x = 1;
let $x = message.x;
if ($x !== undefined) {
writeVarint32(bb, 13);
writeFloat(bb, $x);
}
// optional float y = 2;
let $y = message.y;
if ($y !== undefined) {
writeVarint32(bb, 21);
writeFloat(bb, $y);
}
// optional int32 count = 3;
let $count = message.count;
if ($count !== undefined) {
writeVarint32(bb, 24);
writeVarint64(bb, intToLong($count));
}
}
export function decodePoint(binary: Uint8Array): Point {
return _decodePoint(wrapByteBuffer(binary));
}
function _decodePoint(bb: ByteBuffer): Point {
let message: Point = {} as any;
end_of_message: while (!isAtEnd(bb)) {
let tag = readVarint32(bb);
switch (tag >>> 3) {
case 0:
break end_of_message;
// optional float x = 1;
case 1: {
message.x = readFloat(bb);
break;
}
// optional float y = 2;
case 2: {
message.y = readFloat(bb);
break;
}
// optional int32 count = 3;
case 3: {
message.count = readVarint32(bb);
break;
}
default:
skipUnknownField(bb, tag & 7);
}
}
return message;
}
export interface Path {
start_frame?: number;
end_frame?: number;
is_static?: boolean;
points?: Point[];
}
export function encodePath(message: Path): Uint8Array {
let bb = popByteBuffer();
_encodePath(message, bb);
return toUint8Array(bb);
}
function _encodePath(message: Path, bb: ByteBuffer): void {
// optional int32 start_frame = 1;
let $start_frame = message.start_frame;
if ($start_frame !== undefined) {
writeVarint32(bb, 8);
writeVarint64(bb, intToLong($start_frame));
}
// optional int32 end_frame = 2;
let $end_frame = message.end_frame;
if ($end_frame !== undefined) {
writeVarint32(bb, 16);
writeVarint64(bb, intToLong($end_frame));
}
// optional bool is_static = 3;
let $is_static = message.is_static;
if ($is_static !== undefined) {
writeVarint32(bb, 24);
writeByte(bb, $is_static ? 1 : 0);
}
// repeated Point points = 4;
let array$points = message.points;
if (array$points !== undefined) {
for (let value of array$points) {
writeVarint32(bb, 34);
let nested = popByteBuffer();
_encodePoint(value, nested);
writeVarint32(bb, nested.limit);
writeByteBuffer(bb, nested);
pushByteBuffer(nested);
}
}
}
export function decodePath(binary: Uint8Array): Path {
return _decodePath(wrapByteBuffer(binary));
}
function _decodePath(bb: ByteBuffer): Path {
let message: Path = {} as any;
end_of_message: while (!isAtEnd(bb)) {
let tag = readVarint32(bb);
switch (tag >>> 3) {
case 0:
break end_of_message;
// optional int32 start_frame = 1;
case 1: {
message.start_frame = readVarint32(bb);
break;
}
// optional int32 end_frame = 2;
case 2: {
message.end_frame = readVarint32(bb);
break;
}
// optional bool is_static = 3;
case 3: {
message.is_static = !!readByte(bb);
break;
}
// repeated Point points = 4;
case 4: {
let limit = pushTemporaryLength(bb);
let values = message.points || (message.points = []);
values.push(_decodePoint(bb));
bb.limit = limit;
break;
}
default:
skipUnknownField(bb, tag & 7);
}
}
return message;
}
export interface BallPaths {
ball_identifier?: number;
paths?: Path[];
}
export function encodeBallPaths(message: BallPaths): Uint8Array {
let bb = popByteBuffer();
_encodeBallPaths(message, bb);
return toUint8Array(bb);
}
function _encodeBallPaths(message: BallPaths, bb: ByteBuffer): void {
// optional int32 ball_identifier = 1;
let $ball_identifier = message.ball_identifier;
if ($ball_identifier !== undefined) {
writeVarint32(bb, 8);
writeVarint64(bb, intToLong($ball_identifier));
}
// repeated Path paths = 2;
let array$paths = message.paths;
if (array$paths !== undefined) {
for (let value of array$paths) {
writeVarint32(bb, 18);
let nested = popByteBuffer();
_encodePath(value, nested);
writeVarint32(bb, nested.limit);
writeByteBuffer(bb, nested);
pushByteBuffer(nested);
}
}
}
export function decodeBallPaths(binary: Uint8Array): BallPaths {
return _decodeBallPaths(wrapByteBuffer(binary));
}
function _decodeBallPaths(bb: ByteBuffer): BallPaths {
let message: BallPaths = {} as any;
end_of_message: while (!isAtEnd(bb)) {
let tag = readVarint32(bb);
switch (tag >>> 3) {
case 0:
break end_of_message;
// optional int32 ball_identifier = 1;
case 1: {
message.ball_identifier = readVarint32(bb);
break;
}
// repeated Path paths = 2;
case 2: {
let limit = pushTemporaryLength(bb);
let values = message.paths || (message.paths = []);
values.push(_decodePath(bb));
bb.limit = limit;
break;
}
default:
skipUnknownField(bb, tag & 7);
}
}
return message;
}
export interface Shot {
start_frame?: number;
end_frame?: number;
ball_paths?: BallPaths[];
}
export function encodeShot(message: Shot): Uint8Array {
let bb = popByteBuffer();
_encodeShot(message, bb);
return toUint8Array(bb);
}
function _encodeShot(message: Shot, bb: ByteBuffer): void {
// optional int32 start_frame = 1;
let $start_frame = message.start_frame;
if ($start_frame !== undefined) {
writeVarint32(bb, 8);
writeVarint64(bb, intToLong($start_frame));
}
// optional int32 end_frame = 2;
let $end_frame = message.end_frame;
if ($end_frame !== undefined) {
writeVarint32(bb, 16);
writeVarint64(bb, intToLong($end_frame));
}
// repeated BallPaths ball_paths = 3;
let array$ball_paths = message.ball_paths;
if (array$ball_paths !== undefined) {
for (let value of array$ball_paths) {
writeVarint32(bb, 26);
let nested = popByteBuffer();
_encodeBallPaths(value, nested);
writeVarint32(bb, nested.limit);
writeByteBuffer(bb, nested);
pushByteBuffer(nested);
}
}
}
export function decodeShot(binary: Uint8Array): Shot {
return _decodeShot(wrapByteBuffer(binary));
}
function _decodeShot(bb: ByteBuffer): Shot {
let message: Shot = {} as any;
end_of_message: while (!isAtEnd(bb)) {
let tag = readVarint32(bb);
switch (tag >>> 3) {
case 0:
break end_of_message;
// optional int32 start_frame = 1;
case 1: {
message.start_frame = readVarint32(bb);
break;
}
// optional int32 end_frame = 2;
case 2: {
message.end_frame = readVarint32(bb);
break;
}
// repeated BallPaths ball_paths = 3;
case 3: {
let limit = pushTemporaryLength(bb);
let values = message.ball_paths || (message.ball_paths = []);
values.push(_decodeBallPaths(bb));
bb.limit = limit;
break;
}
default:
skipUnknownField(bb, tag & 7);
}
}
return message;
}
export interface Long {
low: number;
high: number;
unsigned: boolean;
}
interface ByteBuffer {
bytes: Uint8Array;
offset: number;
limit: number;
}
function pushTemporaryLength(bb: ByteBuffer): number {
let length = readVarint32(bb);
let limit = bb.limit;
bb.limit = bb.offset + length;
return limit;
}
function skipUnknownField(bb: ByteBuffer, type: number): void {
switch (type) {
case 0:
while (readByte(bb) & 0x80) {}
break;
case 2:
skip(bb, readVarint32(bb));
break;
case 5:
skip(bb, 4);
break;
case 1:
skip(bb, 8);
break;
default:
throw new Error("Unimplemented type: " + type);
}
}
function stringToLong(value: string): Long {
return {
low: value.charCodeAt(0) | (value.charCodeAt(1) << 16),
high: value.charCodeAt(2) | (value.charCodeAt(3) << 16),
unsigned: false,
};
}
function longToString(value: Long): string {
let low = value.low;
let high = value.high;
return String.fromCharCode(
low & 0xffff,
low >>> 16,
high & 0xffff,
high >>> 16,
);
}
// The code below was modified from https://github.com/protobufjs/bytebuffer.js
// which is under the Apache License 2.0.
let f32 = new Float32Array(1);
let f32_u8 = new Uint8Array(f32.buffer);
let f64 = new Float64Array(1);
let f64_u8 = new Uint8Array(f64.buffer);
function intToLong(value: number): Long {
value |= 0;
return {
low: value,
high: value >> 31,
unsigned: value >= 0,
};
}
let bbStack: ByteBuffer[] = [];
function popByteBuffer(): ByteBuffer {
const bb = bbStack.pop();
if (!bb) return { bytes: new Uint8Array(64), offset: 0, limit: 0 };
bb.offset = bb.limit = 0;
return bb;
}
function pushByteBuffer(bb: ByteBuffer): void {
bbStack.push(bb);
}
function wrapByteBuffer(bytes: Uint8Array): ByteBuffer {
return { bytes, offset: 0, limit: bytes.length };
}
function toUint8Array(bb: ByteBuffer): Uint8Array {
let bytes = bb.bytes;
let limit = bb.limit;
return bytes.length === limit ? bytes : bytes.subarray(0, limit);
}
function skip(bb: ByteBuffer, offset: number): void {
if (bb.offset + offset > bb.limit) {
throw new Error("Skip past limit");
}
bb.offset += offset;
}
function isAtEnd(bb: ByteBuffer): boolean {
return bb.offset >= bb.limit;
}
function grow(bb: ByteBuffer, count: number): number {
let bytes = bb.bytes;
let offset = bb.offset;
let limit = bb.limit;
let finalOffset = offset + count;
if (finalOffset > bytes.length) {
let newBytes = new Uint8Array(finalOffset * 2);
newBytes.set(bytes);
bb.bytes = newBytes;
}
bb.offset = finalOffset;
if (finalOffset > limit) {
bb.limit = finalOffset;
}
return offset;
}
function advance(bb: ByteBuffer, count: number): number {
let offset = bb.offset;
if (offset + count > bb.limit) {
throw new Error("Read past limit");
}
bb.offset += count;
return offset;
}
function readBytes(bb: ByteBuffer, count: number): Uint8Array {
let offset = advance(bb, count);
return bb.bytes.subarray(offset, offset + count);
}
function writeBytes(bb: ByteBuffer, buffer: Uint8Array): void {
let offset = grow(bb, buffer.length);
bb.bytes.set(buffer, offset);
}
function readString(bb: ByteBuffer, count: number): string {
// Sadly a hand-coded UTF8 decoder is much faster than subarray+TextDecoder in V8
let offset = advance(bb, count);
let fromCharCode = String.fromCharCode;
let bytes = bb.bytes;
let invalid = "\uFFFD";
let text = "";
for (let i = 0; i < count; i++) {
let c1 = bytes[i + offset],
c2: number,
c3: number,
c4: number,
c: number;
// 1 byte
if ((c1 & 0x80) === 0) {
text += fromCharCode(c1);
}
// 2 bytes
else if ((c1 & 0xe0) === 0xc0) {
if (i + 1 >= count) text += invalid;
else {
c2 = bytes[i + offset + 1];
if ((c2 & 0xc0) !== 0x80) text += invalid;
else {
c = ((c1 & 0x1f) << 6) | (c2 & 0x3f);
if (c < 0x80) text += invalid;
else {
text += fromCharCode(c);
i++;
}
}
}
}
// 3 bytes
else if ((c1 & 0xf0) == 0xe0) {
if (i + 2 >= count) text += invalid;
else {
c2 = bytes[i + offset + 1];
c3 = bytes[i + offset + 2];
if (((c2 | (c3 << 8)) & 0xc0c0) !== 0x8080) text += invalid;
else {
c = ((c1 & 0x0f) << 12) | ((c2 & 0x3f) << 6) | (c3 & 0x3f);
if (c < 0x0800 || (c >= 0xd800 && c <= 0xdfff)) text += invalid;
else {
text += fromCharCode(c);
i += 2;
}
}
}
}
// 4 bytes
else if ((c1 & 0xf8) == 0xf0) {
if (i + 3 >= count) text += invalid;
else {
c2 = bytes[i + offset + 1];
c3 = bytes[i + offset + 2];
c4 = bytes[i + offset + 3];
if (((c2 | (c3 << 8) | (c4 << 16)) & 0xc0c0c0) !== 0x808080)
text += invalid;
else {
c =
((c1 & 0x07) << 0x12) |
((c2 & 0x3f) << 0x0c) |
((c3 & 0x3f) << 0x06) |
(c4 & 0x3f);
if (c < 0x10000 || c > 0x10ffff) text += invalid;
else {
c -= 0x10000;
text += fromCharCode((c >> 10) + 0xd800, (c & 0x3ff) + 0xdc00);
i += 3;
}
}
}
} else text += invalid;
}
return text;
}
function writeString(bb: ByteBuffer, text: string): void {
// Sadly a hand-coded UTF8 encoder is much faster than TextEncoder+set in V8
let n = text.length;
let byteCount = 0;
// Write the byte count first
for (let i = 0; i < n; i++) {
let c = text.charCodeAt(i);
if (c >= 0xd800 && c <= 0xdbff && i + 1 < n) {
c = (c << 10) + text.charCodeAt(++i) - 0x35fdc00;
}
byteCount += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
}
writeVarint32(bb, byteCount);
let offset = grow(bb, byteCount);
let bytes = bb.bytes;
// Then write the bytes
for (let i = 0; i < n; i++) {
let c = text.charCodeAt(i);
if (c >= 0xd800 && c <= 0xdbff && i + 1 < n) {
c = (c << 10) + text.charCodeAt(++i) - 0x35fdc00;
}
if (c < 0x80) {
bytes[offset++] = c;
} else {
if (c < 0x800) {
bytes[offset++] = ((c >> 6) & 0x1f) | 0xc0;
} else {
if (c < 0x10000) {
bytes[offset++] = ((c >> 12) & 0x0f) | 0xe0;
} else {
bytes[offset++] = ((c >> 18) & 0x07) | 0xf0;
bytes[offset++] = ((c >> 12) & 0x3f) | 0x80;
}
bytes[offset++] = ((c >> 6) & 0x3f) | 0x80;
}
bytes[offset++] = (c & 0x3f) | 0x80;
}
}
}
function writeByteBuffer(bb: ByteBuffer, buffer: ByteBuffer): void {
let offset = grow(bb, buffer.limit);
let from = bb.bytes;
let to = buffer.bytes;
// This for loop is much faster than subarray+set on V8
for (let i = 0, n = buffer.limit; i < n; i++) {
from[i + offset] = to[i];
}
}
function readByte(bb: ByteBuffer): number {
return bb.bytes[advance(bb, 1)];
}
function writeByte(bb: ByteBuffer, value: number): void {
let offset = grow(bb, 1);
bb.bytes[offset] = value;
}
function readFloat(bb: ByteBuffer): number {
let offset = advance(bb, 4);
let bytes = bb.bytes;
// Manual copying is much faster than subarray+set in V8
f32_u8[0] = bytes[offset++];
f32_u8[1] = bytes[offset++];
f32_u8[2] = bytes[offset++];
f32_u8[3] = bytes[offset++];
return f32[0];
}
function writeFloat(bb: ByteBuffer, value: number): void {
let offset = grow(bb, 4);
let bytes = bb.bytes;
f32[0] = value;
// Manual copying is much faster than subarray+set in V8
bytes[offset++] = f32_u8[0];
bytes[offset++] = f32_u8[1];
bytes[offset++] = f32_u8[2];
bytes[offset++] = f32_u8[3];
}
function readDouble(bb: ByteBuffer): number {
let offset = advance(bb, 8);
let bytes = bb.bytes;
// Manual copying is much faster than subarray+set in V8
f64_u8[0] = bytes[offset++];
f64_u8[1] = bytes[offset++];
f64_u8[2] = bytes[offset++];
f64_u8[3] = bytes[offset++];
f64_u8[4] = bytes[offset++];
f64_u8[5] = bytes[offset++];
f64_u8[6] = bytes[offset++];
f64_u8[7] = bytes[offset++];
return f64[0];
}
function writeDouble(bb: ByteBuffer, value: number): void {
let offset = grow(bb, 8);
let bytes = bb.bytes;
f64[0] = value;
// Manual copying is much faster than subarray+set in V8
bytes[offset++] = f64_u8[0];
bytes[offset++] = f64_u8[1];
bytes[offset++] = f64_u8[2];
bytes[offset++] = f64_u8[3];
bytes[offset++] = f64_u8[4];
bytes[offset++] = f64_u8[5];
bytes[offset++] = f64_u8[6];
bytes[offset++] = f64_u8[7];
}
function readInt32(bb: ByteBuffer): number {
let offset = advance(bb, 4);
let bytes = bb.bytes;
return (
bytes[offset] |
(bytes[offset + 1] << 8) |
(bytes[offset + 2] << 16) |
(bytes[offset + 3] << 24)
);
}
function writeInt32(bb: ByteBuffer, value: number): void {
let offset = grow(bb, 4);
let bytes = bb.bytes;
bytes[offset] = value;
bytes[offset + 1] = value >> 8;
bytes[offset + 2] = value >> 16;
bytes[offset + 3] = value >> 24;
}
function readInt64(bb: ByteBuffer, unsigned: boolean): Long {
return {
low: readInt32(bb),
high: readInt32(bb),
unsigned,
};
}
function writeInt64(bb: ByteBuffer, value: Long): void {
writeInt32(bb, value.low);
writeInt32(bb, value.high);
}
function readVarint32(bb: ByteBuffer): number {
let c = 0;
let value = 0;
let b: number;
do {
b = readByte(bb);
if (c < 32) value |= (b & 0x7f) << c;
c += 7;
} while (b & 0x80);
return value;
}
function writeVarint32(bb: ByteBuffer, value: number): void {
value >>>= 0;
while (value >= 0x80) {
writeByte(bb, (value & 0x7f) | 0x80);
value >>>= 7;
}
writeByte(bb, value);
}
function readVarint64(bb: ByteBuffer, unsigned: boolean): Long {
let part0 = 0;
let part1 = 0;
let part2 = 0;
let b: number;
b = readByte(bb);
part0 = b & 0x7f;
if (b & 0x80) {
b = readByte(bb);
part0 |= (b & 0x7f) << 7;
if (b & 0x80) {
b = readByte(bb);
part0 |= (b & 0x7f) << 14;
if (b & 0x80) {
b = readByte(bb);
part0 |= (b & 0x7f) << 21;
if (b & 0x80) {
b = readByte(bb);
part1 = b & 0x7f;
if (b & 0x80) {
b = readByte(bb);
part1 |= (b & 0x7f) << 7;
if (b & 0x80) {
b = readByte(bb);
part1 |= (b & 0x7f) << 14;
if (b & 0x80) {
b = readByte(bb);
part1 |= (b & 0x7f) << 21;
if (b & 0x80) {
b = readByte(bb);
part2 = b & 0x7f;
if (b & 0x80) {
b = readByte(bb);
part2 |= (b & 0x7f) << 7;
}
}
}
}
}
}
}
}
}
return {
low: part0 | (part1 << 28),
high: (part1 >>> 4) | (part2 << 24),
unsigned,
};
}
function writeVarint64(bb: ByteBuffer, value: Long): void {
let part0 = value.low >>> 0;
let part1 = ((value.low >>> 28) | (value.high << 4)) >>> 0;
let part2 = value.high >>> 24;
// ref: src/google/protobuf/io/coded_stream.cc
let size =
part2 === 0
? part1 === 0
? part0 < 1 << 14
? part0 < 1 << 7
? 1
: 2
: part0 < 1 << 21
? 3
: 4
: part1 < 1 << 14
? part1 < 1 << 7
? 5
: 6
: part1 < 1 << 21
? 7
: 8
: part2 < 1 << 7
? 9
: 10;
let offset = grow(bb, size);
let bytes = bb.bytes;
switch (size) {
case 10:
bytes[offset + 9] = (part2 >>> 7) & 0x01;
case 9:
bytes[offset + 8] = size !== 9 ? part2 | 0x80 : part2 & 0x7f;
case 8:
bytes[offset + 7] =
size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7f;
case 7:
bytes[offset + 6] =
size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7f;
case 6:
bytes[offset + 5] =
size !== 6 ? (part1 >>> 7) | 0x80 : (part1 >>> 7) & 0x7f;
case 5:
bytes[offset + 4] = size !== 5 ? part1 | 0x80 : part1 & 0x7f;
case 4:
bytes[offset + 3] =
size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7f;
case 3:
bytes[offset + 2] =
size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7f;
case 2:
bytes[offset + 1] =
size !== 2 ? (part0 >>> 7) | 0x80 : (part0 >>> 7) & 0x7f;
case 1:
bytes[offset] = size !== 1 ? part0 | 0x80 : part0 & 0x7f;
}
}
function readVarint32ZigZag(bb: ByteBuffer): number {
let value = readVarint32(bb);
// ref: src/google/protobuf/wire_format_lite.h
return (value >>> 1) ^ -(value & 1);
}
function writeVarint32ZigZag(bb: ByteBuffer, value: number): void {
// ref: src/google/protobuf/wire_format_lite.h
writeVarint32(bb, (value << 1) ^ (value >> 31));
}
function readVarint64ZigZag(bb: ByteBuffer): Long {
let value = readVarint64(bb, /* unsigned */ false);
let low = value.low;
let high = value.high;
let flip = -(low & 1);
// ref: src/google/protobuf/wire_format_lite.h
return {
low: ((low >>> 1) | (high << 31)) ^ flip,
high: (high >>> 1) ^ flip,
unsigned: false,
};
}
function writeVarint64ZigZag(bb: ByteBuffer, value: Long): void {
let low = value.low;
let high = value.high;
let flip = high >> 31;
// ref: src/google/protobuf/wire_format_lite.h
writeVarint64(bb, {
low: (low << 1) ^ flip,
high: ((high << 1) | (low >>> 31)) ^ flip,
unsigned: false,
});
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) {
getAggregatedShotMetrics(aggregateInput: $aggregateInput) {
aggregationIdentifiers {
featureName
groupName
}
targetMetrics {
count
makePercentage
}
}
}

View File

@@ -1,17 +0,0 @@
query GetAggregateShots($bucketSets: [BucketSetInputGQL!]!) {
getAggregateShots(bucketSets: $bucketSets) {
featureBuckets {
rangeKey
lowerBound
}
targetMetrics {
count
makePercentage
floatFeature {
featureName
average
median
}
}
}
}

View File

@@ -0,0 +1,8 @@
query getDeployedConfig {
getDeployedConfig {
allowNewUsers
devMode
environment
firebase
}
}

38
src/operations/feed.gql Normal file
View File

@@ -0,0 +1,38 @@
query GetFeed(
$limit: Int! = 5
$after: String = null
$filters: VideoFilterInput = null
) {
getUserVideos(limit: $limit, after: $after, filters: $filters) {
videos {
id
owner {
username
}
name
screenshotUri
totalShotsMade
totalShots
makePercentage
createdAt
updatedAt
startTime
endTime
elapsedTime
screenshotUri
stream {
isCompleted
}
tags {
tagClasses {
name
}
name
}
}
pageInfo {
hasNextPage
endCursor
}
}
}

View File

@@ -0,0 +1,9 @@
query GetVideoMakePercentageIntervals($videoId: ID!, $intervalDuration: Int!) {
getVideoMakePercentageIntervals(
videoId: $videoId
intervalDuration: $intervalDuration
) {
makePercentage
elapsedTime
}
}

View File

@@ -1,30 +1,38 @@
query GetShots(
$filterInput: FilterInput
$includeCueObjectDistance: Boolean! = false
$includeCueObjectAngle: Boolean! = false
$includeCueBallSpeed: Boolean! = false
$includeShotDirection: Boolean! = false
$includeTargetPocketDistance: Boolean! = false
$includeMake: Boolean! = false
$includeIntendedPocketType: Boolean! = false
$filterInput: FilterInput!
$includeCreatedAt: Boolean! = false
$includeUpdatedAt: Boolean! = false
$includeCueObjectFeatures: Boolean! = false
$includePocketingIntentionFeatures: Boolean! = false
$includeCueObjectDistance: Boolean! = false
$includeCueObjectAngle: Boolean! = false
$includeCueBallSpeed: Boolean! = false
$includeShotDirection: Boolean! = false
$includeTargetPocketDistance: Boolean! = false
$includeMake: Boolean! = false
$includeIntendedPocketType: Boolean! = false
) {
getShots(filterInput: $filterInput) {
id
videoId
startFrame
endFrame
createdAt
updatedAt
cueObjectFeatures {
cueObjectDistance @include(if: $includeCueObjectDistance)
cueObjectAngle @include(if: $includeCueObjectAngle)
cueBallSpeed @include(if: $includeCueBallSpeed)
shotDirection @include(if: $includeShotDirection)
}
pocketingIntentionFeatures {
targetPocketDistance @include(if: $includeTargetPocketDistance)
make @include(if: $includeMake)
intendedPocketType @include(if: $includeIntendedPocketType)
}
}
getShots(filterInput: $filterInput) {
id
videoId
startFrame
endFrame
user {
id
}
createdAt @include(if: $includeCreatedAt)
updatedAt @include(if: $includeUpdatedAt)
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
cueObjectDistance @include(if: $includeCueObjectDistance)
cueObjectAngle @include(if: $includeCueObjectAngle)
cueBallSpeed @include(if: $includeCueBallSpeed)
shotDirection @include(if: $includeShotDirection)
}
pocketingIntentionFeatures
@include(if: $includePocketingIntentionFeatures) {
targetPocketDistance @include(if: $includeTargetPocketDistance)
make @include(if: $includeMake)
intendedPocketType @include(if: $includeIntendedPocketType)
}
}
}

38
src/operations/user.gql Normal file
View File

@@ -0,0 +1,38 @@
mutation getProfileImageUploadLink($fileExt: String = ".png") {
getProfileImageUploadLink(fileExt: $fileExt) {
uploadUrl
headers {
key
value
}
}
}
mutation editProfileImageUri($profileImageUri: String!) {
editProfileImageUri(profileImageUri: $profileImageUri) {
id
firebaseUid
username
profileImageUri
createdAt
updatedAt
}
}
query getLoggedInUser {
getLoggedInUser {
id
firebaseUid
username
profileImageUri
activeVideoId
createdAt
updatedAt
}
}
query GetUserPlayTime($userId: Int!) {
getPlayTime(userId: $userId) {
totalSeconds
}
}

150
src/operations/video.gql Normal file
View File

@@ -0,0 +1,150 @@
query GetStreamMonitoringDetails($videoId: Int!) {
getVideo(videoId: $videoId) {
id
totalShots
makePercentage
elapsedTime
homographyHistory {
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
}
stream {
linksRequested
uploadsCompleted
segmentProcessingCursor
isCompleted
uploadCompletionCursor
lastIntendedSegmentBound
}
currentProcessing {
errors {
message
startSegmentIndex
endSegmentIndex
}
}
}
}
query GetVideoUpdatePageDetails($videoId: Int!) {
getVideo(videoId: $videoId) {
id
name
totalShots
makePercentage
elapsedTime
tags {
tagClasses {
name
}
name
}
}
}
mutation DeleteVideo($videoId: Int!) {
deleteVideo(videoId: $videoId)
}
query GetVideoDetails($videoId: Int!) {
getVideo(videoId: $videoId) {
id
name
screenshotUri
averageTimeBetweenShots
elapsedTime
endTime
makePercentage
makePercentage
medianRun
startTime
totalShots
totalShots
totalShotsMade
createdAt
updatedAt
owner {
id
firebaseUid
username
profileImageUri
}
tags {
tagClasses {
name
}
name
}
}
}
query GetVideos($videoIds: [Int!]!) {
getVideos(videoIds: $videoIds) {
id
playlist {
segmentDurations
}
stream {
id
segments {
uploaded
valid
segmentIndex
endFrameIndex
framesPerSecond
}
}
}
}
query GetVideo($videoId: Int!) {
getVideo(videoId: $videoId) {
id
playlist {
segmentDurations
}
stream {
segments {
segmentIndex
endFrameIndex
framesPerSecond
}
}
}
}

View File

@@ -1,40 +1,60 @@
mutation CreateUploadStream(
$videoName: String!,
$deviceType: DeviceTypeEnum,
$osVersion: String,
$appVersion: String,
$browserName: String,
$browserVersion: String,
$locale: String,
$timezone: String,
$networkType: String,
$ipAddress: String
) {
createUploadStream(
videoName: $videoName
uploadMetadata: {
deviceType: $deviceType
osVersion: $osVersion
appVersion: $appVersion
browserName: $browserName
browserVersion: $browserVersion
locale: $locale
timezone: $timezone
networkType: $networkType
ipAddress: $ipAddress
}
) {
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
createUploadStream(videoMetadata: $videoMetadataInput) {
videoId
}
}
mutation GetUploadLink($videoId: Int!, $chunkIndex: Int!) {
getUploadLink(videoId: $videoId, chunkIndex: $chunkIndex) {
mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
getUploadLink(videoId: $videoId, segmentIndex: $segmentIndex) {
uploadUrl
linksRequested
headers {
key
value
}
}
}
mutation TerminateUploadStream($videoId: Int!) {
terminateUploadStream(videoId: $videoId)
mutation EditUploadStream(
$videoId: Int!
$videoMetadataInput: VideoMetadataInput!
) {
editUploadStream(videoId: $videoId, videoMetadata: $videoMetadataInput)
}
query GetUploadStreams(
$limit: Int! = 5
$after: String = null
$filters: VideoFilterInput = null
) {
getUserVideos(limit: $limit, after: $after, filters: $filters) {
videos {
id
}
pageInfo {
hasNextPage
endCursor
}
}
}
query GetUploadStreamsWithDetails(
$limit: Int! = 5
$after: String = null
$filters: VideoFilterInput = null
) {
getUserVideos(limit: $limit, after: $after, filters: $filters) {
videos {
id
name
startTime
stream {
isCompleted
lastIntendedSegmentBound
uploadCompletionCursor
}
}
pageInfo {
hasNextPage
endCursor
}
}
}

View File

@@ -1,31 +1,51 @@
type Query {
getAggregateShots(bucketSets: [BucketSetInputGQL!]!): [AggregateResultGQL!]!
getUser(userId: Int!): UserGQL
getVideo(videoId: Int!): VideoGQL!
getShots(filterInput: FilterInput = null): [ShotGQL!]!
getAggregatedShotMetrics(
aggregateInput: AggregateInputGQL!
): [AggregateResultGQL!]!
getBucketSet(keyName: String!): BucketSetGQL
getDeployedConfig: DeployedConfigGQL!
getVideoMakePercentageIntervals(
videoId: ID!
intervalDuration: Int! = 300
): [MakePercentageIntervalGQL!]!
getShots(filterInput: FilterInput!): [ShotGQL!]!
getUser(userId: Int!): UserGQL
getLoggedInUser: UserGQL
getPlayTime(userId: Int!): UserPlayTimeGQL!
getUserVideos(
userId: Int = null
limit: Int! = 5
after: String = null
filters: VideoFilterInput = null
): VideoHistoryGQL!
getVideo(videoId: Int!): VideoGQL!
getVideos(videoIds: [Int!]!): [VideoGQL!]!
}
type AggregateResultGQL {
featureBuckets: [BucketGQL!]!
targetMetrics: [TargetMetricGQL!]!
aggregationIdentifiers: [AggregationIdentifierGQL!]!
targetMetrics: TargetMetricsGQL!
}
type BucketGQL {
rangeKey: String!
lowerBound: Float!
}
type TargetMetricGQL {
count: Int
makePercentage: Float
floatFeature: TargetFloatFeatureGQL
}
type TargetFloatFeatureGQL {
type AggregationIdentifierGQL {
featureName: String!
average: Float
median: Float
groupName: String!
}
type TargetMetricsGQL {
count: Int!
makePercentage: Float
averageDifficulty: Float
}
input AggregateInputGQL {
aggregations: [AggregationInput!]!
filterInput: FilterInput
}
input AggregationInput {
bucketSet: BucketSetInputGQL = null
enum: EnumAggregation = null
}
input BucketSetInputGQL {
@@ -38,67 +58,37 @@ input BucketInputGQL {
lowerBound: Float!
}
type UserGQL {
id: Int!
username: String!
createdAt: DateTime
updatedAt: DateTime
statistics: UserStatisticsGQL!
input EnumAggregation {
feature: String!
}
"""Date with time (isoformat)"""
scalar DateTime
type UserStatisticsGQL {
totalShots: Int!
totalShotsMade: Int!
makePercentage: Decimal!
averageTimeBetweenShots: Decimal!
timeSpentPlaying: Decimal!
medianRun: Decimal
input FilterInput {
andFilters: AndFilter = null
orFilters: OrFilter = null
cueObjectDistance: RangeFilter = null
targetPocketDistance: RangeFilter = null
cueObjectAngle: RangeFilter = null
cueBallSpeed: RangeFilter = null
difficulty: RangeFilter = null
intendedPocketType: [PocketEnum!] = null
shotDirection: [ShotDirectionEnum!] = null
videoId: [Int!] = null
userId: [Int!] = null
make: [Boolean!] = null
tags: [VideoTagInput!] = null
}
"""Decimal (fixed-point)"""
scalar Decimal
type VideoGQL {
id: Int!
totalShotsMade: Int!
totalShots: Int!
makePercentage: Decimal!
medianRun: Decimal!
averageTimeBetweenShots: Decimal
createdAt: DateTime!
updatedAt: DateTime!
shots: [ShotGQL!]!
startTime: DateTime!
endTime: DateTime!
elapsedTime: Decimal!
framesPerSecond: Int!
totalFrames: Int!
stream: UploadStreamGQL
input AndFilter {
filters: [FilterInput!]!
}
type ShotGQL {
id: Int
videoId: Int
startFrame: Int
endFrame: Int
createdAt: DateTime
updatedAt: DateTime
features: ShotFeaturesGQL
cueObjectFeatures: CueObjectFeaturesGQL
pocketingIntentionFeatures: PocketingIntentionFeaturesGQL
input OrFilter {
filters: [FilterInput!]!
}
type ShotFeaturesGQL {
cueObjectAngle: Float
cueObjectDistance: Float
targetPocketDistance: Float
intendedPocket: PocketEnum
cueBallSpeed: Float
shotDirection: ShotDirectionEnum
bank: BankFeaturesGQL
input RangeFilter {
lessThan: Float = null
greaterThanEqualTo: Float = null
}
enum PocketEnum {
@@ -112,17 +102,57 @@ enum ShotDirectionEnum {
STRAIGHT
}
type BankFeaturesGQL {
wallsHit: [WallTypeEnum!]!
bankAngle: Float!
distance: Float!
input VideoTagInput {
tagClasses: [VideoTagClassInput!]! = []
name: String!
}
enum WallTypeEnum {
LONG
SHORT
input VideoTagClassInput {
name: String!
}
type BucketSetGQL {
keyName: String!
feature: String!
buckets: [BucketGQL!]!
}
type BucketGQL {
rangeKey: String!
lowerBound: Float!
}
type DeployedConfigGQL {
allowNewUsers: Boolean!
firebase: Boolean!
devMode: Boolean!
environment: String!
}
type MakePercentageIntervalGQL {
makePercentage: Float!
elapsedTime: Float!
}
type ShotGQL {
id: Int!
videoId: Int!
startFrame: Int!
endFrame: Int!
createdAt: DateTime
updatedAt: DateTime
cueObjectFeatures: CueObjectFeaturesGQL
pocketingIntentionFeatures: PocketingIntentionFeaturesGQL
bankFeatures: BankFeaturesGQL
serializedShotPaths: SerializedShotPathsGQL
user: UserGQL
}
"""
Date with time (isoformat)
"""
scalar DateTime
type CueObjectFeaturesGQL {
cueObjectDistance: Float
cueObjectAngle: Float
@@ -134,100 +164,171 @@ type PocketingIntentionFeaturesGQL {
targetPocketDistance: Float
make: Boolean
intendedPocketType: PocketEnum
difficulty: Float
}
type BankFeaturesGQL {
wallsHit: [WallTypeEnum!]!
bankAngle: Float!
distance: Float!
}
enum WallTypeEnum {
LONG
SHORT
}
type SerializedShotPathsGQL {
b64EncodedBuffer: String
}
type UserGQL {
id: Int!
firebaseUid: String!
username: String!
activeVideoId: Int
profileImageUri: String
createdAt: DateTime
updatedAt: DateTime
}
type UserPlayTimeGQL {
totalSeconds: Float!
}
type VideoHistoryGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
}
type VideoGQL {
id: Int!
owner: UserGQL
name: String
screenshotUri: String
totalShotsMade: Int!
totalShots: Int!
makePercentage: Float!
medianRun: Float
averageTimeBetweenShots: Float
createdAt: DateTime
updatedAt: DateTime
shots: [ShotGQL!]!
startTime: DateTime
endTime: DateTime
elapsedTime: Float
framesPerSecond: Float!
stream: UploadStreamGQL
playlist: HLSPlaylistGQL
tags: [VideoTag!]!
homographyHistory: [HomographyInfoGQL!]!
currentProcessing: VideoProcessingGQL
}
type UploadStreamGQL {
id: ID!
linksRequested: Int!
uploadsCompleted: Int!
segmentProcessingCursor: Int!
lastIntendedSegmentBound: Int
isCompleted: Boolean!
uploadMetadata: UploadStreamMetadata!
lowestUnuploadedSegmentIndex: Int!
uploadCompletionCursor: Int!
errors: [StreamErrorGQL!]!
createdAt: DateTime!
updatedAt: DateTime!
segments: [UploadSegmentGQL!]!
}
type UploadStreamMetadata {
deviceType: DeviceTypeEnum
osVersion: String
appVersion: String
browserName: String
browserVersion: String
locale: String
timezone: String
networkType: String
ipAddress: String
type StreamErrorGQL {
message: String!
}
enum DeviceTypeEnum {
IOS
ANDROID
BROWSER
type UploadSegmentGQL {
segmentIndex: Int!
uploaded: Boolean!
valid: Boolean!
endFrameIndex: Int
framesPerSecond: Float
durationsInSeconds: Float
linksRequested: Int!
}
input FilterInput {
andFilters: AndFilter = null
orFilters: OrFilter = null
cueObjectDistance: CueObjectDistanceInput = null
targetPocketDistance: TargetPocketDistanceInput = null
cueObjectAngle: CueObjectAngleInput = null
cueBallSpeed: CueBallSpeedInput = null
intendedPocketType: IntendedPocketTypeInput = null
shotDirection: ShotDirectionInput = null
type HLSPlaylistGQL {
videoId: Int!
m3u8Text: String!
segmentDurations: [Float!]!
}
input AndFilter {
filters: [FilterInput!]!
type VideoTag {
tagClasses: [VideoTagClass!]!
name: String!
}
input OrFilter {
filters: [FilterInput!]!
type VideoTagClass {
name: String!
}
input CueObjectDistanceInput {
value: RangeFilter!
type HomographyInfoGQL {
frameIndex: Int!
crop: BoundingBoxGQL!
pockets: [BoundingBoxGQL!]!
sourcePoints: PocketPointsGQL!
destPoints: PocketPointsGQL!
}
input RangeFilter {
lessThan: Float = null
greaterThanEqualTo: Float = null
type BoundingBoxGQL {
left: Float!
top: Float!
width: Float!
height: Float!
}
input TargetPocketDistanceInput {
value: RangeFilter!
type PocketPointsGQL {
topLeft: IntPoint2D!
topSide: IntPoint2D!
topRight: IntPoint2D!
bottomLeft: IntPoint2D!
bottomSide: IntPoint2D!
bottomRight: IntPoint2D!
}
input CueObjectAngleInput {
value: RangeFilter!
type IntPoint2D {
x: Int!
y: Int!
}
input CueBallSpeedInput {
value: RangeFilter!
type VideoProcessingGQL {
errors: [VideoProcessingErrorGQL!]!
}
input IntendedPocketTypeInput {
value: EnumFilter!
type VideoProcessingErrorGQL {
message: String!
startSegmentIndex: Int
endSegmentIndex: Int
}
input EnumFilter {
equals: String = null
type PageInfoGQL {
hasNextPage: Boolean!
endCursor: String
}
input ShotDirectionInput {
value: EnumFilter!
}
type BucketSetGQL {
keyName: String!
feature: String!
buckets: [BucketGQL!]!
input VideoFilterInput {
isStreamCompleted: Boolean = null
requireCursorCompletion: Boolean! = true
}
type Mutation {
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
processVideoSource(input: ProcessVideoSourceInput!): ProcessVideoSourceReturn!
createUploadStream(uploadMetadata: UploadMetadataInput, videoName: String = null): CreateUploadStreamReturn!
getUploadLink(videoId: Int!, chunkIndex: Int!): GetUploadLinkReturn!
terminateUploadStream(videoId: Int!): Boolean!
setLoggerLevel(path: String!, level: String!): Boolean!
getProfileImageUploadLink(fileExt: String = ".png"): GetUploadLinkReturn!
editProfileImageUri(profileImageUri: String!): UserGQL!
createUploadStream(
videoMetadata: VideoMetadataInput!
): CreateUploadStreamReturn!
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean!
deleteVideo(videoId: Int!): Boolean!
}
input CreateBucketSetInput {
@@ -236,19 +337,32 @@ input CreateBucketSetInput {
buckets: [BucketInputGQL!]!
}
type ProcessVideoSourceReturn {
val: Int!
type GetUploadLinkReturn {
uploadUrl: String!
headers: [Header]!
}
input ProcessVideoSourceInput {
val: Int!
type Header {
key: String!
value: String!
}
type CreateUploadStreamReturn {
videoId: Int!
}
input UploadMetadataInput {
input VideoMetadataInput {
videoName: String = null
startTime: DateTime = null
endTime: DateTime = null
gameType: String = null
tableSize: String = null
uploadStreamMetadataInput: UploadStreamMetadataInput = null
lastIntendedSegmentBound: Int = null
endStream: Boolean! = false
}
input UploadStreamMetadataInput {
deviceType: DeviceTypeEnum = null
osVersion: String = null
appVersion: String = null
@@ -260,8 +374,8 @@ input UploadMetadataInput {
ipAddress: String = null
}
type GetUploadLinkReturn {
uploadUrl: String!
linksRequested: Int!
uploadsCompleted: Int!
enum DeviceTypeEnum {
IOS
ANDROID
BROWSER
}

View File

@@ -1553,6 +1553,11 @@ colorette@^2.0.16:
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a"
integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==
commander@4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-4.0.1.tgz#b67622721785993182e807f4883633e6401ba53c"
integrity sha512-IPF4ouhCP+qdlcmCedhxX4xiGBPyigb8v5NeUp+0LyhwLgxMqyp3S0vl7TAPfS/hiP7FC3caI/PB9lTmP8r1NA==
common-tags@1.8.2:
version "1.8.2"
resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6"
@@ -2538,6 +2543,14 @@ path-type@^4.0.0:
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
pbjs@^0.0.14:
version "0.0.14"
resolved "https://registry.yarnpkg.com/pbjs/-/pbjs-0.0.14.tgz#5ab3d4a5f06a9ab78dd320c63f72877120d4c48d"
integrity sha512-F4aA0ojrQ37kxFPOg4yRLP/vxb76rYQwMQigmVEljYlA7hZKmjaWjP6IkRn4nA0NdIj4Xxe4iqWrrIhJy+MwWQ==
dependencies:
commander "4.0.1"
protocol-buffers-schema "3.1.0"
picocolors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
@@ -2548,6 +2561,16 @@ picomatch@^2.3.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
prettier-plugin-organize-imports@^3.2.4:
version "3.2.4"
resolved "https://registry.yarnpkg.com/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-3.2.4.tgz#77967f69d335e9c8e6e5d224074609309c62845e"
integrity sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==
prettier@^3.2.5:
version "3.2.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==
promise@^7.1.1:
version "7.3.1"
resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
@@ -2564,6 +2587,11 @@ prop-types@^15.7.2:
object-assign "^4.1.1"
react-is "^16.13.1"
protocol-buffers-schema@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/protocol-buffers-schema/-/protocol-buffers-schema-3.1.0.tgz#d8a819549ead3e6bd189ebe9e50e96636bbc5cc7"
integrity sha512-1g9zFjLFhGN1Dc5UVO8D2loVslp6sVxk5sJqgD66CuWUITh2gOaTLRN/pIakGFfB6e0nNF6hImrYFDurEsA1UQ==
punycode@^1.3.2:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"