-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GQL data request updated with new media and task shapes (#182)
* GQL data request updated with new media and task shapes
- Loading branch information
1 parent
8cf3c4f
commit 4cb45d9
Showing
11 changed files
with
473 additions
and
2,364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,11 @@ | |
This software is Copyright ©️ 2020 The University of Southern California. All Rights Reserved. | ||
Permission to use, copy, modify, and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and subject to the full license file found in the root of this software deliverable. Permission to make commercial use of this software may be obtained by contacting: USC Stevens Center for Innovation University of Southern California 1150 S. Olive Street, Suite 2300, Los Angeles, CA 90115, USA Email: [email protected] | ||
The full terms of this copyright and license should always be found in the root directory of this software deliverable as "license.txt" and if these terms are not found with this software, please contact the USC Stevens Center for the full license. | ||
*/ | ||
/* | ||
This software is Copyright ©️ 2020 The University of Southern California. All Rights Reserved. | ||
Permission to use, copy, modify, and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and subject to the full license file found in the root of this software deliverable. Permission to make commercial use of this software may be obtained by contacting: USC Stevens Center for Innovation University of Southern California 1150 S. Olive Street, Suite 2300, Los Angeles, CA 90115, USA Email: [email protected] | ||
The full terms of this copyright and license should always be found in the root directory of this software deliverable as "license.txt" and if these terms are not found with this software, please contact the USC Stevens Center for the full license. | ||
*/ | ||
import axios, { | ||
|
@@ -22,7 +27,6 @@ import { | |
TaskStatus, | ||
TrainingInfo, | ||
VideoInfo, | ||
CancelJob, | ||
FollowUpQuestion, | ||
User, | ||
Config, | ||
|
@@ -842,7 +846,19 @@ export async function fetchMentorById( | |
transcript | ||
status | ||
hasUntransferredMedia | ||
media { | ||
webMedia { | ||
type | ||
tag | ||
url | ||
needsTransfer | ||
} | ||
mobileMedia{ | ||
type | ||
tag | ||
url | ||
needsTransfer | ||
} | ||
vttMedia{ | ||
type | ||
tag | ||
url | ||
|
@@ -1120,28 +1136,6 @@ export async function fetchVideoBlobFromUrl(url: string): Promise<Blob> { | |
return result.data; | ||
} | ||
|
||
export async function cancelUploadVideo( | ||
mentorId: string, | ||
question: string, | ||
taskIds: string[], | ||
accessToken: string | ||
): Promise<CancelJob> { | ||
const result = await uploadRequest.post( | ||
"/answer/cancel", | ||
{ | ||
mentor: mentorId, | ||
question: question, | ||
task_ids_to_cancel: taskIds, | ||
}, | ||
{ | ||
headers: { | ||
Authorization: `Bearer ${accessToken}`, | ||
}, | ||
} | ||
); | ||
return getDataFromAxiosResponse(result, []); | ||
} | ||
|
||
export async function fetchUploadVideoStatus( | ||
statusUrl: string | ||
): Promise<TaskStatus<VideoInfo>> { | ||
|
@@ -1209,13 +1203,39 @@ export async function fetchUploadTasks( | |
_id | ||
question | ||
} | ||
taskList{ | ||
trimUploadTask{ | ||
task_name | ||
status | ||
} | ||
transcodeWebTask{ | ||
task_name | ||
status | ||
} | ||
transcodeMobileTask{ | ||
task_name | ||
status | ||
} | ||
transcribeTask{ | ||
task_name | ||
task_id | ||
status | ||
} | ||
transcript | ||
media { | ||
originalMedia { | ||
type | ||
tag | ||
url | ||
} | ||
webMedia { | ||
type | ||
tag | ||
url | ||
} | ||
mobileMedia{ | ||
type | ||
tag | ||
url | ||
} | ||
vttMedia{ | ||
type | ||
tag | ||
url | ||
|
@@ -1321,7 +1341,19 @@ export async function exportMentor(mentor: string): Promise<MentorExportJson> { | |
transcript | ||
status | ||
hasUntransferredMedia | ||
media { | ||
webMedia { | ||
type | ||
tag | ||
url | ||
needsTransfer | ||
} | ||
mobileMedia{ | ||
type | ||
tag | ||
url | ||
needsTransfer | ||
} | ||
vttMedia{ | ||
type | ||
tag | ||
url | ||
|
@@ -1495,7 +1527,19 @@ export async function importMentorPreview( | |
transcript | ||
status | ||
hasUntransferredMedia | ||
media { | ||
webMedia { | ||
type | ||
tag | ||
url | ||
needsTransfer | ||
} | ||
mobileMedia{ | ||
type | ||
tag | ||
url | ||
needsTransfer | ||
} | ||
vttMedia{ | ||
type | ||
tag | ||
url | ||
|
@@ -1517,7 +1561,19 @@ export async function importMentorPreview( | |
status | ||
hasEditedTranscript | ||
hasUntransferredMedia | ||
media { | ||
webMedia { | ||
type | ||
tag | ||
url | ||
needsTransfer | ||
} | ||
mobileMedia{ | ||
type | ||
tag | ||
url | ||
needsTransfer | ||
} | ||
vttMedia{ | ||
type | ||
tag | ||
url | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.