gap-nodejs-sdk 1.0.518 → 1.0.519

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,6 +3,7 @@ import Base from "../../../../base/Base";
3
3
  import { GapApiVersion } from "../../../../base_type";
4
4
  import * as Request from "../types/request";
5
5
  import * as Response from "../types/response";
6
+ import { DataWithMetaResponse } from "../../../../types";
6
7
  export default class Payroll extends Base implements PayrollAbstractClass {
7
8
  static API_VERSION: GapApiVersion;
8
9
  static getPayrollList(data: Request.GetPayrollListRequest): Promise<Response.GetPayrollListResponse>;
@@ -15,8 +16,8 @@ export default class Payroll extends Base implements PayrollAbstractClass {
15
16
  static exportApprovePayroll(data: Request.ExportApprovePayrollRequest): Promise<null>;
16
17
  static exportIncomeDetail(data: Request.ExportIncomeDetailRequest): Promise<null>;
17
18
  static getSalaryChart(data: Request.GetSalaryChartRequest): Promise<Response.GetSalaryChartResponse>;
18
- static getAppListPayroll(data: Request.GetAppListPayrollRequest): Promise<Array<Response.GetAppListPayrollResponse>>;
19
- static getPayrollDetail(data: Request.GetPayrollDetailRequest): Promise<Array<Response.GetPayrollDetailResponse>>;
19
+ static getAppListPayroll(data: Request.GetAppListPayrollRequest): Promise<DataWithMetaResponse<Response.GetAppListPayrollResponse>>;
20
+ static getPayrollDetail(data: Request.GetPayrollDetailRequest): Promise<DataWithMetaResponse<Response.GetPayrollDetailResponse>>;
20
21
  static getSiteIncomeDetail(data: Request.GetSiteIncomeDetailRequest): Promise<Response.GetSiteIncomeDetailResponse>;
21
22
  static getSalaryDetail(data: Request.GetSalaryDetailRequest): Promise<Array<Response.GetSalaryDetailResponse>>;
22
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"payroll.d.ts","sourceRoot":"","sources":["../../../../../src/api/pos_client_api/1.0.0/api/payroll.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;AACzD,OAAO,IAAI,MAAM,uBAAuB,CAAC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;WAU9H,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC;WAUhG,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAC;WAUtG,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;WAahE,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;WAa9E,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;WAa1E,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC;WAoB7F,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;WAoB5H,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;WAUzH,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC;WAS5G,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;CAS9H"}
@@ -6,6 +6,7 @@ import dayjs from "dayjs";
6
6
  import { formatExportDateString } from "../../../../utils/date-time";
7
7
  import { GapApiVersion } from "../../../../base_type";
8
8
  import * as Model from "../models";
9
+ import { DataWithMetaModel } from "../../../../models";
9
10
  export default class Payroll extends Base {
10
11
  static getPayrollList(data) {
11
12
  var _a;
@@ -148,24 +149,40 @@ export default class Payroll extends Base {
148
149
  return Model.SalaryChartModel((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data);
149
150
  });
150
151
  }
152
+ // public static async getAppListPayroll(data: Request.GetAppListPayrollRequest): Promise<Array<Response.GetAppListPayrollResponse>> {
153
+ // const response = await this.client.get(
154
+ // {
155
+ // path: payroll.GET_APP_LIST_PAYROLL,
156
+ // query: data
157
+ // }
158
+ // );
159
+ // return (response?.result?.data?.items || []).map(item => Model.AppListPayrollModel(item));
160
+ // }
151
161
  static getAppListPayroll(data) {
152
- var _a;
153
162
  return __awaiter(this, void 0, void 0, function* () {
154
163
  const response = yield this.client.get({
155
164
  path: payroll.GET_APP_LIST_PAYROLL,
156
165
  query: data
157
166
  });
158
- return (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) || []).map(item => Model.AppListPayrollModel(item));
167
+ return DataWithMetaModel(response, Model.AppListPayrollModel);
159
168
  });
160
169
  }
170
+ // public static async getPayrollDetail(data: Request.GetPayrollDetailRequest): Promise<Array<Response.GetPayrollDetailResponse>> {
171
+ // const response = await this.client.get(
172
+ // {
173
+ // path: payroll.GET_PAYROLL_DETAIL,
174
+ // query: data
175
+ // }
176
+ // );
177
+ // return (response?.result?.data || []).map(item => Model.PayrollDetailModel(item));
178
+ // }
161
179
  static getPayrollDetail(data) {
162
- var _a;
163
180
  return __awaiter(this, void 0, void 0, function* () {
164
181
  const response = yield this.client.get({
165
182
  path: payroll.GET_PAYROLL_DETAIL,
166
183
  query: data
167
184
  });
168
- return (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) || []).map(item => Model.PayrollDetailModel(item));
185
+ return DataWithMetaModel(response, Model.PayrollDetailModel);
169
186
  });
170
187
  }
171
188
  static getSiteIncomeDetail(data) {