@@ -116,10 +116,11 @@ const deleteSubmission = (config, submissionId, jwt = null) => {
116
116
* Function to download submission by id.
117
117
* @param {Object } config Configuration object
118
118
* @param {String } submissionId the submission id
119
+ * @param {Boolean } streamed Whether a stream is to be returned (Default: false)
119
120
* @returns {Promise } the submission file content
120
121
*/
121
- const downloadSubmission = ( config , submissionId , jwt = null ) => {
122
- return helper . reqToV5APIDownload ( config , jwt , `${ config . SUBMISSION_API_URL } /submissions/${ submissionId } /download` )
122
+ const downloadSubmission = ( config , submissionId , jwt = null , streamed = false ) => {
123
+ return helper . reqToV5APIDownload ( config , jwt , `${ config . SUBMISSION_API_URL } /submissions/${ submissionId } /download` , streamed )
123
124
}
124
125
125
126
/**
@@ -149,21 +150,11 @@ const listArtifacts = (config, submissionId, jwt = null) => {
149
150
* @param {Object } config Configuration object
150
151
* @param {String } submissionId the submission id
151
152
* @param {String } artifactId the artifact id
153
+ * @param {Boolean } streamed Whether a stream is to be returned (Default: false)
152
154
* @returns {Promise } the artifact file content
153
155
*/
154
- const downloadArtifact = ( config , submissionId , artifactId , jwt = null ) => {
155
- return helper . reqToV5APIDownload ( config , jwt , `${ config . SUBMISSION_API_URL } /submissions/${ submissionId } /artifacts/${ artifactId } /download` )
156
- }
157
-
158
- /**
159
- * Function to delete artifact using submission id and artifact id
160
- * @param {Object } config Configuration object
161
- * @param {String } submissionId the submission id
162
- * @param {String } artifactId the artifact id
163
- * @returns {Promise }
164
- */
165
- const deleteArtifact = ( config , submissionId , artifactId , jwt = null ) => {
166
- return helper . reqToV5API ( config , jwt , 'DELETE' , `${ config . SUBMISSION_API_URL } /submissions/${ submissionId } /artifacts/${ artifactId } ` )
156
+ const downloadArtifact = ( config , submissionId , artifactId , jwt = null , streamed = false ) => {
157
+ return helper . reqToV5APIDownload ( config , jwt , `${ config . SUBMISSION_API_URL } /submissions/${ submissionId } /artifacts/${ artifactId } /download` , streamed )
167
158
}
168
159
169
160
module . exports = {
@@ -178,6 +169,5 @@ module.exports = {
178
169
downloadSubmission,
179
170
createArtifact,
180
171
listArtifacts,
181
- downloadArtifact,
182
- deleteArtifact
172
+ downloadArtifact
183
173
}
0 commit comments