gap-nodejs-sdk 1.0.644 → 1.0.645

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.
@@ -28,4 +28,5 @@ export { default as Summary } from "./summary";
28
28
  export { default as Appointment } from "./appointment";
29
29
  export { default as Group } from "./group";
30
30
  export { default as Custom } from "./custom";
31
+ export { default as Other } from "./other";
31
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/pos_client_api/1.0.0/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,aAAa,CAAC;AAChD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,C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UAAU,EAAC,MAAM,cAAc,CAAC;AACnD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC;AACzC,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,MAAM,SAAS,CAAC"}
@@ -28,3 +28,4 @@ export { default as Summary } from "./summary";
28
28
  export { default as Appointment } from "./appointment";
29
29
  export { default as Group } from "./group";
30
30
  export { default as Custom } from "./custom";
31
+ export { default as Other } from "./other";
@@ -0,0 +1,16 @@
1
+ import OtherAbstractClass from "../interfaces/other";
2
+ import BaseOther from "../../../../base/BaseOther";
3
+ import { GapApiVersion } from "../../../../base_type";
4
+ import * as CustomerRequest from "../../../go_check_in_api/1.0.0/types/request";
5
+ import * as CustomerResponse from "../../../go_check_in_api/1.0.0/types/response";
6
+ import * as Request from "../types/request";
7
+ import * as Response from "../types/response";
8
+ import { DataWithMetaResponse } from "../../../../types";
9
+ export default class Other extends BaseOther implements OtherAbstractClass {
10
+ static API_VERSION: GapApiVersion;
11
+ static searchCheckIn(data: Request.SearchCheckInRequest): Promise<Response.SearchCheckInResponse>;
12
+ static getCustomerHistory(query: CustomerRequest.GetCustomerHistoryCheckinRequest): Promise<DataWithMetaResponse<CustomerResponse.GetCustomerHistoryCheckinResponse>>;
13
+ static getStaffDailyIncome(data: Request.GetStaffDailyIncomeRequest): Promise<Array<Response.GetStaffDailyIncomeResponse>>;
14
+ static getIncomeHistory(data: Request.GetIncomeHistoryRequest): Promise<Array<Response.GetIncomeHistoryResponse>>;
15
+ }
16
+ //# sourceMappingURL=other.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"other.d.ts","sourceRoot":"","sources":["../../../../../src/api/pos_client_api/1.0.0/api/other.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,MAAM,qBAAqB,CAAC;AACrD,OAAO,SAAS,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,eAAe,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,gBAAgB,MAAM,+CAA+C,CAAC;AAClF,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAG9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AAGvD,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,SAAU,YAAW,kBAAkB;IACtE,OAAc,WAAW,gBAAoB;WAEzB,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,oBAAoB,GAAG,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC;WAU1F,kBAAkB,CAAC,KAAK,EAAE,eAAe,CAAC,gCAAgC,GAAG,OAAO,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,iCAAiC,CAAC,CAAC;WAU9J,mBAAmB,CAAC,IAAI,EAAE,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC;WAanH,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;CASjI"}
@@ -0,0 +1,53 @@
1
+ import { __awaiter } from "tslib";
2
+ import { check_in } from "../endpoints";
3
+ import { customer } from "../endpoints";
4
+ import { income } from "../endpoints";
5
+ import BaseOther from "../../../../base/BaseOther";
6
+ import { GapApiVersion } from "../../../../base_type";
7
+ import * as Model from "../models";
8
+ import * as CustomerModel from "../../../go_check_in_api/1.0.0/models";
9
+ import { DataWithMetaModel } from "../../../../models";
10
+ export default class Other extends BaseOther {
11
+ static searchCheckIn(data) {
12
+ return __awaiter(this, void 0, void 0, function* () {
13
+ const response = yield this.client.get({
14
+ path: check_in.SEARCH_CHECK_IN,
15
+ query: data
16
+ });
17
+ return Model.SearchCheckInModel(response.result.data);
18
+ });
19
+ }
20
+ static getCustomerHistory(query) {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ const response = yield this.client.get({
23
+ path: customer.GET_CUSTOMER_HISTORY,
24
+ query: query
25
+ });
26
+ return DataWithMetaModel(response, CustomerModel.HistoryModel);
27
+ });
28
+ }
29
+ static getStaffDailyIncome(data) {
30
+ var _a, _b, _c;
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ const response = yield this.client.get({
33
+ path: income.GET_STAFF_DAILY_INCOME,
34
+ query: data
35
+ });
36
+ if (typeof ((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) === 'number') {
37
+ return (_b = response === null || response === void 0 ? void 0 : response.result) === null || _b === void 0 ? void 0 : _b.data;
38
+ }
39
+ return (((_c = response === null || response === void 0 ? void 0 : response.result) === null || _c === void 0 ? void 0 : _c.data) || []).map(item => Model.StaffDailyIncomeModel(item));
40
+ });
41
+ }
42
+ static getIncomeHistory(data) {
43
+ var _a;
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ const response = yield this.client.get({
46
+ path: income.GET_INCOME_HISTORY,
47
+ query: data
48
+ });
49
+ return (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) || []).map(item => Model.IncomeHistoryModel(item));
50
+ });
51
+ }
52
+ }
53
+ Other.API_VERSION = GapApiVersion.V1;
@@ -0,0 +1,11 @@
1
+ import * as Request from "../types/request";
2
+ import * as Response from "../types/response";
3
+ import * as CustomerRequest from "../../../go_check_in_api/1.0.0/types/request";
4
+ import * as CustomerResponse from "../../../go_check_in_api/1.0.0/types/response";
5
+ export default abstract class Other {
6
+ static searchCheckIn: (data: Request.SearchCheckInRequest) => Promise<Response.SearchCheckInResponse>;
7
+ static getCustomerHistory: (data: CustomerRequest.GetCustomerHistoryCheckinRequest) => Promise<CustomerResponse.GetCustomerHistoryCheckinResponse>;
8
+ static getStaffDailyIncome: (data: Request.GetStaffDailyIncomeRequest) => Promise<Array<Response.GetStaffDailyIncomeResponse>>;
9
+ static getIncomeHistory: (data: Request.GetIncomeHistoryRequest) => Promise<Array<Response.GetIncomeHistoryResponse>>;
10
+ }
11
+ //# sourceMappingURL=other.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"other.d.ts","sourceRoot":"","sources":["../../../../../src/api/pos_client_api/1.0.0/interfaces/other.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,eAAe,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,gBAAgB,MAAM,+CAA+C,CAAC;AAElF,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,KAAK;IAC/B,OAAc,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,oBAAoB,KAAK,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IAC7G,OAAc,kBAAkB,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,gCAAgC,KAAK,OAAO,CAAC,gBAAgB,CAAC,iCAAiC,CAAC,CAAC;IAC1J,OAAc,mBAAmB,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,0BAA0B,KAAK,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,2BAA2B,CAAC,CAAC,CAAC;IACtI,OAAc,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,uBAAuB,KAAK,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,CAAC;CAChI"}
@@ -0,0 +1,2 @@
1
+ export default class Other {
2
+ }
@@ -32,4 +32,8 @@ export default class PosClientApi {
32
32
  custom: any;
33
33
  constructor(domain: string, gClientId: string, token: string, version: GapApiVersion);
34
34
  }
