@unvired/react-native-wrapper-sdk 0.0.26 → 0.0.28
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.
- package/dist/lib/auth/AuthBuilder.d.ts.map +1 -1
- package/dist/lib/auth/AuthBuilder.js +5 -3
- package/dist/lib/auth/AuthService.d.ts +1 -1
- package/dist/lib/auth/AuthService.d.ts.map +1 -1
- package/dist/lib/auth/AuthService.js +8 -4
- package/package.json +1 -1
- package/src/lib/auth/AuthBuilder.ts +4 -3
- package/src/lib/auth/AuthService.ts +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthBuilder.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/AuthBuilder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthBuilder.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/AuthBuilder.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,eAAe;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAC;I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AG,WAAW;IAK3D,eAAe,CAAC,YAAY,EAAE,OAAO,GAAG,WAAW;IAKnD,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW;IAK9C,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,WAAW;IAKpD,eAAe,CAAC,YAAY,EAAE,OAAO,GAAG,WAAW;IAKnD,2BAA2B,CAAC,wBAAwB,EAAE,OAAO,GAAG,WAAW;IAK3E,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,WAAW;IAK7C,OAAO,CAAC,OAAO;IAgBf,IAAI,CAAC,QAAQ,GAAG,GAAG,EAAE,QAAQ,GAAG,KAAK,EACjC,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,EACnF,UAAU,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,GACpF,WAAW,CAAC,QAAQ,GAAG,QAAQ,CAAC;CAGtC"}
|
|
@@ -4,7 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.LoginType = exports.LoginParameters = void 0;
|
|
7
|
-
|
|
7
|
+
// Import the singleton instance as default export
|
|
8
|
+
const unvired_ts_core_sdk_1 = __importDefault(require("@unvired/unvired-ts-core-sdk"));
|
|
8
9
|
/**
|
|
9
10
|
* LoginParameters class - Local definition to avoid module resolution issues
|
|
10
11
|
*/
|
|
@@ -118,8 +119,9 @@ class AuthBuilder {
|
|
|
118
119
|
return this;
|
|
119
120
|
}
|
|
120
121
|
execute() {
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
var _a;
|
|
123
|
+
// Use the imported singleton instance
|
|
124
|
+
const authService = ((_a = unvired_ts_core_sdk_1.default.AuthenticationService) === null || _a === void 0 ? void 0 : _a.instance) || unvired_ts_core_sdk_1.default;
|
|
123
125
|
switch (this.method) {
|
|
124
126
|
case 'login':
|
|
125
127
|
return authService.login(this.loginParameters);
|
|
@@ -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;
|
|
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"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AuthService = void 0;
|
|
7
7
|
const AuthBuilder_1 = __importDefault(require("./AuthBuilder"));
|
|
8
|
-
const
|
|
8
|
+
const unvired_ts_core_sdk_1 = __importDefault(require("@unvired/unvired-ts-core-sdk"));
|
|
9
9
|
/**
|
|
10
10
|
* Service for handling Authentication operations
|
|
11
11
|
*/
|
|
@@ -28,17 +28,21 @@ class AuthService {
|
|
|
28
28
|
authenticateLocal() {
|
|
29
29
|
return new AuthBuilder_1.default('authenticateLocal');
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
31
|
+
/**x`
|
|
32
32
|
* Logout method - Logs out the current user
|
|
33
33
|
*/
|
|
34
34
|
async logout() {
|
|
35
|
-
|
|
35
|
+
var _a;
|
|
36
|
+
const authService = ((_a = unvired_ts_core_sdk_1.default.AuthenticationService) === null || _a === void 0 ? void 0 : _a.instance) || unvired_ts_core_sdk_1.default;
|
|
37
|
+
return authService.logout();
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
40
|
* Clear all data
|
|
39
41
|
*/
|
|
40
42
|
async clearData() {
|
|
41
|
-
|
|
43
|
+
var _a;
|
|
44
|
+
const authService = ((_a = unvired_ts_core_sdk_1.default.AuthenticationService) === null || _a === void 0 ? void 0 : _a.instance) || unvired_ts_core_sdk_1.default;
|
|
45
|
+
return authService.clearData();
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
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.
|
|
3
|
+
"version": "0.0.28",
|
|
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",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// Import the singleton instance as default export
|
|
2
|
+
import AuthServiceInstance from '@unvired/unvired-ts-core-sdk';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* LoginParameters class - Local definition to avoid module resolution issues
|
|
@@ -160,8 +161,8 @@ export default class AuthBuilder implements PromiseLike<any> {
|
|
|
160
161
|
}
|
|
161
162
|
|
|
162
163
|
private execute(): Promise<any> {
|
|
163
|
-
// Use the imported singleton instance
|
|
164
|
-
const authService =
|
|
164
|
+
// Use the imported singleton instance
|
|
165
|
+
const authService = (AuthServiceInstance as any).AuthenticationService?.instance || AuthServiceInstance;
|
|
165
166
|
|
|
166
167
|
switch (this.method) {
|
|
167
168
|
case 'login':
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import AuthBuilder from './AuthBuilder';
|
|
2
|
-
import
|
|
2
|
+
import AuthServiceInstance from '@unvired/unvired-ts-core-sdk';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Service for handling Authentication operations
|
|
@@ -27,17 +27,19 @@ export class AuthService {
|
|
|
27
27
|
return new AuthBuilder('authenticateLocal');
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/**
|
|
30
|
+
/**x`
|
|
31
31
|
* Logout method - Logs out the current user
|
|
32
32
|
*/
|
|
33
33
|
async logout(): Promise<any> {
|
|
34
|
-
|
|
34
|
+
const authService = (AuthServiceInstance as any).AuthenticationService?.instance || AuthServiceInstance;
|
|
35
|
+
return authService.logout();
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
39
|
* Clear all data
|
|
39
40
|
*/
|
|
40
41
|
async clearData(): Promise<any> {
|
|
41
|
-
|
|
42
|
+
const authService = (AuthServiceInstance as any).AuthenticationService?.instance || AuthServiceInstance;
|
|
43
|
+
return authService.clearData();
|
|
42
44
|
}
|
|
43
45
|
}
|