@eka-care/ekascribe-ts-sdk 1.5.57 → 1.5.59

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.
@@ -0,0 +1,2 @@
1
+ import { TGetConfigV2Response } from '../../constants/types';
2
+ export declare const getConfigV2MyTemplates: () => Promise<TGetConfigV2Response>;
@@ -0,0 +1,26 @@
1
+ import { SDK_STATUS_CODE } from '../../constants/constant';
2
+ import fetchWrapper from '../../fetch-client';
3
+ import { GET_EKA_VOICE_HOST_V2 } from '../../fetch-client/helper';
4
+ export const getConfigV2MyTemplates = async () => {
5
+ try {
6
+ const options = {
7
+ method: 'GET',
8
+ headers: {
9
+ 'Content-Type': 'application/json',
10
+ },
11
+ };
12
+ const response = await fetchWrapper(`${GET_EKA_VOICE_HOST_V2()}/config/?my_templates=true`, options);
13
+ const res = await response.json();
14
+ return {
15
+ ...res,
16
+ code: response.status,
17
+ };
18
+ }
19
+ catch (error) {
20
+ console.log('Error in getConfigV2MyTemplates api: ', error);
21
+ return {
22
+ code: SDK_STATUS_CODE.INTERNAL_SERVER_ERROR,
23
+ message: `Failed to fetch initial configurations, ${error}`,
24
+ };
25
+ }
26
+ };
@@ -346,11 +346,16 @@ export interface TGetV1TemplateSectionsResponse {
346
346
  };
347
347
  }
348
348
  export type TPatchVoiceApiV2ConfigRequest = {
349
- auto_download?: boolean;
350
- default_languages?: string[];
351
- my_templates?: string[];
352
- scribe_enabled?: boolean;
353
- request_type?: string;
349
+ request_type: string;
350
+ data: {
351
+ auto_download?: boolean;
352
+ input_languages?: TGetConfigItem[];
353
+ consultation_mode?: string;
354
+ model_type?: string;
355
+ output_format_template?: TGetConfigItem[];
356
+ my_templates?: string[];
357
+ scribe_enabled?: boolean;
358
+ };
354
359
  };
355
360
  export interface TPatchVoiceApiV2ConfigResponse extends TPatchVoiceApiV2ConfigRequest {
356
361
  msg: string;
package/dist/index.d.ts CHANGED
@@ -71,6 +71,7 @@ declare class EkaScribe {
71
71
  searchSessionsBySessionId(request: TSearchSessionsByPatientRequest): Promise<import("./constants/types").TSessionHistoryData[]>;
72
72
  uploadAudioWithPresignedUrl(request: TPostV1UploadAudioFilesRequest): Promise<import("./main/upload-full-audio-with-presigned-url").TFullAudioUploadResponse>;
73
73
  updateResultSummary(request: TPatchVoiceApiV3StatusRequest): Promise<import("./constants/types").TPatchVoiceApiV3StatusResponse>;
74
+ getConfigMyTemplates(): Promise<import("./constants/types").TGetConfigV2Response>;
74
75
  }
75
76
  export declare const getEkaScribeInstance: ({ access_token, env, clientId, }: {
76
77
  access_token?: string;
package/dist/index.js CHANGED
@@ -31,6 +31,7 @@ import postV1ConvertToTemplate from './api/templates/post-transaction-convert-to
31
31
  import { postV1UploadAudioFiles } from './main/upload-full-audio-with-presigned-url';
32
32
  import { patchVoiceApiV3Status } from './api/transaction/patch-voice-api-v3-status';
33
33
  import searchSessions, { searchSessionsByPatient, searchSessionsBySessionId, } from './utils/search-past-sessions';
34
+ import { getConfigV2MyTemplates } from './api/config/get-voice-api-v2-config-my-templates';
34
35
  class EkaScribe {
35
36
  // Private constructor to prevent direct instantiation
36
37
  constructor() {
@@ -356,6 +357,10 @@ class EkaScribe {
356
357
  const updateResultSummaryResponse = await patchVoiceApiV3Status(request);
357
358
  return updateResultSummaryResponse;
358
359
  }
360
+ async getConfigMyTemplates() {
361
+ const configMyTemplatesResponse = await getConfigV2MyTemplates();
362
+ return configMyTemplatesResponse;
363
+ }
359
364
  }
360
365
  Object.defineProperty(EkaScribe, "instance", {
361
366
  enumerable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "1.5.57",
3
+ "version": "1.5.59",
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>",