35
+ export declare class PosClientApiOther {
36
+ other: any;
37
+ constructor(domain: string, gClientId: string, token: string, version: GapApiVersion);
38
+ }
35
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/pos_client_api/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,YAAY;IAC7B,aAAa,MAAC;IACd,QAAQ,MAAC;IACT,IAAI,MAAC;IACL,QAAQ,MAAC;IACT,QAAQ,MAAC;IACT,SAAS,MAAC;IACV,KAAK,MAAC;IACN,QAAQ,MAAC;IACT,SAAS,MAAC;IACV,MAAM,MAAC;IACP,WAAW,MAAC;IACZ,KAAK,MAAC;IACN,OAAO,MAAC;IACR,OAAO,MAAC;IACR,OAAO,MAAC;IACR,KAAK,MAAC;IACN,MAAM,MAAC;IACP,YAAY,MAAC;IACb,mBAAmB,MAAC;IACpB,IAAI,MAAC;IACL,OAAO,MAAC;IACR,OAAO,MAAC;IACR,UAAU,MAAC;IACX,MAAM,MAAC;IACP,IAAI,MAAC;IACL,MAAM,MAAC;IACP,OAAO,MAAC;IACR,WAAW,MAAC;IACZ,KAAK,MAAC;IACN,MAAM,MAAC;gBAEK,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;CAkCvF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/pos_client_api/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,YAAY;IAC7B,aAAa,MAAC;IACd,QAAQ,MAAC;IACT,IAAI,MAAC;IACL,QAAQ,MAAC;IACT,QAAQ,MAAC;IACT,SAAS,MAAC;IACV,KAAK,MAAC;IACN,QAAQ,MAAC;IACT,SAAS,MAAC;IACV,MAAM,MAAC;IACP,WAAW,MAAC;IACZ,KAAK,MAAC;IACN,OAAO,MAAC;IACR,OAAO,MAAC;IACR,OAAO,MAAC;IACR,KAAK,MAAC;IACN,MAAM,MAAC;IACP,YAAY,MAAC;IACb,mBAAmB,MAAC;IACpB,IAAI,MAAC;IACL,OAAO,MAAC;IACR,OAAO,MAAC;IACR,UAAU,MAAC;IACX,MAAM,MAAC;IACP,IAAI,MAAC;IACL,MAAM,MAAC;IACP,OAAO,MAAC;IACR,WAAW,MAAC;IACZ,KAAK,MAAC;IACN,MAAM,MAAC;gBAEK,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;CAkCvF;AAED,qBAAa,iBAAiB;IAC1B,KAAK,MAAC;gBAEM,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;CAKvF"}
@@ -1,3 +1,4 @@
1
+ import BaseOther from "../../base/BaseOther";
1
2
  import Base from "../../base/Base";
2
3
  import getApi from "./api";
3
4
  export default class PosClientApi {
@@ -36,3 +37,10 @@ export default class PosClientApi {
36
37
  this.custom = API.Custom;
37
38
  }
38
39
  }
40
+ export class PosClientApiOther {
41
+ constructor(domain, gClientId, token, version) {
42
+ BaseOther.setClient(domain, gClientId, token, version);
43
+ const API = getApi(version);
44
+ this.other = API.Other;
45
+ }
46
+ }
@@ -0,0 +1,6 @@
1
+ import { GapApiVersion } from "../base_type";
2
+ export default class BaseOther {
3
+ static client: any;
4
+ static setClient(domain: string, gClientId: string, token: string, version: GapApiVersion): void;
5
+ }
6
+ //# sourceMappingURL=BaseOther.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseOther.d.ts","sourceRoot":"","sources":["../../src/base/BaseOther.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAG3C,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,OAAc,MAAM,MAAC;IAErB,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa;CAG5F"}
@@ -0,0 +1,6 @@
1
+ import { HttpClient } from "../http_client/http_client";
2
+ export default class BaseOther {
3
+ static setClient(domain, gClientId, token, version) {
4
+ this.client = new HttpClient(domain, gClientId, token, version);
5
+ }
6
+ }