ggez-banking-sdk 0.0.24 → 0.0.26

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.
@@ -21,7 +21,7 @@ declare const Helper: (userInfo: any) => {
21
21
  dataSignInDeviceEncoded: (values: LoginDeviceCredentialInterface, programId: string) => string;
22
22
  dataSignInUrlEncodedWithGoogle: (values: LoginWithGoogleInterface, programId: string) => string;
23
23
  dataTokenUrlEncoded: (values: LimitedTokenInterface) => {
24
- installation_id: string;
24
+ installationId: string;
25
25
  };
26
26
  };
27
27
  };
@@ -243,7 +243,7 @@ const Helper = (userInfo) => {
243
243
  };
244
244
  const dataTokenUrlEncoded = (values) => {
245
245
  const data = {
246
- installation_id: values.installationId,
246
+ installationId: values.installationId,
247
247
  };
248
248
  return data;
249
249
  };
@@ -17,7 +17,6 @@ const token_1 = require("./token");
17
17
  const restApi_1 = __importDefault(require("../restApi"));
18
18
  const helper_1 = __importDefault(require("../helper"));
19
19
  const dataStructure_1 = __importDefault(require("../helper/dataStructure"));
20
- // https://dapi.ggez.one/Service/V1/user
21
20
  const useAuth = (baseUrl, nodeUrl, userInfo, tokenData, programId, geoCoordinates, lang) => {
22
21
  let endPointUser = "V1/user";
23
22
  const { checkResponse, headerConfig, convertDataToUrlEncoded } = (0, helper_1.default)(userInfo);
@@ -105,7 +104,7 @@ const useAuth = (baseUrl, nodeUrl, userInfo, tokenData, programId, geoCoordinate
105
104
  let headers = headerConfig(headersData);
106
105
  try {
107
106
  const response = yield restApi_1.default.restApi(baseUrl, "POST", "oauth/token", headers, data);
108
- if (response.data.access_token) {
107
+ if (response.data.result === "success" && response.data.access_token) {
109
108
  return {
110
109
  response: response,
111
110
  newUser: {},
@@ -10,6 +10,6 @@ function GenerateSourceID() {
10
10
  const now = new Date();
11
11
  const timestamp = `${(0, dayjs_1.default)(now).format("DDMMYYYY")}.${(0, dayjs_1.default)(now).format("HHmmss")}.${(0, dayjs_1.default)(now).format("SSS")}`;
12
12
  const userId = (_a = localStorage.getItem("user_id")) !== null && _a !== void 0 ? _a : "0";
13
- const source_id = `U.${userId}${timestamp}`;
13
+ const source_id = `U.${userId}.${timestamp}`;
14
14
  return source_id;
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",