@longvansoftware/storefront-js-client 1.2.4 → 1.2.5

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.
@@ -1,5 +1,5 @@
1
- import { Service } from '../service';
2
- import { createCompanyRequest, updateCustomerRequest } from '../../types/user';
1
+ import { Service } from "../service";
2
+ import { createCompanyRequest, updateCustomerRequest } from "../../types/user";
3
3
  export declare class UserService extends Service {
4
4
  constructor(endpoint: string, orgId: string, storeId: string);
5
5
  getPersonByPartyIds(partyIds: string[]): Promise<any>;
@@ -36,11 +36,7 @@ class UserService extends service_1.Service {
36
36
  const mutation = mutations_1.CREATE_COMPANY;
37
37
  const variables = {
38
38
  orgId: this.orgId,
39
- createCompanyRequest: {
40
- name: payload === null || payload === void 0 ? void 0 : payload.name,
41
- phone: payload === null || payload === void 0 ? void 0 : payload.referPhone,
42
- address: payload === null || payload === void 0 ? void 0 : payload.address,
43
- },
39
+ createCompanyRequest: payload,
44
40
  createTaxCodeRequest: null,
45
41
  createdBy,
46
42
  };
@@ -80,11 +76,7 @@ class UserService extends service_1.Service {
80
76
  const variables = {
81
77
  tenantId: this.orgId,
82
78
  id,
83
- updateCustomerRequest: {
84
- name: customerItem === null || customerItem === void 0 ? void 0 : customerItem.fullName,
85
- phone: customerItem === null || customerItem === void 0 ? void 0 : customerItem.phone,
86
- address: customerItem === null || customerItem === void 0 ? void 0 : customerItem.address
87
- },
79
+ updateCustomerRequest: customerItem,
88
80
  updatedBy,
89
81
  };
90
82
  try {
@@ -101,7 +93,7 @@ class UserService extends service_1.Service {
101
93
  return __awaiter(this, void 0, void 0, function* () {
102
94
  const query = queries_1.GET_CUSTOMER_BY_ID;
103
95
  const variables = {
104
- id
96
+ id,
105
97
  };
106
98
  try {
107
99
  const response = yield this.graphqlQuery(query, variables);
@@ -1,7 +1,8 @@
1
1
  export interface createCompanyRequest {
2
2
  name: string;
3
- referPhone: string;
3
+ phone: string;
4
4
  address: string;
5
+ email: string;
5
6
  }
6
7
  export interface CreateCompany {
7
8
  id: string;
@@ -17,9 +18,12 @@ export interface CreateCompany {
17
18
  memberLevel: string;
18
19
  }
19
20
  export interface updateCustomerRequest {
20
- fullName: string;
21
+ name: string;
21
22
  phone: string;
22
23
  address: string;
24
+ birthDate: Date;
25
+ email: string;
26
+ gender: string;
23
27
  }
24
28
  export interface GetPersonByPartyIds {
25
29
  status: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [