ggez-banking-sdk 0.1.121 → 0.1.123

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.
@@ -3,8 +3,8 @@ class ResponseHelper {
3
3
  static GetResponse = (data) => {
4
4
  return {
5
5
  data: data,
6
- success: this.IsApproved(data?.result),
7
- message: data?.result?.message,
6
+ success: this.IsApproved(data.result),
7
+ message: data.result.message,
8
8
  error: null,
9
9
  };
10
10
  };
@@ -3,6 +3,8 @@ import { isNullOrUndefined } from "../utils";
3
3
  class UserHelper {
4
4
  // #region "Modify"
5
5
  static ModifyListByEntity = (entityList, entity) => {
6
+ if (!entity)
7
+ return entityList;
6
8
  const modifiedList = entityList.map((e) => {
7
9
  if (e.id == entity.id) {
8
10
  return { ...e, ...entity };
@@ -16,6 +18,8 @@ class UserHelper {
16
18
  return sortedList;
17
19
  };
18
20
  static ModifyByDocumentData = (entityList, documentData) => {
21
+ if (!documentData)
22
+ return entityList;
19
23
  const modifiedList = entityList.map((e) => {
20
24
  if (e.id == documentData.info.entity_id) {
21
25
  return { ...e, verification_status: EntityVerificationStatus.Pending };
@@ -26,6 +30,8 @@ class UserHelper {
26
30
  return sortedList;
27
31
  };
28
32
  static ModifyOrganizationByDocumentData = (organizationList, documentData) => {
33
+ if (!documentData)
34
+ return organizationList;
29
35
  const modifiedList = organizationList.map((e) => {
30
36
  if (e.info.id == documentData.info.entity_id) {
31
37
  const modifiedOrganizationData = {
@@ -42,6 +48,8 @@ class UserHelper {
42
48
  return modifiedList;
43
49
  };
44
50
  static ModifyProfilePicture = (personal_info, documentData) => {
51
+ if (!documentData)
52
+ return personal_info;
45
53
  const picture = documentData.attachment[0].file_url;
46
54
  const modifiedPersonalInfo = {
47
55
  ...personal_info,
@@ -1,2 +1,3 @@
1
1
  declare const GenerateSourceID: () => string;
2
- export { GenerateSourceID };
2
+ declare const GenerateWiped: () => string;
3
+ export { GenerateSourceID, GenerateWiped };
@@ -14,4 +14,7 @@ const GenerateSourceID = () => {
14
14
  const source_id = `U.${userId}.${timestamp}`;
15
15
  return source_id;
16
16
  };
17
- export { GenerateSourceID };
17
+ const GenerateWiped = () => {
18
+ return "____";
19
+ };
20
+ export { GenerateSourceID, GenerateWiped };
@@ -1 +1,2 @@
1
1
  export * from "./data";
2
+ export * from "./data/generation";
@@ -1 +1,2 @@
1
1
  export * from "./data";
2
+ export * from "./data/generation";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.121",
3
+ "version": "0.1.123",
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
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",