gap-nodejs-sdk 1.0.715 → 1.0.716

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.
@@ -4,4 +4,5 @@ export { default as Service } from "./service";
4
4
  export { default as Staff } from "./staff";
5
5
  export { default as Appointment } from "./appointment";
6
6
  export { default as Pos } from "./pos";
7
+ export { default as Report } from "./report";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/appointment_api/1.0.0/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,GAAG,EAAC,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/appointment_api/1.0.0/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,GAAG,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC"}
@@ -4,3 +4,4 @@ export { default as Service } from "./service";
4
4
  export { default as Staff } from "./staff";
5
5
  export { default as Appointment } from "./appointment";
6
6
  export { default as Pos } from "./pos";
7
+ export { default as Report } from "./report";
@@ -0,0 +1,10 @@
1
+ import StaffAbstractClass from "../interfaces/staff";
2
+ import Base from "../../../../base/Base";
3
+ import { GapApiVersion } from "../../../../base_type";
4
+ import * as Request from "../types/request";
5
+ export default class Report extends Base implements StaffAbstractClass {
6
+ static API_VERSION: GapApiVersion;
7
+ static getReportSize(data?: Request.GetAppointmentReportSize): Promise<any>;
8
+ static exportReportExcel(data?: Request.GetAppointmentReportSize): Promise<any>;
9
+ }
10
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../../../src/api/appointment_api/1.0.0/api/report.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AACrD,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAO5C,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,IAAK,YAAW,kBAAkB;IAClE,OAAc,WAAW,gBAAoB;WAEzB,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC;WAUpE,iBAAiB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,GAAG,CAAC;CAY/F"}
@@ -0,0 +1,32 @@
1
+ import { __awaiter } from "tslib";
2
+ import { report } from "../endpoints";
3
+ import Base from "../../../../base/Base";
4
+ import { GapApiVersion } from "../../../../base_type";
5
+ import fileDownload from "js-file-download";
6
+ import { formatExportDateString } from "../../../../utils/date-time";
7
+ import dayjs from "dayjs";
8
+ export default class Report extends Base {
9
+ static getReportSize(data) {
10
+ var _a;
11
+ return __awaiter(this, void 0, void 0, function* () {
12
+ const response = yield this.client.get({
13
+ path: report.GET_APPOINTMENT_REPORT_SIZE,
14
+ query: data
15
+ });
16
+ return (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) || []);
17
+ });
18
+ }
19
+ static exportReportExcel(data) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ const response = yield this.client.get({
22
+ path: report.GET_APPOINTMENT_REPORT_SIZE,
23
+ query: data,
24
+ responseType: "blob",
25
+ });
26
+ let dateFormat = formatExportDateString();
27
+ fileDownload(response, `export-${dayjs().format(dateFormat)}.xlsx`);
28
+ return null;
29
+ });
30
+ }
31
+ }
32
+ Report.API_VERSION = GapApiVersion.V1;
@@ -4,4 +4,5 @@ export { default as service } from "./service";
4
4
  export { default as staff } from "./staff";
5
5
  export { default as appointment } from "./appointment";
6
6
  export { default as pos } from "./pos";
7
+ export { default as report } from "./report";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/appointment_api/1.0.0/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,GAAG,EAAC,MAAM,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/appointment_api/1.0.0/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,GAAG,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC"}
@@ -4,3 +4,4 @@ export { default as service } from "./service";
4
4
  export { default as staff } from "./staff";
5
5
  export { default as appointment } from "./appointment";
6
6
  export { default as pos } from "./pos";
7
+ export { default as report } from "./report";
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ GET_APPOINTMENT_REPORT_EXPORT_EXCEL: string;
3
+ GET_APPOINTMENT_REPORT_SIZE: string;
4
+ };
5
+ export default _default;
6
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../../../src/api/appointment_api/1.0.0/endpoints/report.ts"],"names":[],"mappings":";;;;AAAA,wBAGC"}
@@ -0,0 +1,4 @@
1
+ export default {
2
+ GET_APPOINTMENT_REPORT_EXPORT_EXCEL: "/v1/appointment/report/site/export-excel",
3
+ GET_APPOINTMENT_REPORT_SIZE: "/v1/appointment/report/site",
4
+ };
@@ -4,4 +4,5 @@ export * from './service';
4
4
  export * from './staff';
5
5
  export * from './appointment';
6
6
  export * from './pos';
7
+ export * from './report';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/appointment_api/1.0.0/types/request/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/appointment_api/1.0.0/types/request/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
@@ -4,3 +4,4 @@ export * from './service';
4
4
  export * from './staff';
5
5
  export * from './appointment';
6
6
  export * from './pos';
7
+ export * from './report';
@@ -0,0 +1,7 @@
1
+ export type GetAppointmentReportSize = {
2
+ start_date: string;
3
+ end_date: string;
4
+ type: GetAppointmentReportSizeType;
5
+ };
6
+ export type GetAppointmentReportSizeType = 'statistical_appointment_report' | 'best_staff_report' | 'trending_service_report' | 'upcoming_appointment_report' | 'source_appointment_report';
7
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../../../../src/api/appointment_api/1.0.0/types/request/report.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,4BAA4B,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,4BAA4B,GACpC,gCAAgC,GAChC,mBAAmB,GACnB,yBAAyB,GACzB,6BAA6B,GAC7B,2BAA2B,CAAC"}
@@ -6,6 +6,7 @@ export default class SettingsApi {
6
6
  staff: any;
7
7
  appointment: any;
8
8
  pos: any;
9
+ report: any;
9
10
  constructor(domain: string, gClientId: string, token: string, version: GapApiVersion);
10
11
  }
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/appointment_api/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B,QAAQ,MAAC;IACT,QAAQ,MAAC;IACT,OAAO,MAAC;IACR,KAAK,MAAC;IACN,WAAW,MAAC;IACZ,GAAG,MAAC;gBACQ,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;CAUvF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/appointment_api/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B,QAAQ,MAAC;IACT,QAAQ,MAAC;IACT,OAAO,MAAC;IACR,KAAK,MAAC;IACN,WAAW,MAAC;IACZ,GAAG,MAAC;IACJ,MAAM,MAAC;gBACK,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;CAWvF"}
@@ -10,5 +10,6 @@ export default class SettingsApi {
10
10
  this.staff = API.Staff;
11
11
  this.appointment = API.Appointment;
12
12
  this.pos = API.Pos;
13
+ this.report = API.Report;
13
14
  }
14
15
  }