@eka-care/ekascribe-ts-sdk 1.4.41 → 1.4.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/post-v1-file-upload.d.ts +6 -0
- package/dist/api/post-v1-file-upload.js +29 -0
- package/dist/api/transaction/post-transaction-init.d.ts +1 -1
- package/dist/api/transaction/post-transaction-init.js +5 -2
- package/dist/api/upload-audio-with-presigned-url.d.ts +10 -0
- package/dist/api/upload-audio-with-presigned-url.js +60 -0
- package/dist/constants/enums.d.ts +2 -1
- package/dist/constants/enums.js +1 -0
- package/dist/constants/types.d.ts +32 -2
- package/dist/fetch-client/helper.d.ts +1 -0
- package/dist/fetch-client/helper.js +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/main/init-transaction.d.ts +1 -1
- package/dist/main/init-transaction.js +3 -10
- package/dist/main/upload-full-audio-with-presigned-url.d.ts +12 -0
- package/dist/main/upload-full-audio-with-presigned-url.js +41 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SDK_STATUS_CODE } from '../constants/constant';
|
|
2
|
+
import fetchWrapper from '../fetch-client';
|
|
3
|
+
import { GET_EKA_HOST } from '../fetch-client/helper';
|
|
4
|
+
async function postV1FileUpload({ txn_id, action, }) {
|
|
5
|
+
try {
|
|
6
|
+
const headers = new Headers();
|
|
7
|
+
headers.append('Content-Type', 'application/json');
|
|
8
|
+
const options = {
|
|
9
|
+
method: 'POST',
|
|
10
|
+
headers,
|
|
11
|
+
body: JSON.stringify({}),
|
|
12
|
+
};
|
|
13
|
+
const response = await fetchWrapper(`${GET_EKA_HOST()}/v1/file-upload?txn_id=${txn_id}&action=${action}`, options);
|
|
14
|
+
let res = await response.json();
|
|
15
|
+
res = {
|
|
16
|
+
...res,
|
|
17
|
+
code: response.status,
|
|
18
|
+
};
|
|
19
|
+
return res;
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.log('%c getPresignedUrl -> error', 'color:#f5ce50', error);
|
|
23
|
+
return {
|
|
24
|
+
code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
25
|
+
message: `Something went wrong! ${error}`,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export default postV1FileUpload;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TPostTransactionInitRequest, TPostTransactionResponse } from '../../constants/types';
|
|
2
|
-
declare function postTransactionInit({ mode,
|
|
2
|
+
declare function postTransactionInit({ mode, txn_id, s3Url, input_language, output_format_template, model_training_consent, auto_download, transfer, system_info, patient_details, model_type, version, flavour, }: TPostTransactionInitRequest): Promise<TPostTransactionResponse>;
|
|
3
3
|
export default postTransactionInit;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SDK_STATUS_CODE } from '../../constants/constant';
|
|
2
2
|
import fetchWrapper from '../../fetch-client';
|
|
3
3
|
import { GET_EKA_VOICE_HOST_V2 } from '../../fetch-client/helper';
|
|
4
|
-
async function postTransactionInit({ mode,
|
|
4
|
+
async function postTransactionInit({ mode, txn_id, s3Url, input_language, output_format_template, model_training_consent, auto_download, transfer, system_info, patient_details, model_type, version, flavour, }) {
|
|
5
5
|
try {
|
|
6
6
|
const headers = new Headers();
|
|
7
7
|
headers.append('Content-Type', 'application/json');
|
|
@@ -15,13 +15,16 @@ async function postTransactionInit({ mode, txnId, s3Url, input_language, output_
|
|
|
15
15
|
transfer,
|
|
16
16
|
system_info,
|
|
17
17
|
patient_details,
|
|
18
|
+
model_type,
|
|
19
|
+
version,
|
|
20
|
+
flavour,
|
|
18
21
|
};
|
|
19
22
|
const options = {
|
|
20
23
|
method: 'POST',
|
|
21
24
|
headers,
|
|
22
25
|
body: JSON.stringify(raw),
|
|
23
26
|
};
|
|
24
|
-
const response = await fetchWrapper(`${GET_EKA_VOICE_HOST_V2()}/transaction/init/${
|
|
27
|
+
const response = await fetchWrapper(`${GET_EKA_VOICE_HOST_V2()}/transaction/init/${txn_id}`, options);
|
|
25
28
|
let res = await response.json();
|
|
26
29
|
res = {
|
|
27
30
|
...res,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TPostV1FileUploadResponse } from '../constants/types';
|
|
2
|
+
type TUploadFilesResponse = {
|
|
3
|
+
code: number;
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
declare function uploadFilesWithPresignedUrl({ audioFiles, presignedUrlResponse, }: {
|
|
7
|
+
audioFiles: File[] | Blob[];
|
|
8
|
+
presignedUrlResponse: TPostV1FileUploadResponse;
|
|
9
|
+
}): Promise<TUploadFilesResponse>;
|
|
10
|
+
export default uploadFilesWithPresignedUrl;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { SDK_STATUS_CODE } from '../constants/constant';
|
|
2
|
+
async function uploadSingleFile(uploadData, folderPath, file, fileName) {
|
|
3
|
+
try {
|
|
4
|
+
const updatedFields = {
|
|
5
|
+
...uploadData.fields,
|
|
6
|
+
key: folderPath + fileName,
|
|
7
|
+
};
|
|
8
|
+
const formData = new FormData();
|
|
9
|
+
Object.entries(updatedFields).forEach(([key, value]) => {
|
|
10
|
+
formData.append(key, value);
|
|
11
|
+
});
|
|
12
|
+
formData.append('file', file);
|
|
13
|
+
const response = await fetch(uploadData.url, {
|
|
14
|
+
method: 'POST',
|
|
15
|
+
body: formData,
|
|
16
|
+
});
|
|
17
|
+
if (response.status === 204) {
|
|
18
|
+
// S3 returns 204 No Content on successful upload
|
|
19
|
+
return {
|
|
20
|
+
key: folderPath + fileName,
|
|
21
|
+
size: file.size,
|
|
22
|
+
success: true,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
throw new Error(`Upload failed with status: ${response.status}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
console.error('uploadSingleFile error:', error);
|
|
31
|
+
return {
|
|
32
|
+
success: false,
|
|
33
|
+
error: `Upload failed: ${error}`,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function uploadFilesWithPresignedUrl({ audioFiles, presignedUrlResponse, }) {
|
|
38
|
+
try {
|
|
39
|
+
const uploadPromises = audioFiles.map((file, index) => {
|
|
40
|
+
const fileName = `audio_${index + 1}`;
|
|
41
|
+
return uploadSingleFile({ ...presignedUrlResponse.uploadData }, presignedUrlResponse.folderPath, file, fileName);
|
|
42
|
+
});
|
|
43
|
+
const results = await Promise.all(uploadPromises);
|
|
44
|
+
const failedUploads = results.filter((result) => !result.success);
|
|
45
|
+
const successfulUploads = results.filter((result) => result.success);
|
|
46
|
+
// TODO: presigned url expiry handling and failed files handling
|
|
47
|
+
return {
|
|
48
|
+
code: failedUploads.length > 0 ? 207 : 200, // 207 for partial success, 200 for all success
|
|
49
|
+
message: `Upload completed. ${successfulUploads.length}/${results.length} files uploaded successfully.`,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.error('uploadAudioFilesWithPresignedUrl error:', error);
|
|
54
|
+
return {
|
|
55
|
+
code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
56
|
+
message: `Upload failed: ${error}`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export default uploadFilesWithPresignedUrl;
|
|
@@ -24,7 +24,8 @@ export declare enum ERROR_CODE {
|
|
|
24
24
|
NO_AUDIO_CAPTURE = "no_audio_capture",
|
|
25
25
|
SPEECH_DETECTED = "speech_detected",
|
|
26
26
|
TXN_STATUS_MISMATCH = "txn_status_mismatch",
|
|
27
|
-
LONG_SILENCE = "long_silence"
|
|
27
|
+
LONG_SILENCE = "long_silence",
|
|
28
|
+
GET_PRESIGNED_URL_FAILED = "get_presigned_url_failed"
|
|
28
29
|
}
|
|
29
30
|
export declare enum PROCESSING_STATUS {
|
|
30
31
|
SUCCESS = "success",
|
package/dist/constants/enums.js
CHANGED
|
@@ -28,6 +28,7 @@ export var ERROR_CODE;
|
|
|
28
28
|
ERROR_CODE["SPEECH_DETECTED"] = "speech_detected";
|
|
29
29
|
ERROR_CODE["TXN_STATUS_MISMATCH"] = "txn_status_mismatch";
|
|
30
30
|
ERROR_CODE["LONG_SILENCE"] = "long_silence";
|
|
31
|
+
ERROR_CODE["GET_PRESIGNED_URL_FAILED"] = "get_presigned_url_failed";
|
|
31
32
|
})(ERROR_CODE || (ERROR_CODE = {}));
|
|
32
33
|
export var PROCESSING_STATUS;
|
|
33
34
|
(function (PROCESSING_STATUS) {
|
|
@@ -56,12 +56,16 @@ export type TStartRecordingRequest = {
|
|
|
56
56
|
transfer: string;
|
|
57
57
|
system_info: TSystemInfo;
|
|
58
58
|
patient_details?: TPatientDetails;
|
|
59
|
+
model_type: string;
|
|
60
|
+
version?: string;
|
|
61
|
+
flavour?: string;
|
|
59
62
|
};
|
|
63
|
+
export type Gender = 'M' | 'F' | 'O';
|
|
60
64
|
export type TPatientDetails = {
|
|
61
65
|
username: string;
|
|
62
66
|
oid: string;
|
|
63
67
|
age: number;
|
|
64
|
-
biologicalSex:
|
|
68
|
+
biologicalSex: Gender;
|
|
65
69
|
mobile?: string;
|
|
66
70
|
email?: string;
|
|
67
71
|
};
|
|
@@ -104,7 +108,7 @@ export type TEndRecordingResponse = {
|
|
|
104
108
|
export type TPostTransactionInitRequest = {
|
|
105
109
|
mode: string;
|
|
106
110
|
s3Url: string;
|
|
107
|
-
|
|
111
|
+
txn_id: string;
|
|
108
112
|
input_language: string[];
|
|
109
113
|
output_format_template: {
|
|
110
114
|
template_id: string;
|
|
@@ -114,6 +118,9 @@ export type TPostTransactionInitRequest = {
|
|
|
114
118
|
model_training_consent: boolean;
|
|
115
119
|
system_info: TSystemInfo;
|
|
116
120
|
patient_details?: TPatientDetails;
|
|
121
|
+
model_type: string;
|
|
122
|
+
version?: string;
|
|
123
|
+
flavour?: string;
|
|
117
124
|
};
|
|
118
125
|
export type TPostTransactionCommitRequest = {
|
|
119
126
|
audioFiles: string[];
|
|
@@ -337,3 +344,26 @@ export type TPostV1ConvertToTemplateResponse = {
|
|
|
337
344
|
display_message: string;
|
|
338
345
|
};
|
|
339
346
|
};
|
|
347
|
+
export type TV1FileUploadFields = {
|
|
348
|
+
'x-amz-meta-mode': string;
|
|
349
|
+
key: string;
|
|
350
|
+
'x-amz-algorithm': string;
|
|
351
|
+
'x-amz-credential': string;
|
|
352
|
+
'x-amz-date': string;
|
|
353
|
+
policy: string;
|
|
354
|
+
'x-amz-signature': string;
|
|
355
|
+
};
|
|
356
|
+
export type TPostV1FileUploadResponse = {
|
|
357
|
+
uploadData: {
|
|
358
|
+
url: string;
|
|
359
|
+
fields: TV1FileUploadFields;
|
|
360
|
+
};
|
|
361
|
+
folderPath: string;
|
|
362
|
+
txn_id: string;
|
|
363
|
+
code?: number;
|
|
364
|
+
message?: string;
|
|
365
|
+
error?: {
|
|
366
|
+
code: string;
|
|
367
|
+
message: string;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
@@ -10,4 +10,5 @@ export declare const GET_EKA_VOICE_HOST_V2: () => string;
|
|
|
10
10
|
export declare const GET_EKA_VOICE_HOST_V3: () => string;
|
|
11
11
|
export declare const GET_COOK_HOST_V1: () => string;
|
|
12
12
|
export declare const GET_COG_HOST: () => string;
|
|
13
|
+
export declare const GET_EKA_HOST: () => string;
|
|
13
14
|
export default setEnv;
|
|
@@ -4,6 +4,7 @@ const DEV = {
|
|
|
4
4
|
EKA_VOICE_HOST_V2: 'https://v2rxbe.dev.eka.care/voice/api/v2',
|
|
5
5
|
EKA_VOICE_HOST_V3: 'https://v2rxbe.dev.eka.care/voice/api/v3',
|
|
6
6
|
COOK_V1: ' https://deepthought-genai.dev.eka.care/api/v1',
|
|
7
|
+
EKA_HOST: 'https://api.dev.eka.care',
|
|
7
8
|
};
|
|
8
9
|
const PROD = {
|
|
9
10
|
COG_HOST: 'https://cog.eka.care',
|
|
@@ -11,6 +12,7 @@ const PROD = {
|
|
|
11
12
|
EKA_VOICE_HOST_V2: 'https://api.eka.care/voice/api/v2',
|
|
12
13
|
EKA_VOICE_HOST_V3: 'https://api.eka.care/voice/api/v3',
|
|
13
14
|
COOK_V1: ' https://cook.eka.care/api/v1',
|
|
15
|
+
EKA_HOST: 'https://api.eka.care',
|
|
14
16
|
};
|
|
15
17
|
let envVar = PROD;
|
|
16
18
|
let client_id = 'doc-web';
|
|
@@ -33,4 +35,5 @@ export const GET_EKA_VOICE_HOST_V2 = () => envVar.EKA_VOICE_HOST_V2;
|
|
|
33
35
|
export const GET_EKA_VOICE_HOST_V3 = () => envVar.EKA_VOICE_HOST_V3;
|
|
34
36
|
export const GET_COOK_HOST_V1 = () => envVar.COOK_V1;
|
|
35
37
|
export const GET_COG_HOST = () => envVar.COG_HOST;
|
|
38
|
+
export const GET_EKA_HOST = () => envVar.EKA_HOST;
|
|
36
39
|
export default setEnv;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TGetStatusResponse } from './api/transaction/get-voice-api-v3-status';
|
|
2
2
|
import { TEndRecordingResponse, TErrorCallback, TFileUploadProgressCallback, TGetTransactionHistoryResponse, TPatchTransactionRequest, TPatchVoiceApiV2ConfigRequest, TPostTransactionResponse, TPostV1ConvertToTemplateRequest, TPostV1TemplateRequest, TPostV1TemplateSectionRequest, TStartRecordingRequest } from './constants/types';
|
|
3
3
|
import { TSearchSessionsByPatientRequest } from './utils/search-sessions-by-patient-name';
|
|
4
|
+
import { TFullAudioRequest } from './main/upload-full-audio-with-presigned-url';
|
|
4
5
|
declare class EkaScribe {
|
|
5
6
|
private static instance;
|
|
6
7
|
private vadInstance;
|
|
@@ -64,6 +65,7 @@ declare class EkaScribe {
|
|
|
64
65
|
deleteTemplateSection(section_id: string): Promise<import("./constants/types").TPostV1TemplateSectionResponse>;
|
|
65
66
|
postTransactionConvertToTemplate({ txn_id, template_id }: TPostV1ConvertToTemplateRequest): Promise<import("./constants/types").TPostV1ConvertToTemplateResponse>;
|
|
66
67
|
searchSessionsByPatientName(request: TSearchSessionsByPatientRequest): Promise<unknown>;
|
|
68
|
+
uploadAudioWithPresignedUrl(request: TFullAudioRequest): Promise<import("./main/upload-full-audio-with-presigned-url").TFullAudioUploadResponse>;
|
|
67
69
|
}
|
|
68
70
|
export declare const getEkaScribeInstance: ({ access_token, env, clientId, }: {
|
|
69
71
|
access_token?: string;
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,7 @@ import patchVoiceApiV2Config from './api/config/patch-voice-api-v2-config';
|
|
|
29
29
|
import cookV1MediaAiCreateTemplate from './api/templates/cook-v1-medai-ai-create-template';
|
|
30
30
|
import postV1ConvertToTemplate from './api/templates/post-transaction-convert-to-template';
|
|
31
31
|
import searchSessionsByPatient from './utils/search-sessions-by-patient-name';
|
|
32
|
+
import { postV1UploadAudioFiles, } from './main/upload-full-audio-with-presigned-url';
|
|
32
33
|
class EkaScribe {
|
|
33
34
|
// Private constructor to prevent direct instantiation
|
|
34
35
|
constructor() {
|
|
@@ -317,6 +318,10 @@ class EkaScribe {
|
|
|
317
318
|
const searchSessionsByPatientNameResponse = await searchSessionsByPatient(request);
|
|
318
319
|
return searchSessionsByPatientNameResponse;
|
|
319
320
|
}
|
|
321
|
+
async uploadAudioWithPresignedUrl(request) {
|
|
322
|
+
const uploadAudioFilesResponse = await postV1UploadAudioFiles(request);
|
|
323
|
+
return uploadAudioFilesResponse;
|
|
324
|
+
}
|
|
320
325
|
}
|
|
321
326
|
Object.defineProperty(EkaScribe, "instance", {
|
|
322
327
|
enumerable: true,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TStartRecordingRequest, TStartRecordingResponse } from '../constants/types';
|
|
2
|
-
declare const initialiseTransaction: (
|
|
2
|
+
declare const initialiseTransaction: (request: TStartRecordingRequest) => Promise<TStartRecordingResponse>;
|
|
3
3
|
export default initialiseTransaction;
|
|
@@ -2,8 +2,9 @@ import postTransactionInit from '../api/transaction/post-transaction-init';
|
|
|
2
2
|
import { S3_BUCKET_NAME, SDK_STATUS_CODE } from '../constants/constant';
|
|
3
3
|
import { ERROR_CODE } from '../constants/enums';
|
|
4
4
|
import EkaScribeStore from '../store/store';
|
|
5
|
-
const initialiseTransaction = async (
|
|
5
|
+
const initialiseTransaction = async (request) => {
|
|
6
6
|
try {
|
|
7
|
+
const { txn_id } = request;
|
|
7
8
|
const fileManagerInstance = EkaScribeStore.audioFileManagerInstance;
|
|
8
9
|
const sessionStatus = EkaScribeStore.sessionStatus;
|
|
9
10
|
let businessID = '';
|
|
@@ -23,16 +24,8 @@ const initialiseTransaction = async ({ mode, input_language, output_format_templ
|
|
|
23
24
|
const filePath = `${year}${month}${day}/${txn_id}`;
|
|
24
25
|
EkaScribeStore.sessionBucketPath = filePath;
|
|
25
26
|
const txnInitResponse = await postTransactionInit({
|
|
26
|
-
|
|
27
|
-
txnId: txn_id,
|
|
27
|
+
...request,
|
|
28
28
|
s3Url: `s3://${S3_BUCKET_NAME}/${filePath}`,
|
|
29
|
-
input_language,
|
|
30
|
-
output_format_template,
|
|
31
|
-
transfer,
|
|
32
|
-
auto_download,
|
|
33
|
-
model_training_consent,
|
|
34
|
-
system_info,
|
|
35
|
-
patient_details,
|
|
36
29
|
});
|
|
37
30
|
const { code: txnInitStatusCode, b_id: businessId, oid, uuid, message: txnInitMessage, error: txnInitError, } = txnInitResponse;
|
|
38
31
|
if (txnInitStatusCode === 400 && txnInitError?.code === ERROR_CODE.TXN_LIMIT_EXCEEDED) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ERROR_CODE } from '../constants/enums';
|
|
2
|
+
export type TFullAudioUploadResponse = {
|
|
3
|
+
error_code?: ERROR_CODE;
|
|
4
|
+
status_code: number;
|
|
5
|
+
message: string;
|
|
6
|
+
};
|
|
7
|
+
export type TFullAudioRequest = {
|
|
8
|
+
txn_id: string;
|
|
9
|
+
action: string;
|
|
10
|
+
audioFiles: File[] | Blob[];
|
|
11
|
+
};
|
|
12
|
+
export declare function postV1UploadAudioFiles({ audioFiles, txn_id, action, }: TFullAudioRequest): Promise<TFullAudioUploadResponse>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import postV1FileUpload from '../api/post-v1-file-upload';
|
|
2
|
+
import uploadFilesWithPresignedUrl from '../api/upload-audio-with-presigned-url';
|
|
3
|
+
import { SDK_STATUS_CODE } from '../constants/constant';
|
|
4
|
+
import { ERROR_CODE } from '../constants/enums';
|
|
5
|
+
export async function postV1UploadAudioFiles({ audioFiles, txn_id, action, }) {
|
|
6
|
+
try {
|
|
7
|
+
if (!audioFiles || audioFiles.length === 0) {
|
|
8
|
+
return {
|
|
9
|
+
error_code: ERROR_CODE.INVALID_REQUEST,
|
|
10
|
+
status_code: SDK_STATUS_CODE.BAD_REQUEST,
|
|
11
|
+
message: 'No audio files provided',
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
// Step 1: Get presigned URL
|
|
15
|
+
const presignedUrlResponse = await postV1FileUpload({ txn_id, action });
|
|
16
|
+
if (presignedUrlResponse.code !== 200) {
|
|
17
|
+
return {
|
|
18
|
+
error_code: ERROR_CODE.GET_PRESIGNED_URL_FAILED,
|
|
19
|
+
status_code: presignedUrlResponse.code || SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
20
|
+
message: presignedUrlResponse.message || 'Get presigned URL failed',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
// Step 2: Upload files using the presigned URL
|
|
24
|
+
const uploadResponse = await uploadFilesWithPresignedUrl({
|
|
25
|
+
audioFiles,
|
|
26
|
+
presignedUrlResponse,
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
status_code: uploadResponse.code || SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
30
|
+
message: uploadResponse.message || 'File uploaded.',
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
console.error('getPresignedUrlAndUploadFiles error:', error);
|
|
35
|
+
return {
|
|
36
|
+
error_code: ERROR_CODE.INTERNAL_SERVER_ERROR,
|
|
37
|
+
status_code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
38
|
+
message: `Complete upload workflow failed: ${error}`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|