@mulingai-npm/redis 3.38.6 → 3.38.8

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.
@@ -132,7 +132,7 @@ export declare class MulingstreamChunkManager {
132
132
  translation?: string;
133
133
  status?: StepStatus;
134
134
  }): Promise<MulingstreamChunkData | null>;
135
- updateTranslationInBulk(roomId: string, n: number, dict: Record<string, string>, status?: StepStatus): Promise<MulingstreamChunkData | null>;
135
+ updateTranslationInBulk(roomId: string, n: number, dict: Record<string, string>, status?: StepStatus, hintsPerLanguage?: Record<string, TranslationHint[]>): Promise<MulingstreamChunkData | null>;
136
136
  updateTts(roomId: string, n: number, lang: string, opt: {
137
137
  ttsAudioPath?: string;
138
138
  status?: StepStatus;
@@ -295,13 +295,16 @@ class MulingstreamChunkManager {
295
295
  e.status = opt.status;
296
296
  });
297
297
  }
298
- async updateTranslationInBulk(roomId, n, dict, status = 'READY') {
298
+ async updateTranslationInBulk(roomId, n, dict, status = 'READY', hintsPerLanguage) {
299
299
  return this.withChunk(roomId, n, (c) => {
300
300
  Object.entries(dict).forEach(([l, txt]) => {
301
301
  if (!c.translation[l])
302
302
  return;
303
303
  c.translation[l].translation = txt;
304
304
  c.translation[l].status = status;
305
+ if (hintsPerLanguage && hintsPerLanguage[l]) {
306
+ c.translation[l].hints = hintsPerLanguage[l];
307
+ }
305
308
  });
306
309
  });
307
310
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mulingai-npm/redis",
3
- "version": "3.38.6",
3
+ "version": "3.38.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": {