gap-nodejs-sdk 1.0.10 → 1.0.13
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.
- package/dist/base/Base.js +9 -0
- package/dist/error.js +18 -5
- package/dist/gap-sdk.js +1 -1
- package/dist/gci_client_api/interface/customer.js +2 -0
- package/dist/gci_client_api/interface/staff.js +2 -0
- package/dist/{base/response_data_api_type.js → gci_client_api/types/customer.js} +0 -0
- package/dist/gci_client_api/types/index.js +2 -0
- package/dist/{src/base/response_data_api_type.js → gci_client_api/types/staff.js} +0 -0
- package/dist/gci_client_api/v1/GciClientApi.js +10 -0
- package/dist/gci_client_api/v1/api/customer.js +115 -0
- package/dist/gci_client_api/v1/api/index.js +2 -0
- package/dist/gci_client_api/v1/api/staff.js +3 -0
- package/dist/{src/http_client/http_client.js → gci_client_api/v1/endpoint/customer.js} +0 -0
- package/dist/gci_client_api/v1/endpoint/index.js +15 -0
- package/dist/gci_client_api/v1/endpoint/staff.js +0 -0
- package/dist/http_client/http_client.d.ts.map +1 -1
- package/dist/http_client/http_client.js +141 -0
- package/dist/http_client/types.js +57 -13
- package/dist/index.js +2 -5
- package/dist/pos_client_api/enums/index.js +12 -0
- package/dist/pos_client_api/interface/appointment.js +2 -0
- package/dist/pos_client_api/interface/batch_history.js +2 -0
- package/dist/pos_client_api/interface/business.js +2 -0
- package/dist/pos_client_api/interface/call.js +2 -0
- package/dist/pos_client_api/interface/category.js +2 -0
- package/dist/pos_client_api/interface/check_in.js +2 -0
- package/dist/pos_client_api/interface/check_out.js +2 -0
- package/dist/pos_client_api/interface/combo.js +2 -0
- package/dist/pos_client_api/interface/customer.js +2 -0
- package/dist/pos_client_api/interface/gift_card.js +2 -0
- package/dist/pos_client_api/interface/income.js +2 -0
- package/dist/{src/gci_client_api → pos_client_api}/interface/index.js +0 -0
- package/dist/pos_client_api/interface/key_storage.js +2 -0
- package/dist/pos_client_api/interface/order.js +2 -0
- package/dist/pos_client_api/interface/payroll.js +2 -0
- package/dist/pos_client_api/interface/printer.js +2 -0
- package/dist/pos_client_api/interface/service.js +2 -0
- package/dist/pos_client_api/interface/setting_turn.js +2 -0
- package/dist/pos_client_api/interface/staff.js +2 -0
- package/dist/pos_client_api/interface/ticket.js +2 -0
- package/dist/pos_client_api/interface/time_keeping.js +2 -0
- package/dist/pos_client_api/interface/unsubscribe_contact.js +4 -0
- package/dist/pos_client_api/interface/user.js +2 -0
- package/dist/{src/interface/invoke_event_interface.js → pos_client_api/types/appointment.js} +0 -0
- package/dist/pos_client_api/types/batch_history.js +1 -0
- package/dist/pos_client_api/types/business.js +1 -0
- package/dist/pos_client_api/types/call.js +1 -0
- package/dist/pos_client_api/types/category.js +1 -0
- package/dist/pos_client_api/types/check_in.js +1 -0
- package/dist/pos_client_api/types/check_out.js +1 -0
- package/dist/pos_client_api/types/combo.js +1 -0
- package/dist/pos_client_api/types/customer.js +1 -0
- package/dist/pos_client_api/types/gift_card.js +1 -0
- package/dist/pos_client_api/types/income.js +1 -0
- package/dist/pos_client_api/types/key_storage.js +1 -0
- package/dist/pos_client_api/types/order.js +16 -0
- package/dist/pos_client_api/types/payroll.js +1 -0
- package/dist/pos_client_api/types/printer.js +1 -0
- package/dist/pos_client_api/types/service.js +1 -0
- package/dist/pos_client_api/types/setting_turn.js +1 -0
- package/dist/pos_client_api/types/staff.js +1 -0
- package/dist/pos_client_api/types/ticket.js +1 -0
- package/dist/pos_client_api/types/time_keeping.js +1 -0
- package/dist/pos_client_api/types/unsubscribe_contact.js +1 -0
- package/dist/pos_client_api/v1/PosClientApi.js +29 -0
- package/dist/pos_client_api/v1/api/appointment.js +29 -0
- package/dist/pos_client_api/v1/api/batch_history.js +21 -0
- package/dist/pos_client_api/v1/api/business.js +21 -0
- package/dist/pos_client_api/v1/api/call.js +13 -0
- package/dist/pos_client_api/v1/api/category.js +13 -0
- package/dist/pos_client_api/v1/api/check_in.js +45 -0
- package/dist/pos_client_api/v1/api/check_out.js +237 -0
- package/dist/pos_client_api/v1/api/combo.js +13 -0
- package/dist/pos_client_api/v1/api/customer.js +21 -0
- package/dist/pos_client_api/v1/api/gift_card.js +21 -0
- package/dist/pos_client_api/v1/api/income.js +21 -0
- package/dist/pos_client_api/v1/api/index.js +22 -0
- package/dist/pos_client_api/v1/api/key_storage.js +13 -0
- package/dist/pos_client_api/v1/api/order.js +82 -0
- package/dist/pos_client_api/v1/api/payroll.js +142 -0
- package/dist/pos_client_api/v1/api/printer.js +37 -0
- package/dist/pos_client_api/v1/api/service.js +13 -0
- package/dist/pos_client_api/v1/api/setting_turn.js +21 -0
- package/dist/pos_client_api/v1/api/staff.js +21 -0
- package/dist/pos_client_api/v1/api/ticket.js +70 -0
- package/dist/pos_client_api/v1/api/time_keeping.js +61 -0
- package/dist/pos_client_api/v1/api/unsubscribe_contact.js +4 -0
- package/dist/pos_client_api/v1/api/user.js +13 -0
- package/dist/pos_client_api/v1/endpoint/appointment.js +5 -0
- package/dist/pos_client_api/v1/endpoint/batch_history.js +4 -0
- package/dist/pos_client_api/v1/endpoint/business.js +4 -0
- package/dist/pos_client_api/v1/endpoint/call.js +4 -0
- package/dist/pos_client_api/v1/endpoint/category.js +3 -0
- package/dist/pos_client_api/v1/endpoint/check_in.js +7 -0
- package/dist/pos_client_api/v1/endpoint/check_out.js +31 -0
- package/dist/pos_client_api/v1/endpoint/combo.js +3 -0
- package/dist/pos_client_api/v1/endpoint/customer.js +4 -0
- package/dist/pos_client_api/v1/endpoint/gift_card.js +4 -0
- package/dist/pos_client_api/v1/endpoint/income.js +4 -0
- package/dist/pos_client_api/v1/endpoint/index.js +22 -0
- package/dist/pos_client_api/v1/endpoint/key_storage.js +3 -0
- package/dist/pos_client_api/v1/endpoint/order.js +16 -0
- package/dist/pos_client_api/v1/endpoint/payroll.js +18 -0
- package/dist/pos_client_api/v1/endpoint/printer.js +6 -0
- package/dist/pos_client_api/v1/endpoint/service.js +3 -0
- package/dist/pos_client_api/v1/endpoint/setting_turn.js +4 -0
- package/dist/pos_client_api/v1/endpoint/staff.js +4 -0
- package/dist/pos_client_api/v1/endpoint/ticket.js +10 -0
- package/dist/pos_client_api/v1/endpoint/time_keeping.js +9 -0
- package/dist/pos_client_api/v1/endpoint/unsubscribe_contact.js +4 -0
- package/dist/pos_client_api/v1/endpoint/user.js +3 -0
- package/dist/utils/date-time.js +9 -0
- package/package.json +4 -4
- package/dist/base/response_data_api_type.d.ts +0 -8
- package/dist/base/response_data_api_type.d.ts.map +0 -1
- package/dist/gci_client_api/v1/repository/GciClientRepository.d.ts +0 -8
- package/dist/gci_client_api/v1/repository/GciClientRepository.d.ts.map +0 -1
- package/dist/gci_client_api/v1/repository/GciClientRepository.js +0 -14
- package/dist/src/base/response_data_api_type.d.ts +0 -8
- package/dist/src/base/response_data_api_type.d.ts.map +0 -1
- package/dist/src/base_type.d.ts +0 -20
- package/dist/src/base_type.d.ts.map +0 -1
- package/dist/src/base_type.js +0 -23
- package/dist/src/context.d.ts +0 -23
- package/dist/src/context.d.ts.map +0 -1
- package/dist/src/context.js +0 -35
- package/dist/src/error.d.ts +0 -26
- package/dist/src/error.d.ts.map +0 -1
- package/dist/src/error.js +0 -24
- package/dist/src/gci_client_api/interface/index.d.ts +0 -7
- package/dist/src/gci_client_api/interface/index.d.ts.map +0 -1
- package/dist/src/gci_client_api/v1/repository/GciClientRepository.d.ts +0 -8
- package/dist/src/gci_client_api/v1/repository/GciClientRepository.d.ts.map +0 -1
- package/dist/src/gci_client_api/v1/repository/GciClientRepository.js +0 -14
- package/dist/src/http_client/http_client.d.ts +0 -1
- package/dist/src/http_client/http_client.d.ts.map +0 -1
- package/dist/src/http_client/types.d.ts +0 -31
- package/dist/src/http_client/types.d.ts.map +0 -1
- package/dist/src/http_client/types.js +0 -13
- package/dist/src/index.d.ts +0 -8
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -14
- package/dist/src/interface/invoke_event_interface.d.ts +0 -4
- package/dist/src/interface/invoke_event_interface.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -2
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/utils/processed-query.d.ts +0 -18
- package/dist/utils/processed-query.d.ts.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpClient } from "../http_client/http_client";
|
|
2
|
+
export default class Base {
|
|
3
|
+
static setClient(domain, gClientId, token) {
|
|
4
|
+
if (!domain || !gClientId || !token) {
|
|
5
|
+
return console.error(new Error('Missing params init http_client'));
|
|
6
|
+
}
|
|
7
|
+
this.client = new HttpClient(domain, gClientId, token);
|
|
8
|
+
}
|
|
9
|
+
}
|
package/dist/error.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
1
2
|
export class GapError extends Error {
|
|
2
3
|
constructor(...args) {
|
|
3
4
|
super(...args);
|
|
4
5
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
5
6
|
}
|
|
6
7
|
}
|
|
8
|
+
export class MissingDataContextError extends GapError {
|
|
9
|
+
}
|
|
10
|
+
export class UninitializedContextError extends GapError {
|
|
11
|
+
}
|
|
12
|
+
export class HttpRequestError extends GapError {
|
|
13
|
+
}
|
|
14
|
+
export class HttpMaxRetriesError extends GapError {
|
|
15
|
+
}
|
|
7
16
|
export class HttpResponseError extends GapError {
|
|
8
17
|
constructor({ message, code, statusText, body, headers, }) {
|
|
9
18
|
super(message);
|
|
@@ -15,10 +24,14 @@ export class HttpResponseError extends GapError {
|
|
|
15
24
|
};
|
|
16
25
|
}
|
|
17
26
|
}
|
|
18
|
-
|
|
19
|
-
export class UninitializedContextError extends GapError {
|
|
27
|
+
export class HttpRetryableError extends HttpResponseError {
|
|
20
28
|
}
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
export class HttpInternalError extends HttpRetryableError {
|
|
30
|
+
}
|
|
31
|
+
export class HttpThrottlingError extends HttpRetryableError {
|
|
32
|
+
constructor(_a) {
|
|
33
|
+
var { retryAfter } = _a, params = __rest(_a, ["retryAfter"]);
|
|
34
|
+
super(params);
|
|
35
|
+
this.response.retryAfter = retryAfter;
|
|
36
|
+
}
|
|
23
37
|
}
|
|
24
|
-
;
|
package/dist/gap-sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GapSdk=t():e.GapSdk=t()}(self,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{Gap:()=>I,GapApiVersion:()=>o,GapHeader:()=>n,Platform:()=>i,UserAgent:()=>r,default:()=>l});var o,n,r,i,s={};e.r(s),e.d(s,{GapError:()=>a,HttpResponseError:()=>E,MissingDataContextError:()=>p,UninitializedContextError:()=>d}),function(e){e.V1="1.0.0"}(o||(o={})),function(e){e.GClientId="G-ClientID"}(n||(n={})),function(e){e.IOS="IOS",e.ANDROID="ANDROID",e.CHROME="CHROME",e.SAFARI="SAFARI"}(r||(r={})),function(e){e.ANDROID="Android",e.IOS="iOS",e.WEB="Web",e.WINDOW="Window"}(i||(i={}));class a extends Error{constructor(...e){super(...e),Object.setPrototypeOf(this,new.target.prototype)}}class E extends a{constructor({message:e,code:t,statusText:o,body:n,headers:r}){super(e),this.response={code:t,statusText:o,body:n,headers:r}}}class d extends a{}class p extends a{}const I={Context:{API_KEY:"",API_SECRET_KEY:"",G_CLIENTID:"",USER_AGENT:"",API_VERSION:o.V1,initialize:function(e){const t=[];if(e.API_KEY.length||t.push("API_KEY"),e.API_SECRET_KEY.length||t.push("API_SECRET_KEY"),e.API_SECRET_KEY.length||t.push("G_CLIENTID"),t.length)throw new p(`Cannot initialize GAP Library. Missing values for: ${t.join(", ")}`);this.API_KEY=e.API_KEY,this.API_SECRET_KEY=e.API_SECRET_KEY,this.G_CLIENTID=e.G_CLIENTID,this.API_VERSION=e.API_VERSION},throwIfUninitialized:function(){if(!this.API_KEY||0===this.API_KEY.length)throw new d("Context has not been properly initialized. Please call the .initialize() method to setup your app context object.")}},Errors:s};window.Gap=I;const l=I;return t})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.GapSdk=e():t.GapSdk=e()}(self,(()=>(()=>{var t={669:(t,e,i)=>{t.exports=i(609)},448:(t,e,i)=>{"use strict";var r=i(867),n=i(26),o=i(372),s=i(327),a=i(97),u=i(109),c=i(985),d=i(874),h=i(648),l=i(644),p=i(205);t.exports=function(t){return new Promise((function(e,i){var f,v=t.data,y=t.headers,m=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(f),t.signal&&t.signal.removeEventListener("abort",f)}r.isFormData(v)&&r.isStandardBrowserEnv()&&delete y["Content-Type"];var b=new XMLHttpRequest;if(t.auth){var O=t.auth.username||"",E=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";y.Authorization="Basic "+btoa(O+":"+E)}var w=a(t.baseURL,t.url);function x(){if(b){var r="getAllResponseHeaders"in b?u(b.getAllResponseHeaders()):null,o={data:m&&"text"!==m&&"json"!==m?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:t,request:b};n((function(t){e(t),g()}),(function(t){i(t),g()}),o),b=null}}if(b.open(t.method.toUpperCase(),s(w,t.params,t.paramsSerializer),!0),b.timeout=t.timeout,"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(x)},b.onabort=function(){b&&(i(new h("Request aborted",h.ECONNABORTED,t,b)),b=null)},b.onerror=function(){i(new h("Network Error",h.ERR_NETWORK,t,b,b)),b=null},b.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||d;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),i(new h(e,r.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,b)),b=null},r.isStandardBrowserEnv()){var S=(t.withCredentials||c(w))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;S&&(y[t.xsrfHeaderName]=S)}"setRequestHeader"in b&&r.forEach(y,(function(t,e){void 0===v&&"content-type"===e.toLowerCase()?delete y[e]:b.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),m&&"json"!==m&&(b.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&b.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(f=function(t){b&&(i(!t||t&&t.type?new l:t),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(f),t.signal&&(t.signal.aborted?f():t.signal.addEventListener("abort",f))),v||(v=null);var R=p(w);R&&-1===["http","https","file"].indexOf(R)?i(new h("Unsupported protocol "+R+":",h.ERR_BAD_REQUEST,t)):b.send(v)}))}},609:(t,e,i)=>{"use strict";var r=i(867),n=i(849),o=i(321),s=i(185),a=function t(e){var i=new o(e),a=n(o.prototype.request,i);return r.extend(a,o.prototype,i),r.extend(a,i),a.create=function(i){return t(s(e,i))},a}(i(546));a.Axios=o,a.CanceledError=i(644),a.CancelToken=i(972),a.isCancel=i(502),a.VERSION=i(288).version,a.toFormData=i(675),a.AxiosError=i(648),a.Cancel=a.CanceledError,a.all=function(t){return Promise.all(t)},a.spread=i(713),a.isAxiosError=i(268),t.exports=a,t.exports.default=a},972:(t,e,i)=>{"use strict";var r=i(644);function n(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var i=this;this.promise.then((function(t){if(i._listeners){var e,r=i._listeners.length;for(e=0;e<r;e++)i._listeners[e](t);i._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){i.subscribe(t),e=t})).then(t);return r.cancel=function(){i.unsubscribe(e)},r},t((function(t){i.reason||(i.reason=new r(t),e(i.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},n.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},n.source=function(){var t;return{token:new n((function(e){t=e})),cancel:t}},t.exports=n},644:(t,e,i)=>{"use strict";var r=i(648);function n(t){r.call(this,null==t?"canceled":t,r.ERR_CANCELED),this.name="CanceledError"}i(867).inherits(n,r,{__CANCEL__:!0}),t.exports=n},502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,i)=>{"use strict";var r=i(867),n=i(327),o=i(782),s=i(572),a=i(185),u=i(97),c=i(875),d=c.validators;function h(t){this.defaults=t,this.interceptors={request:new o,response:new o}}h.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var i=e.transitional;void 0!==i&&c.assertOptions(i,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,u=[];if(this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)})),!n){var h=[s,void 0];for(Array.prototype.unshift.apply(h,r),h=h.concat(u),o=Promise.resolve(e);h.length;)o=o.then(h.shift(),h.shift());return o}for(var l=e;r.length;){var p=r.shift(),f=r.shift();try{l=p(l)}catch(t){f(t);break}}try{o=s(l)}catch(t){return Promise.reject(t)}for(;u.length;)o=o.then(u.shift(),u.shift());return o},h.prototype.getUri=function(t){t=a(this.defaults,t);var e=u(t.baseURL,t.url);return n(e,t.params,t.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(t){h.prototype[t]=function(e,i){return this.request(a(i||{},{method:t,url:e,data:(i||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){function e(e){return function(i,r,n){return this.request(a(n||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}h.prototype[t]=e(),h.prototype[t+"Form"]=e(!0)})),t.exports=h},648:(t,e,i)=>{"use strict";var r=i(867);function n(t,e,i,r,n){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),r&&(this.request=r),n&&(this.response=n)}r.inherits(n,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=n.prototype,s={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(t){s[t]={value:t}})),Object.defineProperties(n,s),Object.defineProperty(o,"isAxiosError",{value:!0}),n.from=function(t,e,i,s,a,u){var c=Object.create(o);return r.toFlatObject(t,c,(function(t){return t!==Error.prototype})),n.call(c,t.message,e,i,s,a),c.name=t.name,u&&Object.assign(c,u),c},t.exports=n},782:(t,e,i)=>{"use strict";var r=i(867);function n(){this.handlers=[]}n.prototype.use=function(t,e,i){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},n.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},n.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=n},97:(t,e,i)=>{"use strict";var r=i(793),n=i(303);t.exports=function(t,e){return t&&!r(e)?n(t,e):e}},572:(t,e,i)=>{"use strict";var r=i(867),n=i(527),o=i(502),s=i(546),a=i(644);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new a}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=n.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return u(t),e.data=n.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(u(t),e&&e.response&&(e.response.data=n.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},185:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t,e){e=e||{};var i={};function n(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function o(i){return r.isUndefined(e[i])?r.isUndefined(t[i])?void 0:n(void 0,t[i]):n(t[i],e[i])}function s(t){if(!r.isUndefined(e[t]))return n(void 0,e[t])}function a(i){return r.isUndefined(e[i])?r.isUndefined(t[i])?void 0:n(void 0,t[i]):n(void 0,e[i])}function u(i){return i in e?n(t[i],e[i]):i in t?n(void 0,t[i]):void 0}var c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||o,n=e(t);r.isUndefined(n)&&e!==u||(i[t]=n)})),i}},26:(t,e,i)=>{"use strict";var r=i(648);t.exports=function(t,e,i){var n=i.config.validateStatus;i.status&&n&&!n(i.status)?e(new r("Request failed with status code "+i.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):t(i)}},527:(t,e,i)=>{"use strict";var r=i(867),n=i(546);t.exports=function(t,e,i){var o=this||n;return r.forEach(i,(function(i){t=i.call(o,t,e)})),t}},546:(t,e,i)=>{"use strict";var r=i(867),n=i(16),o=i(648),s=i(874),a=i(675),u={"Content-Type":"application/x-www-form-urlencoded"};function c(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var d,h={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(d=i(448)),d),transformRequest:[function(t,e){if(n(e,"Accept"),n(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t))return t;if(r.isArrayBufferView(t))return t.buffer;if(r.isURLSearchParams(t))return c(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var i,o=r.isObject(t),s=e&&e["Content-Type"];if((i=r.isFileList(t))||o&&"multipart/form-data"===s){var u=this.env&&this.env.FormData;return a(i?{"files[]":t}:t,u&&new u)}return o||"application/json"===s?(c(e,"application/json"),function(t,e,i){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||h.transitional,i=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,s=!i&&"json"===this.responseType;if(s||n&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(s){if("SyntaxError"===t.name)throw o.from(t,o.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:i(623)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){h.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){h.headers[t]=r.merge(u)})),t.exports=h},874:t=>{"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},288:t=>{t.exports={version:"0.27.2"}},849:t=>{"use strict";t.exports=function(t,e){return function(){for(var i=new Array(arguments.length),r=0;r<i.length;r++)i[r]=arguments[r];return t.apply(e,i)}}},327:(t,e,i)=>{"use strict";var r=i(867);function n(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,i){if(!e)return t;var o;if(i)o=i(e);else if(r.isURLSearchParams(e))o=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(n(e)+"="+n(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},372:(t,e,i)=>{"use strict";var r=i(867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,i,n,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),r.isString(n)&&a.push("path="+n),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},268:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t){return r.isObject(t)&&!0===t.isAxiosError}},985:(t,e,i)=>{"use strict";var r=i(867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function n(t){var r=t;return e&&(i.setAttribute("href",r),r=i.href),i.setAttribute("href",r),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return t=n(window.location.href),function(e){var i=r.isString(e)?n(e):e;return i.protocol===t.protocol&&i.host===t.host}}():function(){return!0}},16:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t,e){r.forEach(t,(function(i,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=i,delete t[r])}))}},623:t=>{t.exports=null},109:(t,e,i)=>{"use strict";var r=i(867),n=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,i,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),i=r.trim(t.substr(o+1)),e){if(s[e]&&n.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([i]):s[e]?s[e]+", "+i:i}})),s):s}},205:t=>{"use strict";t.exports=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}},713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},675:(t,e,i)=>{"use strict";var r=i(867);t.exports=function(t,e){e=e||new FormData;var i=[];function n(t){return null===t?"":r.isDate(t)?t.toISOString():r.isArrayBuffer(t)||r.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}return function t(o,s){if(r.isPlainObject(o)||r.isArray(o)){if(-1!==i.indexOf(o))throw Error("Circular reference detected in "+s);i.push(o),r.forEach(o,(function(i,o){if(!r.isUndefined(i)){var a,u=s?s+"."+o:o;if(i&&!s&&"object"==typeof i)if(r.endsWith(o,"{}"))i=JSON.stringify(i);else if(r.endsWith(o,"[]")&&(a=r.toArray(i)))return void a.forEach((function(t){!r.isUndefined(t)&&e.append(u,n(t))}));t(i,u)}})),i.pop()}else e.append(s,n(o))}(t),e}},875:(t,e,i)=>{"use strict";var r=i(288).version,n=i(648),o={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){o[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}}));var s={};o.transitional=function(t,e,i){function o(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(i?". "+i:"")}return function(i,r,a){if(!1===t)throw new n(o(r," has been removed"+(e?" in "+e:"")),n.ERR_DEPRECATED);return e&&!s[r]&&(s[r]=!0,console.warn(o(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(i,r,a)}},t.exports={assertOptions:function(t,e,i){if("object"!=typeof t)throw new n("options must be an object",n.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(t),o=r.length;o-- >0;){var s=r[o],a=e[s];if(a){var u=t[s],c=void 0===u||a(u,s,t);if(!0!==c)throw new n("option "+s+" must be "+c,n.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new n("Unknown option "+s,n.ERR_BAD_OPTION)}},validators:o}},867:(t,e,i)=>{"use strict";var r,n=i(849),o=Object.prototype.toString,s=(r=Object.create(null),function(t){var e=o.call(t);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())});function a(t){return t=t.toLowerCase(),function(e){return s(e)===t}}function u(t){return Array.isArray(t)}function c(t){return void 0===t}var d=a("ArrayBuffer");function h(t){return null!==t&&"object"==typeof t}function l(t){if("object"!==s(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var p=a("Date"),f=a("File"),v=a("Blob"),y=a("FileList");function m(t){return"[object Function]"===o.call(t)}var g=a("URLSearchParams");function b(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),u(t))for(var i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(null,t[n],n,t)}var O,E=(O="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return O&&t instanceof O});t.exports={isArray:u,isArrayBuffer:d,isBuffer:function(t){return null!==t&&!c(t)&&null!==t.constructor&&!c(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){var e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||o.call(t)===e||m(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&d(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:h,isPlainObject:l,isUndefined:c,isDate:p,isFile:f,isBlob:v,isFunction:m,isStream:function(t){return h(t)&&m(t.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:b,merge:function t(){var e={};function i(i,r){l(e[r])&&l(i)?e[r]=t(e[r],i):l(i)?e[r]=t({},i):u(i)?e[r]=i.slice():e[r]=i}for(var r=0,n=arguments.length;r<n;r++)b(arguments[r],i);return e},extend:function(t,e,i){return b(e,(function(e,r){t[r]=i&&"function"==typeof e?n(e,i):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,i,r){t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,i&&Object.assign(t.prototype,i)},toFlatObject:function(t,e,i){var r,n,o,s={};e=e||{};do{for(n=(r=Object.getOwnPropertyNames(t)).length;n-- >0;)s[o=r[n]]||(e[o]=t[o],s[o]=!0);t=Object.getPrototypeOf(t)}while(t&&(!i||i(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:a,endsWith:function(t,e,i){t=String(t),(void 0===i||i>t.length)&&(i=t.length),i-=e.length;var r=t.indexOf(e,i);return-1!==r&&r===i},toArray:function(t){if(!t)return null;var e=t.length;if(c(e))return null;for(var i=new Array(e);e-- >0;)i[e]=t[e];return i},isTypedArray:E,isFileList:y}},484:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,i="millisecond",r="second",n="minute",o="hour",s="day",a="week",u="month",c="quarter",d="year",h="date",l="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},y=function(t,e,i){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(i)+t},m={s:y,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),r=Math.floor(i/60),n=i%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(n,2,"0")},m:function t(e,i){if(e.date()<i.date())return-t(i,e);var r=12*(i.year()-e.year())+(i.month()-e.month()),n=e.clone().add(r,u),o=i-n<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(i-n)/(o?n-s:s-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:d,w:a,d:s,D:h,h:o,m:n,s:r,ms:i,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",b={};b[g]=v;var O=function(t){return t instanceof S},E=function t(e,i,r){var n;if(!e)return g;if("string"==typeof e){var o=e.toLowerCase();b[o]&&(n=o),i&&(b[o]=i,n=o);var s=e.split("-");if(!n&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,n=a}return!r&&n&&(g=n),n||!r&&g},w=function(t,e){if(O(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new S(i)},x=m;x.l=E,x.i=O,x.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function v(t){this.$L=E(t.locale,null,!0),this.parse(t)}var y=v.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(x.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var n=r[2]-1||0,o=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return x},y.isValid=function(){return!(this.$d.toString()===l)},y.isSame=function(t,e){var i=w(t);return this.startOf(e)<=i&&i<=this.endOf(e)},y.isAfter=function(t,e){return w(t)<this.startOf(e)},y.isBefore=function(t,e){return this.endOf(e)<w(t)},y.$g=function(t,e,i){return x.u(t)?this[e]:this.set(i,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,e){var i=this,c=!!x.u(e)||e,l=x.p(t),p=function(t,e){var r=x.w(i.$u?Date.UTC(i.$y,e,t):new Date(i.$y,e,t),i);return c?r:r.endOf(s)},f=function(t,e){return x.w(i.toDate()[t].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),i)},v=this.$W,y=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case d:return c?p(1,0):p(31,11);case u:return c?p(1,y):p(0,y+1);case a:var b=this.$locale().weekStart||0,O=(v<b?v+7:v)-b;return p(c?m-O:m+(6-O),y);case s:case h:return f(g+"Hours",0);case o:return f(g+"Minutes",1);case n:return f(g+"Seconds",2);case r:return f(g+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,e){var a,c=x.p(t),l="set"+(this.$u?"UTC":""),p=(a={},a[s]=l+"Date",a[h]=l+"Date",a[u]=l+"Month",a[d]=l+"FullYear",a[o]=l+"Hours",a[n]=l+"Minutes",a[r]=l+"Seconds",a[i]=l+"Milliseconds",a)[c],f=c===s?this.$D+(e-this.$W):e;if(c===u||c===d){var v=this.clone().set(h,1);v.$d[p](f),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](f);return this.init(),this},y.set=function(t,e){return this.clone().$set(t,e)},y.get=function(t){return this[x.p(t)]()},y.add=function(i,c){var h,l=this;i=Number(i);var p=x.p(c),f=function(t){var e=w(l);return x.w(e.date(e.date()+Math.round(t*i)),l)};if(p===u)return this.set(u,this.$M+i);if(p===d)return this.set(d,this.$y+i);if(p===s)return f(1);if(p===a)return f(7);var v=(h={},h[n]=t,h[o]=e,h[r]=1e3,h)[p]||1,y=this.$d.getTime()+i*v;return x.w(y,this)},y.subtract=function(t,e){return this.add(-1*t,e)},y.format=function(t){var e=this,i=this.$locale();if(!this.isValid())return i.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",n=x.z(this),o=this.$H,s=this.$m,a=this.$M,u=i.weekdays,c=i.months,d=function(t,i,n,o){return t&&(t[i]||t(e,r))||n[i].slice(0,o)},h=function(t){return x.s(o%12||12,t,"0")},p=i.meridiem||function(t,e,i){var r=t<12?"AM":"PM";return i?r.toLowerCase():r},v={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:x.s(a+1,2,"0"),MMM:d(i.monthsShort,a,c,3),MMMM:d(c,a),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:d(i.weekdaysMin,this.$W,u,2),ddd:d(i.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(o),HH:x.s(o,2,"0"),h:h(1),hh:h(2),a:p(o,s,!0),A:p(o,s,!1),m:String(s),mm:x.s(s,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:n};return r.replace(f,(function(t,e){return e||v[t]||n.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(i,h,l){var p,f=x.p(h),v=w(i),y=(v.utcOffset()-this.utcOffset())*t,m=this-v,g=x.m(this,v);return g=(p={},p[d]=g/12,p[u]=g,p[c]=g/3,p[a]=(m-y)/6048e5,p[s]=(m-y)/864e5,p[o]=m/e,p[n]=m/t,p[r]=m/1e3,p)[f]||m,l?g:x.a(g)},y.daysInMonth=function(){return this.endOf(u).$D},y.$locale=function(){return b[this.$L]},y.locale=function(t,e){if(!t)return this.$L;var i=this.clone(),r=E(t,e,!0);return r&&(i.$L=r),i},y.clone=function(){return x.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},v}(),R=S.prototype;return w.prototype=R,[["$ms",i],["$s",r],["$m",n],["$H",o],["$W",s],["$M",u],["$y",d],["$D",h]].forEach((function(t){R[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,S,w),t.$i=!0),w},w.locale=E,w.isDayjs=O,w.unix=function(t){return w(1e3*t)},w.en=b[g],w.Ls=b,w.p={},w}()},823:t=>{t.exports=function(t,e,i,r){var n=new Blob(void 0!==r?[r,t]:[t],{type:i||"application/octet-stream"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(n,e);else{var o=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(n):window.webkitURL.createObjectURL(n),s=document.createElement("a");s.style.display="none",s.href=o,s.setAttribute("download",e),void 0===s.download&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout((function(){document.body.removeChild(s),window.URL.revokeObjectURL(o)}),200)}}}},e={};function i(r){var n=e[r];if(void 0!==n)return n.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";i.r(r),i.d(r,{Gap:()=>Q,GapApiVersion:()=>t,GapHeader:()=>e,Platform:()=>o,UserAgent:()=>n,default:()=>Z});var t,e,n,o,s={};function a(t,e,i,r){return new(i||(i=Promise))((function(n,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}i.r(s),i.d(s,{GapError:()=>u,HttpInternalError:()=>v,HttpMaxRetriesError:()=>l,HttpRequestError:()=>h,HttpResponseError:()=>p,HttpRetryableError:()=>f,HttpThrottlingError:()=>y,MissingDataContextError:()=>c,UninitializedContextError:()=>d}),function(t){t.V1="1.0.0"}(t||(t={})),function(t){t.GClientId="G-ClientID"}(e||(e={})),function(t){t.IOS="IOS",t.ANDROID="ANDROID",t.CHROME="CHROME",t.SAFARI="SAFARI"}(n||(n={})),function(t){t.ANDROID="Android",t.IOS="iOS",t.WEB="Web",t.WINDOW="Window"}(o||(o={})),Object.create,Object.create;class u extends Error{constructor(...t){super(...t),Object.setPrototypeOf(this,new.target.prototype)}}class c extends u{}class d extends u{}class h extends u{}class l extends u{}class p extends u{constructor({message:t,code:e,statusText:i,body:r,headers:n}){super(t),this.response={code:e,statusText:i,body:r,headers:n}}}class f extends p{}class v extends f{}class y extends f{constructor(t){var{retryAfter:e}=t;super(function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]])}return i}(t,["retryAfter"])),this.response.retryAfter=e}}const m={API_KEY:"",API_SECRET_KEY:"",G_CLIENTID:"",USER_AGENT:"",API_VERSION:t.V1,initialize:function(t){const e=[];if(t.API_KEY.length||e.push("API_KEY"),t.API_SECRET_KEY.length||e.push("API_SECRET_KEY"),t.API_SECRET_KEY.length||e.push("G_CLIENTID"),e.length)throw new c(`Cannot initialize GAP Library. Missing values for: ${e.join(", ")}`);this.API_KEY=t.API_KEY,this.API_SECRET_KEY=t.API_SECRET_KEY,this.G_CLIENTID=t.G_CLIENTID,this.API_VERSION=t.API_VERSION},throwIfUninitialized:function(){if(!this.API_KEY||0===this.API_KEY.length)throw new d("Context has not been properly initialized. Please call the .initialize() method to setup your app context object.")}},g="/v1/pos/printer/site/list";var b,O,E=i(669),w=i.n(E);!function(t){t.Get="GET",t.Post="POST",t.Put="PUT",t.Patch="PATCH",t.Delete="DELETE",t.Head="HEAD",t.Options="OPTIONS",t.Connect="CONNECT"}(b||(b={})),function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.RequestEntityTooLarge=413]="RequestEntityTooLarge",t[t.RequestUriTooLong=414]="RequestUriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RequestedRangeNotSatisfiable=416]="RequestedRangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported"}(O||(O={}));class x{constructor(t,e,i){this.RETRY_WAIT_TIME=1e3,this.domain=t,this.axios=w().create({headers:{"G-ClientID":e,Authorization:`Bearer ${i}`}})}get(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Get},t))}))}post(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Post},t))}))}put(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Put},t))}))}delete(t){return a(this,void 0,void 0,(function*(){return this.request(Object.assign({method:b.Delete},t))}))}request(t){return a(this,void 0,void 0,(function*(){const e=t.tries?t.tries:1;if(e<=0)throw new h(`Number of tries must be >= 0, got ${e}`);const i={url:`${this.domain}${this.getRequestPath(t.path)}`,params:t.query,method:t.method.toString(),data:t.data};function r(t){return a(this,void 0,void 0,(function*(){return new Promise((e=>setTimeout(e,t)))}))}let n=0;for(;n<e;)try{return yield this.doRequest(i)}catch(t){if(n++,t instanceof f){if(n<e){let e=this.RETRY_WAIT_TIME;t instanceof y&&t.response.retryAfter&&(e=1e3*t.response.retryAfter),yield r(e);continue}if(e>1)throw new l(`Exceeded maximum retry count of ${e}. Last message: ${t.message}`)}throw t}throw new u("Unexpected flow, reached maximum HTTP tries but did not throw an error")}))}getRequestPath(t){return`/${t.replace(/^\//,"")}`}doRequest(t){return a(this,void 0,void 0,(function*(){try{const e=yield this.axios(t);if(e.status)return e.data;{const t=[];e.data.errors&&t.push(JSON.stringify(e.data.errors,null,2));const i=t.length?`:\n${t.join("\n")}`:"",r=e.headers,n=e.status,o=e.statusText;switch(!0){case e.status===O.TooManyRequests:{const t=e.headers["Retry-After"];throw new y({message:`GAP is throttling requests${i}`,code:n,statusText:o,body:e.data,headers:r,retryAfter:t?parseFloat(t):void 0})}case e.status>=O.InternalServerError:throw new v({message:`GAP internal error${i}`,code:n,statusText:o,body:e.data,headers:r});default:throw new p({message:`Received an error response (${e.status} ${e.statusText}) from GAP ${i}`,code:n,statusText:o,body:e.data,headers:r})}}}catch(t){throw t instanceof u?t:new h(`Failed to make GAP HTTP request: ${t}`)}}))}}class S{static setClient(t,e,i){if(!t||!e||!i)return console.error(new Error("Missing params init http_client"));this.client=new x(t,e,i)}}class R extends S{static postCreateAppointment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/appointment/appointment/form/create",data:t})}))}static getCategoryListAppointment(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/gocheckin/service/site/list-by-category",query:t})}))}static getStaffListAppointment(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/gocheckin/staff/site/list",query:t})}))}}class C extends S{static getBatchHistory(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/history/site/batch-history",query:t})}))}static getBatchDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/history/site/batch-detail",query:t})}))}}class A extends S{static getBusinessInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/business/site/get-info",query:t})}))}static postBusinessUpdateInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/business/form/update",data:t})}))}}class T extends S{static sendSms(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/call/form/send-sms",data:t})}))}}class k extends S{static getCategoryListItem(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/category/site/list-item",query:t})}))}}class P extends S{static postCheckInFormSubmit(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkin/form/submit",data:t})}))}static getCheckInList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/list",query:t})}))}static getCheckInReport(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/report",query:t})}))}static getLastCheckIn(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/check-update",query:t})}))}static getCheckInInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/info",query:t})}))}}class D extends S{static getItemList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/item/site/list",query:t})}))}static getCheckOutHistoryList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/history/list",query:t})}))}static getCheckOutInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/site/info",query:t})}))}static getCheckOutHistoryInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/history/info",query:t})}))}static getCheckOutBatchCloseSummary(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/site/get-batch-close-summary",query:t})}))}static postCheckOutAddItem(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/add",data:t})}))}static postCheckOutRemoveItem(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/remove",data:t})}))}static postCheckOutSubmitOrder(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/payment/submit",data:t})}))}static postCheckOutUpdateStatus(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-status",data:t})}))}static postCheckOutUpdateOrderWithCreditCardPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-order-with-credit-card-payment",data:t})}))}static postCheckOutDoAuth(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/do-auth",data:t})}))}static postCheckOutVoidPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/void-payment",data:t})}))}static postCheckOutRefundPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/refund-payment",data:t})}))}static postCheckOutAdjustTipPayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/adjust-tip",data:t})}))}static postCheckOutCloseOut(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/closeout",data:t})}))}static postCheckOutUpdateIsWaiting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-is-wait",data:t})}))}static postCheckOutDiscountPromotion(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/discount/promotion",data:t})}))}static postCheckOutDiscountRedeem(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/discount/redeem",data:t})}))}static postCheckOutUpdateTipData(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/tip/update",data:t})}))}static postCheckOutItemAdjustPrice(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/adjust-price",data:t})}))}static postCheckOutUpdatePaymentData(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-payment-data",data:t})}))}static postCheckOutItemAddCombo(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/add-combo",data:t})}))}static getCheckoutResendRating(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/form/send-mercure",query:t})}))}static postCustomerAchAvailable(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ach/form/check-customer",data:t})}))}static postAchResend(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ach/form/resend-transaction",data:t})}))}static postAchVoid(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ach/form/cancel-transaction",data:t})}))}static postUpdateOrderSuccessToSettled(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-success-to-settled",data:t})}))}static postCalculateTax(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/calculate-tax",data:t})}))}static postCalculatePayment(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/calculate-payment",data:t})}))}}class _ extends S{static getComboSiteInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/combo/site/info",query:t})}))}}class q extends S{static getCustomerList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/customer/site/list",query:t})}))}static getCustomerDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/customer/site/detail",query:t})}))}}class I extends S{static getCheckGiftCard(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/giftcard/site/check-gift-card",query:t})}))}static postResetGiftCard(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/item/reset-gift-card",data:t})}))}}class $ extends S{static getIncomeHistory(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/history/site/income-history",query:t})}))}static getStaffDailyIncome(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/staff/site/list-income-v1",query:t})}))}}class N extends S{static getKeyStorage(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/user/site/get-key-storage",query:t})}))}}var j=i(823),L=i.n(j);const U=()=>({AU:"DD-MM-YYYY",US:"MM-DD-YYYY",DEFAULT:"DD-MM-YYYY"}[localStorage.getItem("country_code")||"DEFAULT"]);var M=i(484),B=i.n(M);class F extends S{static getCheckingList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/dash-board-list",query:t})}))}static getOrderDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/site/info",query:t})}))}static getOrderHistoryList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkout/history/info",query:t})}))}static getReportChecking(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/checkin/site/dash-board-report",query:t})}))}static updateOrderStaff(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/form/update-staff",data:t})}))}static removeOrder(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/checkout/order/remove-order",data:t})}))}static exportOrder(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"/v1/pos/checkin/site/export",query:t});let i=U();L()(e,`export-orders-${B()().format(i)}.xls`)}))}}class H extends S{static getPayrollList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"v1/pos/payroll/site/list-payroll",query:t})}))}static getPayrollSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/setting/site/payroll-setting",query:t})}))}static approvePayroll(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/payroll/form/approve-payroll",data:t})}))}static updatePayrollSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/setting/form/update-payroll",data:t})}))}static getDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/setting/site/discount-setting",query:t})}))}static updateDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/setting/form/update-discount",data:t})}))}static getCashDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/cashdiscount/setting/get",query:t})}))}static updateCashDiscountSetting(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/cashdiscount/setting/change",data:t})}))}static getIncomeDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/staff/income-detail",query:t})}))}static getApprovePayroll(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/approve-period",query:t})}))}static exportPayroll(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"v1/pos/payroll/site/export-payroll",query:t}),i=U();L()(e.data,`${B()().format(i)}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}))}static exportApprovePayroll(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"/v1/pos/payroll/site/export-approve-payroll",query:t}),i=U();L()(e.data,`${B()().format(i)}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}))}static exportIncomeDetail(t){return a(this,void 0,void 0,(function*(){const e=yield this.client.get({path:"/v1/pos/payroll/staff/export-income-detail",query:t}),i=U();L()(e.data,`${B()().format(i)}.xlsx`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")}))}static getSalaryChart(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/salary-chart",query:t})}))}static getAppListPayroll(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/app-list-payroll",query:t})}))}static getPayrollDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/payroll/site/get-payroll-detail",query:t})}))}}class Y extends S{static getPrinterList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:g,query:t})}))}static getPrinterDetail(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:g,query:t})}))}static createPrinterInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:g,data:t})}))}static updatePrinterInfo(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:g,query:t})}))}}class G extends S{static getServiceList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/service/site/list",query:t})}))}}class W extends S{static getTurnValue(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/setting/site/get-turn-value",query:t})}))}static postTurnUpdateValue(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/setting/form/update-turn-value",data:t})}))}}class K extends S{static getStaffList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/staff/site/list",query:t})}))}static getStaffListByCheckout(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/staff/site/list-by-checkout",query:t})}))}}class V extends S{static getTicketList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/ticket/site/info",query:t})}))}static createTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/form/create",data:t})}))}static deleteTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/ticket/form/delete",query:t})}))}static updateTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/form/update",query:t,data:t})}))}static moveSubject(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/form/subject-move",data:t})}))}static setDefaultTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/ticket/site/set-default-ticket-template",data:t})}))}static getTicketTemplate(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/ticket/site/template",query:t})}))}}class z extends S{static getTimeKeepingList(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/timekeeping/site/list",query:t})}))}static addTimeKeeping(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/create",data:t})}))}static updateTimeKeeping(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/edit-time",data:t})}))}static removeTimeKeeping(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/delete-time",data:t})}))}static getTimeKeepingListStaff(t){return a(this,void 0,void 0,(function*(){return yield this.client.get({path:"/v1/pos/timekeeping/site/list-staff",query:t})}))}static postTimeKeepingCheckIn(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/add-checkin-time",data:t})}))}static postTimeKeepingCheckOut(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/timekeeping/form/add-checkout-time",data:t})}))}}class J extends S{}class X extends S{static postLogin(t){return a(this,void 0,void 0,(function*(){return yield this.client.post({path:"/v1/pos/user/form/login",data:t})}))}}const Q={Context:m,PosClientApi:class{constructor(t,e,i){this.appointment=R,this.batch_history=C,this.business=A,this.call=T,this.category=k,this.check_in=P,this.check_out=D,this.combo=_,this.customer=q,this.gift_card=I,this.income=$,this.key_storage=N,this.order=F,this.payroll=H,this.printer=Y,this.service=G,this.setting_turn=W,this.staff=K,this.ticket=V,this.time_keeping=z,this.unsubscribe_contact=J,this.user=X,S.setClient(t,e,i)}},Errors:s};window.Gap=Q;const Z=Q})(),r})()));
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import * as gciEndpoints from "../endpoint";
|
|
3
|
+
import Base from "../../../base/Base";
|
|
4
|
+
export default class Customer extends Base {
|
|
5
|
+
static getBusinessInfo() {
|
|
6
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7
|
+
return yield this.client.get({ path: gciEndpoints.GET_BUSINESS_INFO });
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
static getDomainInfo(id, type) {
|
|
11
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12
|
+
return yield this.client.get({
|
|
13
|
+
path: gciEndpoints.GET_DOMAIN_INFO,
|
|
14
|
+
query: {
|
|
15
|
+
id: id,
|
|
16
|
+
type: type
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
static getSmsRemain() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
return yield this.client.get({ path: gciEndpoints.GET_SMS_REMAIN });
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
static getSmsCallTemplate() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return yield this.client.get({ path: gciEndpoints.GET_SMS_CALL_TEMPLATE });
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
static getStaffWorkHour(id) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
return yield this.client.get({
|
|
34
|
+
path: gciEndpoints.GET_STAFF_WORK_HOUR,
|
|
35
|
+
query: {
|
|
36
|
+
id: id
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
static getStaffList(params) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return yield this.client.get({
|
|
44
|
+
path: gciEndpoints.GET_STAFF_LIST,
|
|
45
|
+
query: {
|
|
46
|
+
page: params.page,
|
|
47
|
+
'per-page': params.perPage
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
static getStaffListPermission() {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
return yield this.client.get({ path: gciEndpoints.GET_PERMISSION_LIST });
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
static getServiceListByCategory() {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return yield this.client.get({ path: gciEndpoints.GET_SERVICE_BY_CATE });
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
static getNotificationListAppointment(params) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
return yield this.client.get({
|
|
65
|
+
path: gciEndpoints.GET_APPOINTMENT_NOTIFICATION_LIST,
|
|
66
|
+
query: {
|
|
67
|
+
page: params.page,
|
|
68
|
+
'per-page': params.perPage
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
static getNotificationList(params) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
return yield this.client.get({
|
|
76
|
+
path: gciEndpoints.GET_NOTIFICATION_LIST,
|
|
77
|
+
query: {
|
|
78
|
+
page: params.page,
|
|
79
|
+
'per-page': params.perPage
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
static getCheckoutConfig() {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
return yield this.client.get({ path: gciEndpoints.GET_CONFIG });
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
static getBusinessWorkHour() {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
return yield this.client.get({ path: gciEndpoints.GET_BUSINESS_WORK_HOUR });
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
static getCommissionListByStaff(staffId) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
return yield this.client.get({
|
|
97
|
+
path: gciEndpoints.GET_COMMISSION_LIST_BY_STAFF,
|
|
98
|
+
query: {
|
|
99
|
+
staffId: staffId
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
static getEmployeeServiceListServiceByStaff(params) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
return yield this.client.get({
|
|
107
|
+
path: gciEndpoints.GET_LIST_SERVICE_BY_STAFF,
|
|
108
|
+
query: {
|
|
109
|
+
page: params.page,
|
|
110
|
+
'per-page': params.perPage
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//GCI Client Endpoints
|
|
2
|
+
export const GET_BUSINESS_INFO = "/v1/gocheckin/business/site/info";
|
|
3
|
+
export const GET_DOMAIN_INFO = "/site/get-info";
|
|
4
|
+
export const GET_SMS_REMAIN = "/v1/gocheckin/sms/site/sms-remain";
|
|
5
|
+
export const GET_SMS_CALL_TEMPLATE = "/v1/pos/call/site/get-sms-call-template";
|
|
6
|
+
export const GET_STAFF_WORK_HOUR = "/v1/gocheckin/staff/work-hour/info";
|
|
7
|
+
export const GET_STAFF_LIST = "/v1/gocheckin/staff/site/list";
|
|
8
|
+
export const GET_PERMISSION_LIST = "/v1/gocheckin/staff/site/list-permission";
|
|
9
|
+
export const GET_SERVICE_BY_CATE = "/v1/gocheckin/service/site/list-by-category";
|
|
10
|
+
export const GET_APPOINTMENT_NOTIFICATION_LIST = "/v1/gocheckin/notification/site/list-appointment";
|
|
11
|
+
export const GET_NOTIFICATION_LIST = "/v1/gocheckin/notification/site/list";
|
|
12
|
+
export const GET_CONFIG = "/v1/settings/checkout/get-config";
|
|
13
|
+
export const GET_BUSINESS_WORK_HOUR = "/v1/gocheckin/settings/business-work-hour/get";
|
|
14
|
+
export const GET_COMMISSION_LIST_BY_STAFF = "/v1/pos/commission/site/list-by-staff";
|
|
15
|
+
export const GET_LIST_SERVICE_BY_STAFF = "/v1/gocheckin/staff/employee-service/list-service-by-staff";
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http_client.d.ts","sourceRoot":"","sources":["../../src/http_client/http_client.ts"],"names":[],"mappings":"AACA,OAAc,EAAC,kBAAkB,EAA+B,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"http_client.d.ts","sourceRoot":"","sources":["../../src/http_client/http_client.ts"],"names":[],"mappings":"AACA,OAAc,EAAC,kBAAkB,EAA+B,MAAM,OAAO,CAAC;AAC9E,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EAGhB,MAAM,SAAS,CAAC;AAEjB,qBAAa,UAAU;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAQ;gBAErB,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAUtD,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvD,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIzD,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAIvD,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,CAAC;IAI7D,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;IAkD9D,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI9B,SAAS,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;CAuDhF"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import * as GapErrors from "../error";
|
|
3
|
+
import axios from "axios";
|
|
4
|
+
import { Method, StatusCode } from './types';
|
|
5
|
+
export class HttpClient {
|
|
6
|
+
constructor(domain, gClientId, token) {
|
|
7
|
+
this.RETRY_WAIT_TIME = 1000;
|
|
8
|
+
this.domain = domain;
|
|
9
|
+
this.axios = axios.create({
|
|
10
|
+
headers: {
|
|
11
|
+
'G-ClientID': gClientId,
|
|
12
|
+
'Authorization': `Bearer ${token}`,
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
get(params) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return this.request(Object.assign({ method: Method.Get }, params));
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
post(params) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
return this.request(Object.assign({ method: Method.Post }, params));
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
put(params) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return this.request(Object.assign({ method: Method.Put }, params));
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
delete(params) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
return this.request(Object.assign({ method: Method.Delete }, params));
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
request(params) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const maxTries = params.tries ? params.tries : 1;
|
|
39
|
+
if (maxTries <= 0) {
|
|
40
|
+
throw new GapErrors.HttpRequestError(`Number of tries must be >= 0, got ${maxTries}`);
|
|
41
|
+
}
|
|
42
|
+
let url = `${this.domain}${this.getRequestPath(params.path)}`;
|
|
43
|
+
const options = {
|
|
44
|
+
url,
|
|
45
|
+
params: params.query,
|
|
46
|
+
method: params.method.toString(),
|
|
47
|
+
data: params.data,
|
|
48
|
+
};
|
|
49
|
+
function sleep(waitTime) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
return new Promise((resolve) => setTimeout(resolve, waitTime));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
let tries = 0;
|
|
55
|
+
while (tries < maxTries) {
|
|
56
|
+
try {
|
|
57
|
+
return yield this.doRequest(options);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
tries++;
|
|
61
|
+
if (error instanceof GapErrors.HttpRetryableError) {
|
|
62
|
+
if (tries < maxTries) {
|
|
63
|
+
let waitTime = this.RETRY_WAIT_TIME;
|
|
64
|
+
if (error instanceof GapErrors.HttpThrottlingError &&
|
|
65
|
+
error.response.retryAfter) {
|
|
66
|
+
waitTime = error.response.retryAfter * 1000;
|
|
67
|
+
}
|
|
68
|
+
yield sleep(waitTime);
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
if (maxTries > 1) {
|
|
72
|
+
throw new GapErrors.HttpMaxRetriesError(`Exceeded maximum retry count of ${maxTries}. Last message: ${error.message}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
throw error;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
throw new GapErrors.GapError(`Unexpected flow, reached maximum HTTP tries but did not throw an error`);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
getRequestPath(path) {
|
|
82
|
+
return `/${path.replace(/^\//, '')}`;
|
|
83
|
+
}
|
|
84
|
+
doRequest(options) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
try {
|
|
87
|
+
const response = yield this.axios(options);
|
|
88
|
+
if (response.status) {
|
|
89
|
+
return response.data;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
const errorMessages = [];
|
|
93
|
+
if (response.data.errors) {
|
|
94
|
+
errorMessages.push(JSON.stringify(response.data.errors, null, 2));
|
|
95
|
+
}
|
|
96
|
+
const errorMessage = errorMessages.length ? `:\n${errorMessages.join('\n')}` : '';
|
|
97
|
+
const headers = response.headers;
|
|
98
|
+
const code = response.status;
|
|
99
|
+
const statusText = response.statusText;
|
|
100
|
+
switch (true) {
|
|
101
|
+
case response.status === StatusCode.TooManyRequests: {
|
|
102
|
+
const retryAfter = response.headers['Retry-After'];
|
|
103
|
+
throw new GapErrors.HttpThrottlingError({
|
|
104
|
+
message: `GAP is throttling requests${errorMessage}`,
|
|
105
|
+
code,
|
|
106
|
+
statusText,
|
|
107
|
+
body: response.data,
|
|
108
|
+
headers,
|
|
109
|
+
retryAfter: retryAfter ? parseFloat(retryAfter) : undefined,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
case response.status >= StatusCode.InternalServerError:
|
|
113
|
+
throw new GapErrors.HttpInternalError({
|
|
114
|
+
message: `GAP internal error${errorMessage}`,
|
|
115
|
+
code,
|
|
116
|
+
statusText,
|
|
117
|
+
body: response.data,
|
|
118
|
+
headers,
|
|
119
|
+
});
|
|
120
|
+
default:
|
|
121
|
+
throw new GapErrors.HttpResponseError({
|
|
122
|
+
message: `Received an error response (${response.status} ${response.statusText}) from GAP ${errorMessage}`,
|
|
123
|
+
code,
|
|
124
|
+
statusText,
|
|
125
|
+
body: response.data,
|
|
126
|
+
headers,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
if (error instanceof GapErrors.GapError) {
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
throw new GapErrors.HttpRequestError(`Failed to make GAP HTTP request: ${error}`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -1,13 +1,57 @@
|
|
|
1
|
-
export var
|
|
2
|
-
(function (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
export var Method;
|
|
2
|
+
(function (Method) {
|
|
3
|
+
Method["Get"] = "GET";
|
|
4
|
+
Method["Post"] = "POST";
|
|
5
|
+
Method["Put"] = "PUT";
|
|
6
|
+
Method["Patch"] = "PATCH";
|
|
7
|
+
Method["Delete"] = "DELETE";
|
|
8
|
+
Method["Head"] = "HEAD";
|
|
9
|
+
Method["Options"] = "OPTIONS";
|
|
10
|
+
Method["Connect"] = "CONNECT";
|
|
11
|
+
})(Method || (Method = {}));
|
|
12
|
+
export var StatusCode;
|
|
13
|
+
(function (StatusCode) {
|
|
14
|
+
StatusCode[StatusCode["Continue"] = 100] = "Continue";
|
|
15
|
+
StatusCode[StatusCode["SwitchingProtocols"] = 101] = "SwitchingProtocols";
|
|
16
|
+
StatusCode[StatusCode["Ok"] = 200] = "Ok";
|
|
17
|
+
StatusCode[StatusCode["Created"] = 201] = "Created";
|
|
18
|
+
StatusCode[StatusCode["Accepted"] = 202] = "Accepted";
|
|
19
|
+
StatusCode[StatusCode["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
|
|
20
|
+
StatusCode[StatusCode["NoContent"] = 204] = "NoContent";
|
|
21
|
+
StatusCode[StatusCode["ResetContent"] = 205] = "ResetContent";
|
|
22
|
+
StatusCode[StatusCode["PartialContent"] = 206] = "PartialContent";
|
|
23
|
+
StatusCode[StatusCode["MultipleChoices"] = 300] = "MultipleChoices";
|
|
24
|
+
StatusCode[StatusCode["MovedPermanently"] = 301] = "MovedPermanently";
|
|
25
|
+
StatusCode[StatusCode["Found"] = 302] = "Found";
|
|
26
|
+
StatusCode[StatusCode["SeeOther"] = 303] = "SeeOther";
|
|
27
|
+
StatusCode[StatusCode["NotModified"] = 304] = "NotModified";
|
|
28
|
+
StatusCode[StatusCode["UseProxy"] = 305] = "UseProxy";
|
|
29
|
+
StatusCode[StatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect";
|
|
30
|
+
StatusCode[StatusCode["BadRequest"] = 400] = "BadRequest";
|
|
31
|
+
StatusCode[StatusCode["Unauthorized"] = 401] = "Unauthorized";
|
|
32
|
+
StatusCode[StatusCode["PaymentRequired"] = 402] = "PaymentRequired";
|
|
33
|
+
StatusCode[StatusCode["Forbidden"] = 403] = "Forbidden";
|
|
34
|
+
StatusCode[StatusCode["NotFound"] = 404] = "NotFound";
|
|
35
|
+
StatusCode[StatusCode["MethodNotAllowed"] = 405] = "MethodNotAllowed";
|
|
36
|
+
StatusCode[StatusCode["NotAcceptable"] = 406] = "NotAcceptable";
|
|
37
|
+
StatusCode[StatusCode["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
|
|
38
|
+
StatusCode[StatusCode["RequestTimeout"] = 408] = "RequestTimeout";
|
|
39
|
+
StatusCode[StatusCode["Conflict"] = 409] = "Conflict";
|
|
40
|
+
StatusCode[StatusCode["Gone"] = 410] = "Gone";
|
|
41
|
+
StatusCode[StatusCode["LengthRequired"] = 411] = "LengthRequired";
|
|
42
|
+
StatusCode[StatusCode["PreconditionFailed"] = 412] = "PreconditionFailed";
|
|
43
|
+
StatusCode[StatusCode["RequestEntityTooLarge"] = 413] = "RequestEntityTooLarge";
|
|
44
|
+
StatusCode[StatusCode["RequestUriTooLong"] = 414] = "RequestUriTooLong";
|
|
45
|
+
StatusCode[StatusCode["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
|
|
46
|
+
StatusCode[StatusCode["RequestedRangeNotSatisfiable"] = 416] = "RequestedRangeNotSatisfiable";
|
|
47
|
+
StatusCode[StatusCode["ExpectationFailed"] = 417] = "ExpectationFailed";
|
|
48
|
+
StatusCode[StatusCode["ImATeapot"] = 418] = "ImATeapot";
|
|
49
|
+
StatusCode[StatusCode["UnprocessableEntity"] = 422] = "UnprocessableEntity";
|
|
50
|
+
StatusCode[StatusCode["TooManyRequests"] = 429] = "TooManyRequests";
|
|
51
|
+
StatusCode[StatusCode["InternalServerError"] = 500] = "InternalServerError";
|
|
52
|
+
StatusCode[StatusCode["NotImplemented"] = 501] = "NotImplemented";
|
|
53
|
+
StatusCode[StatusCode["BadGateway"] = 502] = "BadGateway";
|
|
54
|
+
StatusCode[StatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable";
|
|
55
|
+
StatusCode[StatusCode["GatewayTimeout"] = 504] = "GatewayTimeout";
|
|
56
|
+
StatusCode[StatusCode["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported";
|
|
57
|
+
})(StatusCode || (StatusCode = {}));
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { Context } from './context';
|
|
2
2
|
import * as GapError from './error';
|
|
3
|
-
|
|
3
|
+
import { PosClientApi } from "./pos_client_api/v1/PosClientApi";
|
|
4
4
|
export const Gap = {
|
|
5
5
|
Context,
|
|
6
|
-
|
|
7
|
-
// BookingClientApi,
|
|
8
|
-
// PosClientApi,
|
|
6
|
+
PosClientApi,
|
|
9
7
|
Errors: GapError,
|
|
10
|
-
// MiniApp: GapMiniAppSdk
|
|
11
8
|
};
|
|
12
9
|
window.Gap = Gap;
|
|
13
10
|
export default Gap;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export var STATUS;
|
|
2
|
+
(function (STATUS) {
|
|
3
|
+
STATUS[STATUS["PENDING"] = 11] = "PENDING";
|
|
4
|
+
STATUS[STATUS["PROCESSING"] = 12] = "PROCESSING";
|
|
5
|
+
STATUS[STATUS["PAYMENT_SUCCESS"] = 13] = "PAYMENT_SUCCESS";
|
|
6
|
+
STATUS[STATUS["VOIDED"] = 14] = "VOIDED";
|
|
7
|
+
STATUS[STATUS["TRANSACTION_SETTLED"] = 15] = "TRANSACTION_SETTLED";
|
|
8
|
+
STATUS[STATUS["REFUNDED"] = 16] = "REFUNDED";
|
|
9
|
+
STATUS[STATUS["AWAITING_PAYMENT"] = 17] = "AWAITING_PAYMENT";
|
|
10
|
+
STATUS[STATUS["CANCELLED"] = 19] = "CANCELLED";
|
|
11
|
+
STATUS[STATUS["SETTLEMENT_FAIL"] = 20] = "SETTLEMENT_FAIL";
|
|
12
|
+
})(STATUS || (STATUS = {}));
|