ggez-banking-sdk 0.1.153 → 0.1.155

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.
@@ -11,19 +11,13 @@ declare class OrganizationClient {
11
11
  message: string;
12
12
  error: any;
13
13
  }>;
14
- CreateOrganizationDocument: ({ id, data, }: {
15
- id: number;
16
- data: ICreateOrganizationDocumentData;
17
- }) => Promise<{
14
+ CreateOrganizationDocument: (data: ICreateOrganizationDocumentData) => Promise<{
18
15
  data: import("../../types").DocumentData;
19
16
  success: boolean;
20
17
  message: string;
21
18
  error: any;
22
19
  }>;
23
- UpdateOrganization: ({ id, data, }: {
24
- id: number;
25
- data: IUpdateOrganizationData;
26
- }) => Promise<{
20
+ UpdateOrganization: (data: IUpdateOrganizationData) => Promise<{
27
21
  data: import("../../types").OrganizationData;
28
22
  success: boolean;
29
23
  message: string;
@@ -27,10 +27,10 @@ class OrganizationClient {
27
27
  return ResponseHelper.GetErrorResponse(organization, "CreateOrganization");
28
28
  }
29
29
  };
30
- CreateOrganizationDocument = async ({ id, data, }) => {
30
+ CreateOrganizationDocument = async (data) => {
31
31
  try {
32
32
  const documentData = FillCreateOrganizationDocumentData(data);
33
- const response = await this.organizationService.createDocument(id, documentData);
33
+ const response = await this.organizationService.createDocument(data.id, documentData);
34
34
  return ResponseHelper.GetResponse(response.data);
35
35
  }
36
36
  catch (error) {
@@ -41,10 +41,10 @@ class OrganizationClient {
41
41
  };
42
42
  // #endregion
43
43
  // #region "PUT"
44
- UpdateOrganization = async ({ id, data, }) => {
44
+ UpdateOrganization = async (data) => {
45
45
  try {
46
46
  const organizationData = FillUpdateOrganizationData(data, this.userId);
47
- const response = await this.organizationService.update(id, organizationData);
47
+ const response = await this.organizationService.update(data.id, organizationData);
48
48
  return ResponseHelper.GetResponse(response.data);
49
49
  }
50
50
  catch (error) {
@@ -77,7 +77,6 @@ const FillUpdateOrganizationData = (data, userId) => {
77
77
  info: {
78
78
  name: data.name,
79
79
  local_name: data.localName,
80
- status: data.status,
81
80
  verification_status: EntityVerificationStatus.Not_Verified,
82
81
  type: data.organizationType,
83
82
  entity: Entity.User,
@@ -1,5 +1,5 @@
1
1
  import { Attachment } from "../../banking";
2
- interface ICreateOrganizationData {
2
+ interface IOrganizationData {
3
3
  name: string;
4
4
  localName: string;
5
5
  organizationType: number;
@@ -14,24 +14,14 @@ interface ICreateOrganizationData {
14
14
  stateRegion: string;
15
15
  cityTown: string;
16
16
  }
17
- interface IUpdateOrganizationData {
18
- name: string;
19
- localName: string;
20
- organizationType: number;
21
- status: number;
22
- verificationStatus: number;
23
- registrationNumber: string;
24
- tradeLicenseNumber: string;
25
- addressId: string;
26
- isBilling: number;
27
- addressLine1: string;
28
- addressLine2?: string;
29
- postalZipCode: string;
30
- countryCode: string;
31
- stateRegion: string;
32
- cityTown: string;
17
+ interface ICreateOrganizationData extends IOrganizationData {
18
+ }
19
+ interface IUpdateOrganizationData extends Omit<IOrganizationData, "establishedDate"> {
20
+ id: number;
21
+ addressId: number;
33
22
  }
34
23
  interface ICreateOrganizationDocumentData {
24
+ id: number;
35
25
  subject: string;
36
26
  attachment: Attachment[];
37
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.153",
3
+ "version": "0.1.155",
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",