meemup-library 1.3.98 → 1.4.0
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.
|
@@ -8,10 +8,12 @@ export default class ApiController {
|
|
|
8
8
|
Authorization?: string | undefined;
|
|
9
9
|
companyId: string;
|
|
10
10
|
"client-agent": string;
|
|
11
|
+
deviceIdentifier: string;
|
|
11
12
|
}>;
|
|
12
13
|
fetchRequest(url: string, method: string, body?: any, headers?: object, authorization?: boolean, timeout?: number): Promise<IAnswer>;
|
|
13
14
|
fetchSuccess(response: any): IAnswer;
|
|
14
15
|
fetchError(error: any, message?: string): IAnswer;
|
|
16
|
+
patchWithAuth: (url: string, body?: any, headers?: any) => Promise<IAnswer>;
|
|
15
17
|
postWithAuth: (url: string, body?: any, headers?: any) => Promise<IAnswer>;
|
|
16
18
|
putWithAuth: (url: string, body: any, headers?: any) => Promise<IAnswer>;
|
|
17
19
|
getWithAuth: (url: string, headers?: any) => Promise<IAnswer>;
|
|
@@ -123,6 +123,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
123
123
|
export default class ApiController {
|
|
124
124
|
constructor(account) {
|
|
125
125
|
this.account = account;
|
|
126
|
+
this.patchWithAuth = (url_1, ...args_1) => __awaiter(this, [url_1, ...args_1], void 0, function* (url, body = {}, headers = {}) { return this.fetchRequest(url, "PATCH", body, headers, true); });
|
|
126
127
|
this.postWithAuth = (url_1, ...args_1) => __awaiter(this, [url_1, ...args_1], void 0, function* (url, body = {}, headers = {}) { return this.fetchRequest(url, "POST", body, headers, true); });
|
|
127
128
|
this.putWithAuth = (url_1, body_1, ...args_1) => __awaiter(this, [url_1, body_1, ...args_1], void 0, function* (url, body, headers = {}) { return this.fetchRequest(url, "PUT", body, headers, true); });
|
|
128
129
|
this.getWithAuth = (url_1, ...args_1) => __awaiter(this, [url_1, ...args_1], void 0, function* (url, headers = {}) { return this.fetchRequest(url, "GET", null, headers, true); });
|
|
@@ -137,7 +138,7 @@ export default class ApiController {
|
|
|
137
138
|
}
|
|
138
139
|
defaultHeader() {
|
|
139
140
|
return __awaiter(this, arguments, void 0, function* (authorization = true) {
|
|
140
|
-
return Object.assign({ companyId: this.getCompanyId(), "client-agent": this.account.clientAgent }, (authorization ? { Authorization: "Bearer " + this.account.token } : {}));
|
|
141
|
+
return Object.assign({ companyId: this.getCompanyId(), "client-agent": this.account.clientAgent, deviceIdentifier: this.account.deviceIdentifier }, (authorization ? { Authorization: "Bearer " + this.account.token } : {}));
|
|
141
142
|
});
|
|
142
143
|
}
|
|
143
144
|
fetchRequest(url_1, method_1) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { initAccount } from "../IAccount";
|
|
2
|
-
export const initKitchenDisplayAccount = Object.assign(Object.assign({}, initAccount), { deviceIdentifier: "", clientAgent: "
|
|
2
|
+
export const initKitchenDisplayAccount = Object.assign(Object.assign({}, initAccount), { deviceIdentifier: "", clientAgent: "KDS-App" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"remove:one": "rimraf dist",
|
|
12
12
|
"remove:two": "rimraf ./src/dist",
|
|
13
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"commit": "git add . && git commit -m \"version.1.
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.4.0 \" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|