gap-nodejs-sdk 1.0.329 → 1.0.330

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.
@@ -5,7 +5,15 @@ export declare const GetListGroupModel: (data: any) => {
5
5
  status: any;
6
6
  };
7
7
  export declare const GetGroupModel: (data: any) => {
8
- customer: any;
8
+ customer: {
9
+ id: any;
10
+ full_name: any;
11
+ email: any;
12
+ create_at: any;
13
+ phone: any;
14
+ lifetime_point: any;
15
+ current_point: any;
16
+ };
9
17
  };
10
18
  export declare const CreateGroupModel: (data: any) => {
11
19
  id: any;
@@ -37,6 +45,14 @@ export declare const RemoveCustomersModel: (data: any) => {
37
45
  customers: any;
38
46
  };
39
47
  export declare const GetListCustomerToAddGroupModel: (data: any) => {
40
- customer: any;
48
+ customer: {
49
+ id: any;
50
+ full_name: any;
51
+ email: any;
52
+ create_at: any;
53
+ phone: any;
54
+ lifetime_point: any;
55
+ current_point: any;
56
+ };
41
57
  };
42
58
  //# sourceMappingURL=group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/api/go_check_in_api/1.0.0/models/group.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,iBAAiB,SAAU,GAAG;;;;;CAKzC,CAAC;AACH,eAAO,MAAM,aAAa,SAAU,GAAG;;CAUrC,CAAC;AACH,eAAO,MAAM,gBAAgB,SAAU,GAAG;;;;CAIxC,CAAC;AACH,eAAO,MAAM,gBAAgB,SAAU,GAAG;;;;;;;;CAQxC,CAAC;AACH,eAAO,MAAM,gBAAgB,SAAU,GAAG;;;;;CAKxC,CAAA;AACF,eAAO,MAAM,oBAAoB,SAAU,GAAG;;;;;;;;CAQ5C,CAAC;AACH,eAAO,MAAM,8BAA8B,SAxCP,GAAG;;CAwCoB,CAAC"}
1
+ {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/api/go_check_in_api/1.0.0/models/group.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,iBAAiB,SAjBJ,GAAG;;;;;CAiBc,CAAC;AAC5C,eAAO,MAAM,aAAa,SAZQ,GAAG;;;;;;;;;;CAYU,CAAC;AAChD,eAAO,MAAM,gBAAgB,SAAU,GAAG;;;;CAIxC,CAAC;AACH,eAAO,MAAM,gBAAgB,SAAU,GAAG;;;;;;;;CAGxC,CAAC;AACH,eAAO,MAAM,gBAAgB,SAAU,GAAG;;;;;CAKxC,CAAA;AACF,eAAO,MAAM,oBAAoB,SAAU,GAAG;;;;;;;;CAQ5C,CAAC;AACH,eAAO,MAAM,8BAA8B,SArCT,GAAG;;;;;;;;;;CAqC2B,CAAC"}
@@ -1,18 +1,4 @@
1
- const GroupCustomerModel = (data) => ({
2
- customer: ((data === null || data === void 0 ? void 0 : data.customer) || []).map(item => {
3
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
4
- return ({
5
- id: (_b = (_a = item === null || item === void 0 ? void 0 : item.customer) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null,
6
- full_name: (_d = (_c = item === null || item === void 0 ? void 0 : item.customer) === null || _c === void 0 ? void 0 : _c.full_name) !== null && _d !== void 0 ? _d : null,
7
- email: (_f = (_e = item === null || item === void 0 ? void 0 : item.customer) === null || _e === void 0 ? void 0 : _e.email) !== null && _f !== void 0 ? _f : null,
8
- create_at: (_h = (_g = item === null || item === void 0 ? void 0 : item.customer) === null || _g === void 0 ? void 0 : _g.create_at) !== null && _h !== void 0 ? _h : null,
9
- phone: (_k = (_j = item === null || item === void 0 ? void 0 : item.customer) === null || _j === void 0 ? void 0 : _j.phone) !== null && _k !== void 0 ? _k : null,
10
- lifetime_point: (_m = (_l = item === null || item === void 0 ? void 0 : item.customer) === null || _l === void 0 ? void 0 : _l.lifetime_point) !== null && _m !== void 0 ? _m : null,
11
- current_point: (_p = (_o = item === null || item === void 0 ? void 0 : item.customer) === null || _o === void 0 ? void 0 : _o.current_point) !== null && _p !== void 0 ? _p : null,
12
- });
13
- })
14
- });
15
- export const GetListGroupModel = (data) => {
1
+ const GroupModel = (data) => {
16
2
  var _a, _b, _c, _d;
17
3
  return ({
18
4
  id: (_a = data === null || data === void 0 ? void 0 : data.id) !== null && _a !== void 0 ? _a : null,
@@ -21,20 +7,22 @@ export const GetListGroupModel = (data) => {
21
7
  status: (_d = data === null || data === void 0 ? void 0 : data.status) !== null && _d !== void 0 ? _d : null,
22
8
  });
23
9
  };
24
- export const GetGroupModel = (data) => ({
25
- customer: ((data === null || data === void 0 ? void 0 : data.customer) || []).map(item => {
26
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
27
- return ({
28
- id: (_b = (_a = item === null || item === void 0 ? void 0 : item.customer) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null,
29
- full_name: (_d = (_c = item === null || item === void 0 ? void 0 : item.customer) === null || _c === void 0 ? void 0 : _c.full_name) !== null && _d !== void 0 ? _d : null,
30
- email: (_f = (_e = item === null || item === void 0 ? void 0 : item.customer) === null || _e === void 0 ? void 0 : _e.email) !== null && _f !== void 0 ? _f : null,
31
- create_at: (_h = (_g = item === null || item === void 0 ? void 0 : item.customer) === null || _g === void 0 ? void 0 : _g.create_at) !== null && _h !== void 0 ? _h : null,
32
- phone: (_k = (_j = item === null || item === void 0 ? void 0 : item.customer) === null || _j === void 0 ? void 0 : _j.phone) !== null && _k !== void 0 ? _k : null,
33
- lifetime_point: (_m = (_l = item === null || item === void 0 ? void 0 : item.customer) === null || _l === void 0 ? void 0 : _l.lifetime_point) !== null && _m !== void 0 ? _m : null,
34
- current_point: (_p = (_o = item === null || item === void 0 ? void 0 : item.customer) === null || _o === void 0 ? void 0 : _o.current_point) !== null && _p !== void 0 ? _p : null,
35
- });
36
- })
37
- });
10
+ const GroupCustomerModel = (data) => {
11
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
12
+ return ({
13
+ customer: {
14
+ id: (_b = (_a = data === null || data === void 0 ? void 0 : data.customer) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null,
15
+ full_name: (_d = (_c = data === null || data === void 0 ? void 0 : data.customer) === null || _c === void 0 ? void 0 : _c.full_name) !== null && _d !== void 0 ? _d : null,
16
+ email: (_f = (_e = data === null || data === void 0 ? void 0 : data.customer) === null || _e === void 0 ? void 0 : _e.email) !== null && _f !== void 0 ? _f : null,
17
+ create_at: (_h = (_g = data === null || data === void 0 ? void 0 : data.customer) === null || _g === void 0 ? void 0 : _g.create_at) !== null && _h !== void 0 ? _h : null,
18
+ phone: (_k = (_j = data === null || data === void 0 ? void 0 : data.customer) === null || _j === void 0 ? void 0 : _j.phone) !== null && _k !== void 0 ? _k : null,
19
+ lifetime_point: (_m = (_l = data === null || data === void 0 ? void 0 : data.customer) === null || _l === void 0 ? void 0 : _l.lifetime_point) !== null && _m !== void 0 ? _m : null,
20
+ current_point: (_p = (_o = data === null || data === void 0 ? void 0 : data.customer) === null || _o === void 0 ? void 0 : _o.current_point) !== null && _p !== void 0 ? _p : null,
21
+ }
22
+ });
23
+ };
24
+ export const GetListGroupModel = GroupModel;
25
+ export const GetGroupModel = GroupCustomerModel;
38
26
  export const CreateGroupModel = (data) => {
39
27
  var _a, _b, _c;
40
28
  return ({
@@ -43,18 +31,10 @@ export const CreateGroupModel = (data) => {
43
31
  status: (_c = data === null || data === void 0 ? void 0 : data.status) !== null && _c !== void 0 ? _c : null,
44
32
  });
45
33
  };
46
- export const UpdateGroupModel = (data) => {
47
- var _a, _b, _c, _d, _e, _f, _g, _h;
48
- return ({
49
- group: {
50
- id: (_b = (_a = data === null || data === void 0 ? void 0 : data.group) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null,
51
- name: (_d = (_c = data === null || data === void 0 ? void 0 : data.group) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : null,
52
- description: (_f = (_e = data === null || data === void 0 ? void 0 : data.group) === null || _e === void 0 ? void 0 : _e.description) !== null && _f !== void 0 ? _f : null,
53
- status: (_h = (_g = data === null || data === void 0 ? void 0 : data.group) === null || _g === void 0 ? void 0 : _g.status) !== null && _h !== void 0 ? _h : null,
54
- },
55
- customers: ((data === null || data === void 0 ? void 0 : data.customers) || []).map(GroupCustomerModel),
56
- });
57
- };
34
+ export const UpdateGroupModel = (data) => ({
35
+ group: GroupModel(data === null || data === void 0 ? void 0 : data.group),
36
+ customers: ((data === null || data === void 0 ? void 0 : data.customers) || []).map(GroupCustomerModel),
37
+ });
58
38
  export const DeleteGroupModel = (data) => {
59
39
  var _a, _b, _c, _d;
60
40
  return ({
@@ -76,4 +56,4 @@ export const RemoveCustomersModel = (data) => {
76
56
  customers: ((data === null || data === void 0 ? void 0 : data.customers) || []).map(GroupCustomerModel),
77
57
  });
78
58
  };
79
- export const GetListCustomerToAddGroupModel = GetGroupModel;
59
+ export const GetListCustomerToAddGroupModel = GroupCustomerModel;