@eka-care/ekascribe-ts-sdk 1.4.21 → 1.4.23
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.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import fetchWrapper from '../fetch-client';
|
|
2
|
+
import { GET_COG_HOST } from '../fetch-client/helper';
|
|
2
3
|
async function postCogInit() {
|
|
3
4
|
try {
|
|
4
5
|
const options = {
|
|
5
6
|
method: 'GET',
|
|
6
7
|
};
|
|
7
|
-
const respJson = await fetchWrapper(
|
|
8
|
+
const respJson = await fetchWrapper(`${GET_COG_HOST()}/credentials`, options);
|
|
8
9
|
const resp = await respJson.json();
|
|
9
10
|
return resp;
|
|
10
11
|
}
|
|
@@ -7,7 +7,7 @@ async function cookV1MediaAiCreateTemplate(formData) {
|
|
|
7
7
|
method: 'POST',
|
|
8
8
|
body: formData,
|
|
9
9
|
};
|
|
10
|
-
const response = await fetchWrapper(`${GET_COOK_HOST_V1()}/medai/ai-create-template`, options);
|
|
10
|
+
const response = await fetchWrapper(`${GET_COOK_HOST_V1()}/medai/ai-create-template`, options, 60000);
|
|
11
11
|
let res = await response.json();
|
|
12
12
|
res = {
|
|
13
13
|
...res,
|
|
@@ -3,11 +3,11 @@ declare const setEnv: ({ env, clientId, auth_token, }: {
|
|
|
3
3
|
clientId?: string;
|
|
4
4
|
auth_token?: string;
|
|
5
5
|
}) => void;
|
|
6
|
-
export declare const GET_EKA_HOST: () => string;
|
|
7
6
|
export declare const GET_CLIENT_ID: () => string;
|
|
8
7
|
export declare const GET_AUTH_TOKEN: () => string;
|
|
9
8
|
export declare const GET_EKA_VOICE_HOST_V1: () => string;
|
|
10
9
|
export declare const GET_EKA_VOICE_HOST_V2: () => string;
|
|
11
10
|
export declare const GET_EKA_VOICE_HOST_V3: () => string;
|
|
12
11
|
export declare const GET_COOK_HOST_V1: () => string;
|
|
12
|
+
export declare const GET_COG_HOST: () => string;
|
|
13
13
|
export default setEnv;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const DEV = {
|
|
2
|
-
|
|
2
|
+
COG_HOST: 'https://cog.dev.eka.care',
|
|
3
3
|
EKA_VOICE_HOST_V1: 'https://v2rxbe.dev.eka.care/voice/api/v1',
|
|
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
7
|
};
|
|
8
8
|
const PROD = {
|
|
9
|
-
|
|
9
|
+
COG_HOST: 'https://cog.eka.care',
|
|
10
10
|
EKA_VOICE_HOST_V1: 'https://api.eka.care/voice/api/v1',
|
|
11
11
|
EKA_VOICE_HOST_V2: 'https://api.eka.care/voice/api/v2',
|
|
12
12
|
EKA_VOICE_HOST_V3: 'https://api.eka.care/voice/api/v3',
|
|
@@ -26,11 +26,11 @@ const setEnv = ({ env, clientId, auth_token, }) => {
|
|
|
26
26
|
auth = auth_token;
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
export const GET_EKA_HOST = () => envVar.EKA_HOST;
|
|
30
29
|
export const GET_CLIENT_ID = () => client_id;
|
|
31
30
|
export const GET_AUTH_TOKEN = () => auth;
|
|
32
31
|
export const GET_EKA_VOICE_HOST_V1 = () => envVar.EKA_VOICE_HOST_V1;
|
|
33
32
|
export const GET_EKA_VOICE_HOST_V2 = () => envVar.EKA_VOICE_HOST_V2;
|
|
34
33
|
export const GET_EKA_VOICE_HOST_V3 = () => envVar.EKA_VOICE_HOST_V3;
|
|
35
34
|
export const GET_COOK_HOST_V1 = () => envVar.COOK_V1;
|
|
35
|
+
export const GET_COG_HOST = () => envVar.COG_HOST;
|
|
36
36
|
export default setEnv;
|