@figuredev/business-config-sdk
Advanced tools
Comparing version 0.15.12 to 0.15.13
@@ -13,2 +13,3 @@ import { AccountDTO } from "./account"; | ||
import { SettingDTO } from "./settings"; | ||
import { TableManagementDTO } from "./tableManagement"; | ||
import { TerminalDTO, TerminalPreviewDTO } from "./terminal"; | ||
@@ -60,2 +61,5 @@ import { UserContext } from "./utils"; | ||
}; | ||
export declare type GetTableManagementQueryParams = { | ||
locationId?: string; | ||
}; | ||
export declare type GetPromotionsQueryParams = { | ||
@@ -94,2 +98,3 @@ locationIds?: string[]; | ||
getSchematizedLayouts(ctx: UserContext, params?: GetSchematizedQueryParams): Promise<SchematizedLayoutsDTO>; | ||
getTableManagement(ctx: UserContext, params?: GetTableManagementQueryParams): Promise<TableManagementDTO>; | ||
getPromotions(ctx: UserContext, params?: GetPromotionsQueryParams): Promise<PromotionDTO[]>; | ||
@@ -96,0 +101,0 @@ getPromotionById(ctx: UserContext, id: string): Promise<PromotionDTO>; |
157
lib/index.js
@@ -13,3 +13,3 @@ "use strict"; | ||
exports.BusinessConfigClient = void 0; | ||
const axios_1 = require("axios"); | ||
const http_1 = require("./http"); | ||
class BusinessConfigClient { | ||
@@ -24,4 +24,3 @@ constructor(config) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -31,4 +30,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -38,4 +36,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -45,4 +42,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -52,4 +48,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -62,4 +57,3 @@ method: "GET", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -69,4 +63,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -76,4 +69,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -83,4 +75,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -93,4 +84,3 @@ method: "GET", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -100,4 +90,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -107,4 +96,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -114,4 +102,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -125,4 +112,3 @@ method: "GET", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -132,4 +118,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -139,4 +124,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -146,4 +130,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -159,4 +142,3 @@ method: "GET", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -166,4 +148,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -173,4 +154,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -180,4 +160,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -187,4 +166,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -194,4 +172,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -204,4 +181,3 @@ method: "GET", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -211,4 +187,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -218,4 +193,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -225,4 +199,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -237,4 +210,3 @@ method: "GET", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -244,4 +216,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -256,4 +227,3 @@ method: "GET", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -264,4 +234,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -272,4 +241,3 @@ method: "GET", | ||
params: params, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -279,4 +247,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -287,10 +254,19 @@ method: "GET", | ||
params: params, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
} | ||
getTableManagement(ctx, params) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: "/table-management", | ||
headers: this.prepareHeaders(ctx), | ||
params: params, | ||
}).then((r) => r.data); | ||
}); | ||
} | ||
getPromotions(ctx, params) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -301,4 +277,3 @@ method: "GET", | ||
params: params, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -308,4 +283,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -315,4 +289,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -322,4 +295,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -329,4 +301,3 @@ method: "GET", | ||
headers: this.prepareHeaders(ctx), | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -339,4 +310,3 @@ } | ||
} | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -349,4 +319,3 @@ method: "POST", | ||
}, | ||
}) | ||
.then((r) => r.data.items); | ||
}).then((r) => r.data.items); | ||
}); | ||
@@ -356,4 +325,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -366,4 +334,3 @@ method: "POST", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -373,4 +340,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -384,4 +350,3 @@ method: "GET", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -391,4 +356,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield axios_1.default | ||
.request({ | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
@@ -402,4 +366,3 @@ method: "GET", | ||
}, | ||
}) | ||
.then((r) => r.data); | ||
}).then((r) => r.data); | ||
}); | ||
@@ -406,0 +369,0 @@ } |
{ | ||
"name": "@figuredev/business-config-sdk", | ||
"version": "0.15.12", | ||
"version": "0.15.13", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58782
57
1222
1