updateRecordTransferResult(params: Object)

Requires:
WearKit≥1.0.0@ray-js/ray≥1.7.14
Platforms:
iOSAndroid
import { wear } from '@ray-js/ray';

const { updateRecordTransferResult } = wear;

// Promise usage
try {
  const res = await updateRecordTransferResult({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

Update recording transcription result.

Parameters

PropertyTypeRequiredDescriptionWearKit Since
recordTransferIdnumberYesRecording transcription ID-
directoryIdstringNoFolder ID; if omitted, no update-
namestringNoFile name; omit to keep unchanged-
fileNamestringNoRecording filename; if omitted, no update-
wavFileNamestringNoRecording WAV filename; if omitted, no update-
amplitudesstringNoAmplitude string, separated by commas; if omitted, no update-
statusstringNoFile sync status: 0 not uploaded, 1 uploading, 2 uploaded, 3 upload failed; if omitted, no update-
visitstringNoRead status: 0 unread, 1 read, 2 revised-read, 3 revised-unread-
removestringNoWhether removed (moved to trash); omit to keep unchanged-
storageKeystringNoCloud storage key; if omitted, no update-
transferstringNoTranscription status: 0 not transcribed, 1 transcribing, 2 transcribed, 3 transcription failed; if omitted, no update-
tagsstring[]NoTag list, e.g., ["Client visit","Class A client"]v2.1.0
complete() => voidNoCompletion callback (executed on both success and failure)-
success() => voidNoCallback on successful API call-
fail(params: Object) => voidNoFailure callback-
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Error Code

Error CodeError Message
10001Internal error
10012Record not found

Examples

Basic usage

import { wear } from '@ray-js/ray'

wear.updateRecordTransferResult({
  recordTransferId: 1001,
  name: 'new title',
  success: () => {
    console.log('updateRecordTransferResult success');
  },
  fail: error => {
    console.error(error);
  },
});