meemup-library 1.0.48 → 1.0.50
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.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AxiosError, AxiosInstance, AxiosResponse } from "axios";
|
|
2
2
|
import IAccount from "../interfaces/IAccount";
|
|
3
3
|
import IAnswer from "../interfaces/IAnswer";
|
|
4
|
+
import IDriverAccount from "../interfaces/IDriverAccount";
|
|
4
5
|
export default class ApiController {
|
|
5
|
-
account: IAccount;
|
|
6
|
-
constructor(account: IAccount);
|
|
6
|
+
account: IAccount | IDriverAccount;
|
|
7
|
+
constructor(account: IAccount | IDriverAccount);
|
|
8
|
+
private getCompanyId;
|
|
7
9
|
defaultHeader(authorization?: boolean): Promise<{
|
|
8
10
|
Authorization?: string | undefined;
|
|
9
11
|
companyId: string;
|
|
@@ -10,11 +10,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import axios from "axios";
|
|
11
11
|
export default class ApiController {
|
|
12
12
|
constructor(account) {
|
|
13
|
+
this.getCompanyId = () => {
|
|
14
|
+
const account = Object.assign({}, this.account);
|
|
15
|
+
if (account.companyId)
|
|
16
|
+
return account.companyId + "";
|
|
17
|
+
return account.company.id + "";
|
|
18
|
+
};
|
|
13
19
|
this.account = account;
|
|
14
20
|
}
|
|
15
21
|
defaultHeader(authorization = true) {
|
|
16
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
return Object.assign({ companyId: this.
|
|
23
|
+
return Object.assign({ companyId: this.getCompanyId() }, authorization ? { Authorization: "Bearer " + this.account.token } : {});
|
|
18
24
|
});
|
|
19
25
|
}
|
|
20
26
|
createInstance(header = {}, authorization = true, timeout = 15000) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface IDriverAccount {
|
|
2
|
+
token: string;
|
|
3
|
+
fullName: string;
|
|
4
|
+
userName: string;
|
|
5
|
+
id: number;
|
|
6
|
+
date: Date;
|
|
7
|
+
company: {
|
|
8
|
+
id: number;
|
|
9
|
+
title: string;
|
|
10
|
+
currency: string;
|
|
11
|
+
currencySymbol: string;
|
|
12
|
+
locationReference: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export default IDriverAccount;
|
|
16
|
+
export declare const initDriverAccount: IDriverAccount;
|
|
@@ -6,11 +6,11 @@ export const initKitchenScreenSetting = {
|
|
|
6
6
|
sortAccordingPizzaMode: true,
|
|
7
7
|
sortOrders: EnumKitchenScreenSortOrders.FIRST_REGISTRATION,
|
|
8
8
|
timer: false,
|
|
9
|
-
timerFontSize:
|
|
10
|
-
timerWarningSecond:
|
|
11
|
-
timerWarningColor: "#
|
|
12
|
-
timerExpireSecond:
|
|
13
|
-
timerExpireColor: "#
|
|
9
|
+
timerFontSize: 36,
|
|
10
|
+
timerWarningSecond: 180,
|
|
11
|
+
timerWarningColor: "#FF7043",
|
|
12
|
+
timerExpireSecond: 30,
|
|
13
|
+
timerExpireColor: "#D50000",
|
|
14
14
|
extraFontSize: 16,
|
|
15
|
-
productFontSize:
|
|
15
|
+
productFontSize: 24,
|
|
16
16
|
};
|