@unvired/react-native-wrapper-sdk 0.0.27 → 0.0.29

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.
@@ -115,15 +115,15 @@ class AuthBuilder {
115
115
  return this;
116
116
  }
117
117
  execute() {
118
- // Access the singleton instance via the static getter with type assertion
119
- const authService = unvired_ts_core_sdk_1.AuthenticationService.instance;
118
+ // Call methods directly on AuthenticationService class (not on instance)
119
+ // This matches the pattern in ts-core/index.js
120
120
  switch (this.method) {
121
121
  case 'login':
122
- return authService.login(this.loginParameters);
122
+ return unvired_ts_core_sdk_1.AuthenticationService.login(this.loginParameters);
123
123
  case 'authenticateAndActivate':
124
- return authService.authenticateAndActivate(this.loginParameters);
124
+ return unvired_ts_core_sdk_1.AuthenticationService.authenticateAndActivate(this.loginParameters);
125
125
  case 'authenticateLocal':
126
- return authService.authenticateLocal(this.loginParameters);
126
+ return unvired_ts_core_sdk_1.AuthenticationService.authenticateLocal(this.loginParameters);
127
127
  default:
128
128
  return Promise.reject(new Error(`Unknown method: ${this.method}`));
129
129
  }
@@ -15,7 +15,7 @@ export declare class AuthService {
15
15
  * Returns a builder for authenticateLocal method
16
16
  */
17
17
  authenticateLocal(): AuthBuilder;
18
- /**x`
18
+ /**
19
19
  * Logout method - Logs out the current user
20
20
  */
21
21
  logout(): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"AuthService.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/AuthService.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC;;GAEG;AACH,qBAAa,WAAW;IAEpB;;OAEG;IACH,KAAK,IAAI,WAAW;IAIpB;;OAEG;IACH,uBAAuB,IAAI,WAAW;IAItC;;OAEG;IACH,iBAAiB,IAAI,WAAW;IAIhC;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC;IAK5B;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC;CAIlC"}
1
+ {"version":3,"file":"AuthService.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/AuthService.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AAGxC;;GAEG;AACH,qBAAa,WAAW;IAEpB;;OAEG;IACH,KAAK,IAAI,WAAW;IAIpB;;OAEG;IACH,uBAAuB,IAAI,WAAW;IAItC;;OAEG;IACH,iBAAiB,IAAI,WAAW;IAIhC;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC;IAI5B;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC;CAGlC"}
@@ -28,19 +28,17 @@ class AuthService {
28
28
  authenticateLocal() {
29
29
  return new AuthBuilder_1.default('authenticateLocal');
30
30
  }
31
- /**x`
31
+ /**
32
32
  * Logout method - Logs out the current user
33
33
  */
34
34
  async logout() {
35
- const authService = unvired_ts_core_sdk_1.AuthenticationService.instance;
36
- return authService.logout();
35
+ return unvired_ts_core_sdk_1.AuthenticationService.logout();
37
36
  }
38
37
  /**
39
38
  * Clear all data
40
39
  */
41
40
  async clearData() {
42
- const authService = unvired_ts_core_sdk_1.AuthenticationService.instance;
43
- return authService.clearData();
41
+ return unvired_ts_core_sdk_1.AuthenticationService.clearData();
44
42
  }
45
43
  }
46
44
  exports.AuthService = AuthService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unvired/react-native-wrapper-sdk",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "Unvired SDK for React Native - Enterprise mobile platform SDK with authentication, sync, and offline database",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -160,16 +160,16 @@ export default class AuthBuilder implements PromiseLike<any> {
160
160
  }
161
161
 
162
162
  private execute(): Promise<any> {
163
- // Access the singleton instance via the static getter with type assertion
164
- const authService = (AuthenticationService as any).instance;
163
+ // Call methods directly on AuthenticationService class (not on instance)
164
+ // This matches the pattern in ts-core/index.js
165
165
 
166
166
  switch (this.method) {
167
167
  case 'login':
168
- return authService.login(this.loginParameters as any);
168
+ return AuthenticationService.login(this.loginParameters as any);
169
169
  case 'authenticateAndActivate':
170
- return authService.authenticateAndActivate(this.loginParameters as any);
170
+ return AuthenticationService.authenticateAndActivate(this.loginParameters as any);
171
171
  case 'authenticateLocal':
172
- return authService.authenticateLocal(this.loginParameters as any);
172
+ return AuthenticationService.authenticateLocal(this.loginParameters as any);
173
173
  default:
174
174
  return Promise.reject(new Error(`Unknown method: ${this.method}`));
175
175
  }
@@ -27,19 +27,17 @@ export class AuthService {
27
27
  return new AuthBuilder('authenticateLocal');
28
28
  }
29
29
 
30
- /**x`
30
+ /**
31
31
  * Logout method - Logs out the current user
32
32
  */
33
33
  async logout(): Promise<any> {
34
- const authService = (AuthenticationService as any).instance;
35
- return authService.logout();
34
+ return AuthenticationService.logout();
36
35
  }
37
36
 
38
37
  /**
39
38
  * Clear all data
40
39
  */
41
40
  async clearData(): Promise<any> {
42
- const authService = (AuthenticationService as any).instance;
43
- return authService.clearData();
41
+ return AuthenticationService.clearData();
44
42
  }
45
43
  }