@eka-care/ekascribe-ts-sdk 1.4.4 → 1.4.5

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,7 +1,7 @@
1
1
  declare const setEnv: ({ env, clientId, auth_token, }: {
2
2
  env?: "PROD" | "DEV";
3
3
  clientId?: string;
4
- auth_token: string;
4
+ auth_token?: string;
5
5
  }) => void;
6
6
  export declare const GET_EKA_HOST: () => string;
7
7
  export declare const GET_CLIENT_ID: () => string;
@@ -18,7 +18,9 @@ const setEnv = ({ env, clientId, auth_token, }) => {
18
18
  if (clientId) {
19
19
  client_id = clientId;
20
20
  }
21
- auth = auth_token;
21
+ if (auth_token) {
22
+ auth = auth_token;
23
+ }
22
24
  };
23
25
  export const GET_EKA_HOST = () => envVar.EKA_HOST;
24
26
  export const GET_CLIENT_ID = () => client_id;
package/dist/index.js CHANGED
@@ -50,13 +50,11 @@ class EkaScribe {
50
50
  }
51
51
  // Static method to get the singleton instance with optional initialization
52
52
  static getInstance({ access_token, env, clientId, }) {
53
- if (access_token) {
54
- setEnv({
55
- auth_token: access_token,
56
- env,
57
- clientId,
58
- });
59
- }
53
+ setEnv({
54
+ ...(access_token ? { auth_token: access_token } : {}),
55
+ ...(env ? { env } : {}),
56
+ ...(clientId ? { clientId } : {}),
57
+ });
60
58
  if (!EkaScribe.instance) {
61
59
  EkaScribe.instance = new EkaScribe();
62
60
  console.log('EkaScribe.instance', EkaScribe.instance);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eka-care/ekascribe-ts-sdk",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
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>",