@unvired/react-native-wrapper-sdk 0.0.28 → 0.0.30
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 +8 -11
- 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 +4 -8
- package/package.json +1 -1
- package/src/lib/auth/AuthBuilder.ts +9 -7
- package/src/lib/auth/AuthService.ts +4 -6
|
@@ -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":"AAEA;;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;IAmBf,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,11 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.LoginType = exports.LoginParameters = void 0;
|
|
7
|
-
|
|
8
|
-
const unvired_ts_core_sdk_1 = __importDefault(require("@unvired/unvired-ts-core-sdk"));
|
|
4
|
+
const unvired_ts_core_sdk_1 = require("@unvired/unvired-ts-core-sdk");
|
|
9
5
|
/**
|
|
10
6
|
* LoginParameters class - Local definition to avoid module resolution issues
|
|
11
7
|
*/
|
|
@@ -119,16 +115,17 @@ class AuthBuilder {
|
|
|
119
115
|
return this;
|
|
120
116
|
}
|
|
121
117
|
execute() {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
// Log what will be executed so callers can inspect parameters
|
|
119
|
+
console.log('[AuthBuilder] execute()', { method: this.method, params: this.loginParameters });
|
|
120
|
+
// Call methods directly on AuthenticationService class (not on instance)
|
|
121
|
+
// This matches the pattern in ts-core/index.js
|
|
125
122
|
switch (this.method) {
|
|
126
123
|
case 'login':
|
|
127
|
-
return
|
|
124
|
+
return unvired_ts_core_sdk_1.AuthenticationService.login(this.loginParameters);
|
|
128
125
|
case 'authenticateAndActivate':
|
|
129
|
-
return
|
|
126
|
+
return unvired_ts_core_sdk_1.AuthenticationService.authenticateAndActivate(this.loginParameters);
|
|
130
127
|
case 'authenticateLocal':
|
|
131
|
-
return
|
|
128
|
+
return unvired_ts_core_sdk_1.AuthenticationService.authenticateLocal(this.loginParameters);
|
|
132
129
|
default:
|
|
133
130
|
return Promise.reject(new Error(`Unknown method: ${this.method}`));
|
|
134
131
|
}
|
|
@@ -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;IAI5B;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC;CAGlC"}
|
|
@@ -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 =
|
|
8
|
+
const unvired_ts_core_sdk_1 = require("@unvired/unvired-ts-core-sdk");
|
|
9
9
|
/**
|
|
10
10
|
* Service for handling Authentication operations
|
|
11
11
|
*/
|
|
@@ -28,21 +28,17 @@ class AuthService {
|
|
|
28
28
|
authenticateLocal() {
|
|
29
29
|
return new AuthBuilder_1.default('authenticateLocal');
|
|
30
30
|
}
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
32
|
* Logout method - Logs out the current user
|
|
33
33
|
*/
|
|
34
34
|
async logout() {
|
|
35
|
-
|
|
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();
|
|
35
|
+
return unvired_ts_core_sdk_1.AuthenticationService.logout();
|
|
38
36
|
}
|
|
39
37
|
/**
|
|
40
38
|
* Clear all data
|
|
41
39
|
*/
|
|
42
40
|
async clearData() {
|
|
43
|
-
|
|
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();
|
|
41
|
+
return unvired_ts_core_sdk_1.AuthenticationService.clearData();
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
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.
|
|
3
|
+
"version": "0.0.30",
|
|
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,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import AuthServiceInstance from '@unvired/unvired-ts-core-sdk';
|
|
1
|
+
import { AuthenticationService } from '@unvired/unvired-ts-core-sdk';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* LoginParameters class - Local definition to avoid module resolution issues
|
|
@@ -161,16 +160,19 @@ export default class AuthBuilder implements PromiseLike<any> {
|
|
|
161
160
|
}
|
|
162
161
|
|
|
163
162
|
private execute(): Promise<any> {
|
|
164
|
-
//
|
|
165
|
-
|
|
163
|
+
// Log what will be executed so callers can inspect parameters
|
|
164
|
+
console.log('[AuthBuilder] execute()', { method: this.method, params: this.loginParameters });
|
|
165
|
+
|
|
166
|
+
// Call methods directly on AuthenticationService class (not on instance)
|
|
167
|
+
// This matches the pattern in ts-core/index.js
|
|
166
168
|
|
|
167
169
|
switch (this.method) {
|
|
168
170
|
case 'login':
|
|
169
|
-
return
|
|
171
|
+
return AuthenticationService.login(this.loginParameters as any);
|
|
170
172
|
case 'authenticateAndActivate':
|
|
171
|
-
return
|
|
173
|
+
return AuthenticationService.authenticateAndActivate(this.loginParameters as any);
|
|
172
174
|
case 'authenticateLocal':
|
|
173
|
-
return
|
|
175
|
+
return AuthenticationService.authenticateLocal(this.loginParameters as any);
|
|
174
176
|
default:
|
|
175
177
|
return Promise.reject(new Error(`Unknown method: ${this.method}`));
|
|
176
178
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import AuthBuilder from './AuthBuilder';
|
|
2
|
-
import
|
|
2
|
+
import { AuthenticationService } from '@unvired/unvired-ts-core-sdk';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Service for handling Authentication operations
|
|
@@ -27,19 +27,17 @@ export class AuthService {
|
|
|
27
27
|
return new AuthBuilder('authenticateLocal');
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
31
|
* Logout method - Logs out the current user
|
|
32
32
|
*/
|
|
33
33
|
async logout(): Promise<any> {
|
|
34
|
-
|
|
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
|
-
|
|
43
|
-
return authService.clearData();
|
|
41
|
+
return AuthenticationService.clearData();
|
|
44
42
|
}
|
|
45
43
|
}
|