@unvired/react-native-wrapper-sdk 0.0.27 → 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.
|
@@ -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;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC;AAED;;GAEG;AACH,oBAAY,SAAS;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;CACd;AA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E,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"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.LoginType = exports.LoginParameters = void 0;
|
|
4
|
-
|
|
7
|
+
// Import the singleton instance as default export
|
|
8
|
+
const unvired_ts_core_sdk_1 = __importDefault(require("@unvired/unvired-ts-core-sdk"));
|
|
5
9
|
/**
|
|
6
10
|
* LoginParameters class - Local definition to avoid module resolution issues
|
|
7
11
|
*/
|
|
@@ -115,8 +119,9 @@ class AuthBuilder {
|
|
|
115
119
|
return this;
|
|
116
120
|
}
|
|
117
121
|
execute() {
|
|
118
|
-
|
|
119
|
-
|
|
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;
|
|
120
125
|
switch (this.method) {
|
|
121
126
|
case 'login':
|
|
122
127
|
return authService.login(this.loginParameters);
|
|
@@ -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 unvired_ts_core_sdk_1 = require("@unvired/unvired-ts-core-sdk");
|
|
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
|
*/
|
|
@@ -32,14 +32,16 @@ class AuthService {
|
|
|
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;
|
|
36
37
|
return authService.logout();
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
40
|
* Clear all data
|
|
40
41
|
*/
|
|
41
42
|
async clearData() {
|
|
42
|
-
|
|
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;
|
|
43
45
|
return authService.clearData();
|
|
44
46
|
}
|
|
45
47
|
}
|
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
|
-
//
|
|
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
|
|
@@ -31,7 +31,7 @@ export class AuthService {
|
|
|
31
31
|
* Logout method - Logs out the current user
|
|
32
32
|
*/
|
|
33
33
|
async logout(): Promise<any> {
|
|
34
|
-
const authService = (
|
|
34
|
+
const authService = (AuthServiceInstance as any).AuthenticationService?.instance || AuthServiceInstance;
|
|
35
35
|
return authService.logout();
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -39,7 +39,7 @@ export class AuthService {
|
|
|
39
39
|
* Clear all data
|
|
40
40
|
*/
|
|
41
41
|
async clearData(): Promise<any> {
|
|
42
|
-
const authService = (
|
|
42
|
+
const authService = (AuthServiceInstance as any).AuthenticationService?.instance || AuthServiceInstance;
|
|
43
43
|
return authService.clearData();
|
|
44
44
|
}
|
|
45
45
|
}
|