ggez-banking-sdk 0.1.118 → 0.1.120

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.
@@ -14,7 +14,7 @@ const FillUploadDocumentData = (data) => {
14
14
  entity_id: data.entityId,
15
15
  type: data.type,
16
16
  },
17
- attachment: [data.attachment],
17
+ attachment: data.attachment,
18
18
  };
19
19
  return document;
20
20
  };
@@ -1,4 +1,4 @@
1
- import { TModifyListByEntity, TModifyByDocumentData, TSortByID, TSortByIsPrimary, TSortByVerificationStatus, TSortEntity, TModifyOrganizationByDocumentData, TModifyProfilePicture } from "..";
1
+ import type { TModifyListByEntity, TModifyByDocumentData, TSortByID, TSortByIsPrimary, TSortByVerificationStatus, TSortEntity, TModifyOrganizationByDocumentData, TModifyProfilePicture } from "../types";
2
2
  declare class UserHelper {
3
3
  static ModifyListByEntity: TModifyListByEntity;
4
4
  static ModifyByDocumentData: TModifyByDocumentData;
@@ -24,10 +24,17 @@ class UserHelper {
24
24
  const sortedList = this.SortEntity(modifiedList);
25
25
  return sortedList;
26
26
  };
27
- static ModifyOrganizationByDocumentData = (organizationList, organization) => {
27
+ static ModifyOrganizationByDocumentData = (organizationList, documentData) => {
28
28
  const modifiedList = organizationList.map((e) => {
29
- if (e.info.id == organization.info.entity_id) {
30
- return { ...e, verification_status: EntityVerificationStatus.Pending };
29
+ if (e.info.id == documentData.info.entity_id) {
30
+ const modifiedOrganizationData = {
31
+ ...e,
32
+ info: {
33
+ ...e.info,
34
+ verification_status: EntityVerificationStatus.Pending,
35
+ },
36
+ };
37
+ return modifiedOrganizationData;
31
38
  }
32
39
  return e;
33
40
  });
@@ -35,10 +42,11 @@ class UserHelper {
35
42
  };
36
43
  static ModifyProfilePicture = (personal_info, documentData) => {
37
44
  const picture = documentData.attachment[0].file_url;
38
- return {
45
+ const modifiedPersonalInfo = {
39
46
  ...personal_info,
40
47
  picture: picture,
41
48
  };
49
+ return modifiedPersonalInfo;
42
50
  };
43
51
  // #endregion
44
52
  // #region "Sort"
@@ -1,3 +1,4 @@
1
+ import { Attachment } from "../../banking";
1
2
  interface ICreateOrganizationData {
2
3
  name: string;
3
4
  localName: string;
@@ -32,6 +33,6 @@ interface IUpdateOrganizationData {
32
33
  }
33
34
  interface ICreateOrganizationDocumentData {
34
35
  subject: string;
35
- attachment: any;
36
+ attachment: Attachment[];
36
37
  }
37
38
  export type { ICreateOrganizationData, IUpdateOrganizationData, ICreateOrganizationDocumentData, };
@@ -7,7 +7,7 @@ interface IUploadDocumentData {
7
7
  entity: number;
8
8
  entityId: number;
9
9
  type: number;
10
- attachment?: Attachment;
10
+ attachment?: Attachment[];
11
11
  }
12
12
  interface IUploadProfilePictureData {
13
13
  fileName: string;
@@ -2,7 +2,7 @@ import { DocumentData, OrganizationData, PersonalInfo, UserData } from "..";
2
2
  type TEntity = UserData[keyof Pick<UserData, "addresses" | "bank_account" | "email" | "phone" | "identification">][0];
3
3
  type TModifyListByEntity = <K extends TEntity>(entityList: K[], entity: K) => K[];
4
4
  type TModifyByDocumentData = <K extends TEntity>(entityList: K[], entity: DocumentData) => K[];
5
- type TModifyOrganizationByDocumentData = <K extends OrganizationData>(organizationList: K[], organization: DocumentData) => K[];
5
+ type TModifyOrganizationByDocumentData = (organizationList: OrganizationData[], documentData: DocumentData) => OrganizationData[];
6
6
  type TModifyProfilePicture = (personal_info: PersonalInfo, documentData: DocumentData) => PersonalInfo;
7
7
  export { TEntity, TModifyListByEntity, TModifyByDocumentData, TModifyOrganizationByDocumentData, TModifyProfilePicture, };
8
8
  type BaseEntity = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.118",
3
+ "version": "0.1.120",
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",