@eka-care/ekascribe-ts-sdk 1.4.47 → 1.4.48

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.
@@ -14,6 +14,7 @@ async function uploadSingleFile(uploadData, folderPath, file, fileName) {
14
14
  method: 'POST',
15
15
  body: formData,
16
16
  });
17
+ console.log('upload single audio file response ', response);
17
18
  if (response.status === 204) {
18
19
  // S3 returns 204 No Content on successful upload
19
20
  return {
@@ -109,7 +109,7 @@ export type TEndRecordingResponse = {
109
109
  };
110
110
  export type TPostTransactionInitRequest = {
111
111
  mode: string;
112
- s3Url: string;
112
+ s3Url?: string;
113
113
  txn_id: string;
114
114
  input_language: string[];
115
115
  output_format_template: {
@@ -5,4 +5,4 @@ export type TFullAudioUploadResponse = {
5
5
  status_code: number;
6
6
  message: string;
7
7
  };
8
- export declare function postV1UploadAudioFiles({ audioFiles, txn_id, action, transfer, mode, s3Url, input_language, output_format_template, model_training_consent, auto_download, system_info, patient_details, model_type, version, flavour, }: TPostV1UploadAudioFilesRequest): Promise<TFullAudioUploadResponse>;
8
+ export declare function postV1UploadAudioFiles({ audioFiles, txn_id, action, transfer, mode, input_language, output_format_template, model_training_consent, auto_download, system_info, patient_details, model_type, version, flavour, }: TPostV1UploadAudioFilesRequest): Promise<TFullAudioUploadResponse>;
@@ -3,10 +3,11 @@ import postTransactionInit from '../api/transaction/post-transaction-init';
3
3
  import uploadFilesWithPresignedUrl from '../api/upload-audio-with-presigned-url';
4
4
  import { SDK_STATUS_CODE } from '../constants/constant';
5
5
  import { ERROR_CODE } from '../constants/enums';
6
- export async function postV1UploadAudioFiles({ audioFiles, txn_id, action, transfer, mode, s3Url, input_language, output_format_template, model_training_consent, auto_download, system_info, patient_details, model_type, version, flavour, }) {
6
+ export async function postV1UploadAudioFiles({ audioFiles, txn_id, action, transfer, mode, input_language, output_format_template, model_training_consent, auto_download, system_info, patient_details, model_type, version, flavour, }) {
7
7
  try {
8
8
  // Step 1: Get presigned URL
9
9
  const presignedUrlResponse = await postV1FileUpload({ txn_id, action });
10
+ console.log('upload full audio -> presignedUrlResponse ', presignedUrlResponse);
10
11
  if (presignedUrlResponse.code !== 200) {
11
12
  return {
12
13
  error_code: ERROR_CODE.GET_PRESIGNED_URL_FAILED,
@@ -19,6 +20,7 @@ export async function postV1UploadAudioFiles({ audioFiles, txn_id, action, trans
19
20
  audioFiles,
20
21
  presignedUrlResponse,
21
22
  });
23
+ console.log('upload full audio -> uploadResponse ', uploadResponse);
22
24
  if (uploadResponse.code !== 200) {
23
25
  return {
24
26
  error_code: ERROR_CODE.AUDIO_UPLOAD_FAILED,
@@ -30,7 +32,6 @@ export async function postV1UploadAudioFiles({ audioFiles, txn_id, action, trans
30
32
  const initTransactionResponse = await postTransactionInit({
31
33
  mode,
32
34
  txn_id,
33
- s3Url,
34
35
  input_language,
35
36
  output_format_template,
36
37
  model_training_consent,
@@ -43,6 +44,7 @@ export async function postV1UploadAudioFiles({ audioFiles, txn_id, action, trans
43
44
  flavour,
44
45
  batch_s3_url,
45
46
  });
47
+ console.log('upload full audio -> initTransactionResponse ', initTransactionResponse);
46
48
  if (initTransactionResponse.code >= 400) {
47
49
  return {
48
50
  error_code: ERROR_CODE.TXN_INIT_FAILED,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "1.4.47",
3
+ "version": "1.4.48",
4
4
  "main": "dist/index.js",
5
5
  "repository": "git@github.com:eka-care/eka-js-sdk.git",
6
6
  "author": "Sanikagoyal28 <sanikagoyal9@gmail.com>",