@zohoim/client-sdk 1.0.0-poc60 → 1.0.0-poc62

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.
@@ -96,10 +96,10 @@ export default class BaseAPI {
96
96
  } // Create a proxy for method delegation
97
97
 
98
98
 
99
- return new Proxy(customAPI, {
99
+ return new Proxy({}, {
100
100
  get: (target, prop) => {
101
101
  // For methods, check if custom implementation exists
102
- if (typeof prop === 'string' && typeof customAPI[prop] === 'function') {
102
+ if (typeof prop === 'string' && typeof customAPI[prop] === 'function' && this.isMethodOverridden(defaultAPI, customAPI, prop)) {
103
103
  // Use custom implementation if available
104
104
  return customAPI[prop].bind(customAPI);
105
105
  } // Fall back to default implementation
@@ -111,11 +111,9 @@ export default class BaseAPI {
111
111
  }
112
112
 
113
113
  isMethodOverridden(defaultAPI, customAPI, methodName) {
114
- if (!customAPI || customAPI === defaultAPI) {
115
- return false;
116
- }
117
-
118
- return customAPI[methodName] !== defaultAPI[methodName];
114
+ const basePrototype = defaultAPI.prototype;
115
+ const injectedMethod = customAPI[methodName];
116
+ return injectedMethod !== basePrototype[methodName];
119
117
  }
120
118
 
121
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohoim/client-sdk",
3
- "version": "1.0.0-poc60",
3
+ "version": "1.0.0-poc62",
4
4
  "description": "To have the client sdk for the IM",
5
5
  "main": "es/index.js",
6
6
  "module": "es/index.js",