@figuredev/business-config-sdk
Advanced tools
Comparing version 0.15.47 to 0.15.48
@@ -47,2 +47,3 @@ import { Maybe, TimeSpan } from "./utils"; | ||
pluCode?: string; | ||
tare?: Maybe<number>; | ||
cardProgramId?: string; | ||
@@ -49,0 +50,0 @@ }; |
@@ -1,120 +0,122 @@ | ||
import { AccountDTO } from "./account" | ||
import { AssignmentDTO } from "./assignments" | ||
import { | ||
CategoryDTO, | ||
CategoryReportDTO, | ||
MatchCategoriesRequestItem, | ||
MatchCategoriesResponseItem, | ||
ModifierGroupDTO, | ||
} from "./category" | ||
import { DeliverySettingDTO } from "./delivery" | ||
import { EmployeeDTO } from "./employee" | ||
import { OrderEmailIntegrationConfigDTO } from "./integrations" | ||
import { LocationDTO, LocationPreviewDTO } from "./location" | ||
import { PaymentSettingDTO } from "./payment" | ||
import { PricingDTO } from "./pricing" | ||
import { PhysicalPrinterDTO, PrinterDTO, PrinterType } from "./printers" | ||
import { PromotionDTO } from "./promotion" | ||
import { SchematizedLayoutDTO, SchematizedLayoutsDTO } from "./schematized" | ||
import { SettingDTO } from "./settings" | ||
import { TableManagementDTO } from "./tableManagement" | ||
import { TerminalDTO, TerminalPreviewDTO } from "./terminal" | ||
import { UserContext } from "./utils" | ||
import { AccountDTO } from "./account"; | ||
import { AssignmentDTO } from "./assignments"; | ||
import { CategoryDTO, CategoryReportDTO, MatchCategoriesRequestItem, MatchCategoriesResponseItem, ModifierGroupDTO } from "./category"; | ||
import { DeliverySettingDTO } from "./delivery"; | ||
import { EmailSettingDTO } from "./email"; | ||
import { EmployeeDTO } from "./employee"; | ||
import { OrderEmailIntegrationConfigDTO } from "./integrations"; | ||
import { LocationDTO, LocationPreviewDTO } from "./location"; | ||
import { OnlineOrderingThemeDTO } from "./onlineOrdering"; | ||
import { MenuDTO } from "./menu"; | ||
import { PaymentSettingDTO } from "./payment"; | ||
import { PricingDTO } from "./pricing"; | ||
import { PhysicalPrinterDTO, PrinterDTO, PrinterType } from "./printers"; | ||
import { PromotionDTO } from "./promotion"; | ||
import { SchematizedLayoutDTO, SchematizedLayoutsDTO } from "./schematized"; | ||
import { SettingDTO } from "./settings"; | ||
import { TableManagementDTO } from "./tableManagement"; | ||
import { TerminalDTO, TerminalPreviewDTO } from "./terminal"; | ||
import { UserContext } from "./utils"; | ||
declare type BusinessConfigClientConfig = { | ||
baseUrl: string | ||
secret: string | ||
} | ||
baseUrl: string; | ||
secret: string; | ||
}; | ||
export declare type GetAssignmentsQueryParams = { | ||
includeDeleted?: boolean | ||
locationIds?: string[] | ||
specialTypes?: string[] | ||
names?: string[] | ||
} | ||
includeDeleted?: boolean; | ||
locationIds?: string[]; | ||
specialTypes?: string[]; | ||
names?: string[]; | ||
}; | ||
export declare type GetEmployeesQueryParams = { | ||
includeDeleted?: boolean | ||
locationIds?: string[] | ||
} | ||
includeDeleted?: boolean; | ||
locationIds?: string[]; | ||
}; | ||
export declare type GetModifierGroupsQueryParams = { | ||
applyOverride?: boolean | ||
locationId?: string | ||
} | ||
applyOverride?: boolean; | ||
locationId?: string; | ||
}; | ||
export declare type GetCategoriesQueryParams = { | ||
applyOverride?: boolean | ||
locationId?: string | ||
} | ||
applyOverride?: boolean; | ||
locationId?: string; | ||
}; | ||
export declare type GetMenuQueryParams = { | ||
applyOverride?: boolean; | ||
locationId?: string; | ||
serviceId?: string; | ||
}; | ||
export declare type GetSettingsQueryParams = { | ||
locationId?: string | ||
terminalId?: string | ||
keys?: string[] | ||
} | ||
locationId?: string; | ||
terminalId?: string; | ||
keys?: string[]; | ||
}; | ||
export declare type GetPaymentSettingsQueryParams = { | ||
locationId?: string | ||
terminalId?: string | ||
gateway: string | ||
} | ||
locationId?: string; | ||
terminalId?: string; | ||
}; | ||
export declare type GetLocationPreviewsQueryParams = { | ||
locationIds?: string[] | ||
} | ||
locationIds?: string[]; | ||
}; | ||
export declare type GetTerminalPreviewsQueryParams = { | ||
locationIds?: string[] | ||
} | ||
locationIds?: string[]; | ||
}; | ||
export declare type GetPrintersQueryParams = { | ||
printerType?: PrinterType | ||
} | ||
printerType?: PrinterType; | ||
}; | ||
export declare type GetSchematizedQueryParams = { | ||
locationId?: string | ||
} | ||
locationId?: string; | ||
}; | ||
export declare type GetTableManagementQueryParams = { | ||
locationId?: string | ||
} | ||
locationId?: string; | ||
}; | ||
export declare type GetPromotionsQueryParams = { | ||
locationIds?: string[] | ||
} | ||
locationIds?: string[]; | ||
}; | ||
export declare type MatchCategoriesQueryParams = { | ||
items: MatchCategoriesRequestItem[] | ||
} | ||
items: MatchCategoriesRequestItem[]; | ||
}; | ||
export declare type GetDeliverySettingsQueryParams = { | ||
locationId: string | ||
terminalId?: string | ||
} | ||
locationId: string; | ||
terminalId?: string; | ||
}; | ||
export declare class BusinessConfigClient { | ||
private config | ||
constructor(config: BusinessConfigClientConfig) | ||
prepareHeaders( | ||
ctx: UserContext, | ||
): { | ||
"twbrds-terminal-id": string | ||
"twbrds-location-id": string | ||
"twbrds-account-id": string | ||
"fgr-service-token": string | ||
} | ||
getAccount(ctx: UserContext, id: string): Promise<AccountDTO | null> | ||
getLocation(ctx: UserContext, id: string): Promise<LocationDTO | null> | ||
getLocationPreviews(ctx: UserContext, params: GetLocationPreviewsQueryParams): Promise<LocationPreviewDTO[]> | ||
getTerminal(ctx: UserContext, id: string): Promise<TerminalDTO | null> | ||
getTerminalPreviews(ctx: UserContext, params: GetTerminalPreviewsQueryParams): Promise<TerminalPreviewDTO[]> | ||
getEmployee(ctx: UserContext, id: string): Promise<EmployeeDTO | null> | ||
getEmployees(ctx: UserContext, params: GetEmployeesQueryParams): Promise<EmployeeDTO[]> | ||
getAssignment(ctx: UserContext, id: string): Promise<AssignmentDTO | null> | ||
getAssignments(ctx: UserContext, params: GetAssignmentsQueryParams): Promise<AssignmentDTO[]> | ||
getPricingByPromoCode(ctx: UserContext, promoCode: string): Promise<PricingDTO | null> | ||
getPricing(ctx: UserContext, id: string): Promise<PricingDTO | null> | ||
getPrinters(ctx: UserContext, params?: GetPrintersQueryParams): Promise<PrinterDTO[]> | ||
getPhysicalPrinters(ctx: UserContext): Promise<PhysicalPrinterDTO[]> | ||
getSettings(ctx: UserContext, params: GetSettingsQueryParams): Promise<SettingDTO[]> | ||
getPaymentSettings(ctx: UserContext, params: GetPaymentSettingsQueryParams): Promise<PaymentSettingDTO> | ||
private config; | ||
constructor(config: BusinessConfigClientConfig); | ||
prepareHeaders(ctx: UserContext): { | ||
"twbrds-terminal-id": string; | ||
"twbrds-location-id": string; | ||
"twbrds-account-id": string; | ||
"fgr-service-token": string; | ||
}; | ||
getAccount(ctx: UserContext, id: string): Promise<AccountDTO | null>; | ||
getEmailSettings(ctx: UserContext): Promise<EmailSettingDTO | null>; | ||
getLocation(ctx: UserContext, id: string): Promise<LocationDTO | null>; | ||
getLocationPreviews(ctx: UserContext, params: GetLocationPreviewsQueryParams): Promise<LocationPreviewDTO[]>; | ||
getOnlineOrderingTheme(ctx: UserContext): Promise<OnlineOrderingThemeDTO | null>; | ||
getTerminal(ctx: UserContext, id: string): Promise<TerminalDTO | null>; | ||
getTerminalPreviews(ctx: UserContext, params: GetTerminalPreviewsQueryParams): Promise<TerminalPreviewDTO[]>; | ||
getEmployee(ctx: UserContext, id: string): Promise<EmployeeDTO | null>; | ||
getEmployees(ctx: UserContext, params: GetEmployeesQueryParams): Promise<EmployeeDTO[]>; | ||
getAssignment(ctx: UserContext, id: string): Promise<AssignmentDTO | null>; | ||
getAssignments(ctx: UserContext, params: GetAssignmentsQueryParams): Promise<AssignmentDTO[]>; | ||
getPricingByPromoCode(ctx: UserContext, promoCode: string): Promise<PricingDTO | null>; | ||
getPricing(ctx: UserContext, id: string): Promise<PricingDTO | null>; | ||
getPrinters(ctx: UserContext, params?: GetPrintersQueryParams): Promise<PrinterDTO[]>; | ||
getPhysicalPrinters(ctx: UserContext): Promise<PhysicalPrinterDTO[]>; | ||
getSettings(ctx: UserContext, params: GetSettingsQueryParams): Promise<SettingDTO[]>; | ||
getPaymentSettings(ctx: UserContext, params: GetPaymentSettingsQueryParams): Promise<PaymentSettingDTO>; | ||
/** @deprecated in favor of getSchematizedLayouts **/ | ||
getSchematized(ctx: UserContext, params?: GetSchematizedQueryParams): Promise<SchematizedLayoutDTO> | ||
getSchematizedLayouts(ctx: UserContext, params?: GetSchematizedQueryParams): Promise<SchematizedLayoutsDTO> | ||
getTableManagement(ctx: UserContext, params?: GetTableManagementQueryParams): Promise<TableManagementDTO> | ||
getPromotions(ctx: UserContext, params?: GetPromotionsQueryParams): Promise<PromotionDTO[]> | ||
getPromotionById(ctx: UserContext, id: string): Promise<PromotionDTO> | ||
getPromotionByPromoCode(ctx: UserContext, code: string): Promise<PromotionDTO> | ||
matchProducts(ctx: UserContext, params: MatchCategoriesQueryParams): Promise<MatchCategoriesResponseItem[]> | ||
getOrderEmailIntegrationConfig(emailAddress: string): Promise<OrderEmailIntegrationConfigDTO | null> | ||
getModifierGroups(ctx: UserContext, params: GetModifierGroupsQueryParams): Promise<ModifierGroupDTO[]> | ||
getCategories(ctx: UserContext, params: GetCategoriesQueryParams): Promise<CategoryDTO[]> | ||
getCategoriesForReports(ctx: UserContext): Promise<CategoryReportDTO[]> | ||
getDeliverySettings(ctx: UserContext, params: GetDeliverySettingsQueryParams): Promise<DeliverySettingDTO> | ||
getSchematized(ctx: UserContext, params?: GetSchematizedQueryParams): Promise<SchematizedLayoutDTO>; | ||
getSchematizedLayouts(ctx: UserContext, params?: GetSchematizedQueryParams): Promise<SchematizedLayoutsDTO>; | ||
getTableManagement(ctx: UserContext, params?: GetTableManagementQueryParams): Promise<TableManagementDTO>; | ||
getPromotions(ctx: UserContext, params?: GetPromotionsQueryParams): Promise<PromotionDTO[]>; | ||
getPromotionById(ctx: UserContext, id: string): Promise<PromotionDTO>; | ||
getPromotionByPromoCode(ctx: UserContext, code: string): Promise<PromotionDTO>; | ||
matchProducts(ctx: UserContext, params: MatchCategoriesQueryParams): Promise<MatchCategoriesResponseItem[]>; | ||
getOrderEmailIntegrationConfig(emailAddress: string): Promise<OrderEmailIntegrationConfigDTO | null>; | ||
getModifierGroups(ctx: UserContext, params: GetModifierGroupsQueryParams): Promise<ModifierGroupDTO[]>; | ||
getCategories(ctx: UserContext, params: GetCategoriesQueryParams): Promise<CategoryDTO[]>; | ||
getCategoriesForReports(ctx: UserContext): Promise<CategoryReportDTO[]>; | ||
getDeliverySettings(ctx: UserContext, params: GetDeliverySettingsQueryParams): Promise<DeliverySettingDTO>; | ||
getMenu(ctx: UserContext, params: GetMenuQueryParams): Promise<MenuDTO>; | ||
} | ||
export {} | ||
export {}; |
@@ -31,2 +31,12 @@ "use strict"; | ||
} | ||
getEmailSettings(ctx) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: `/email/setting`, | ||
headers: this.prepareHeaders(ctx), | ||
}).then((r) => r.data); | ||
}); | ||
} | ||
getLocation(ctx, id) { | ||
@@ -55,2 +65,12 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
getOnlineOrderingTheme(ctx) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: `/online-ordering/theme`, | ||
headers: this.prepareHeaders(ctx), | ||
}).then((r) => r.data); | ||
}); | ||
} | ||
getTerminal(ctx, id) { | ||
@@ -197,3 +217,2 @@ return __awaiter(this, void 0, void 0, function* () { | ||
locationId: params.locationId, | ||
gateway: params.gateway, | ||
}, | ||
@@ -350,4 +369,19 @@ }).then((r) => r.data); | ||
} | ||
getMenu(ctx, params) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: "/menu", | ||
headers: this.prepareHeaders(ctx), | ||
params: { | ||
applyOverride: params.applyOverride, | ||
locationId: params.locationId, | ||
serviceId: params.serviceId, | ||
}, | ||
}).then((r) => r.data); | ||
}); | ||
} | ||
} | ||
exports.BusinessConfigClient = BusinessConfigClient; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,2 @@ | ||
import { Maybe } from "fgr-lib-backend/lib/types"; | ||
export declare type PaymentSettingDTO = { | ||
@@ -7,6 +8,11 @@ bolt?: PaymentSettingBoltDTO; | ||
tsys?: PaymentSettingTSysDTO; | ||
config?: PaymentSettingsConfigDTO; | ||
}; | ||
export declare type PaymentSettingsConfigDTO = { | ||
selectedGateways: PaymentGatewayDTO[]; | ||
}; | ||
export declare type PaymentSettingBoltDTO = { | ||
credentials: PaymentCredentialsBoltDTO; | ||
options?: PaymentOptionsBoltDTO; | ||
paymentCardTokenScope?: Maybe<string>; | ||
}; | ||
@@ -16,11 +22,15 @@ export declare type PaymentSettingCardPointeDTO = { | ||
options?: PaymentOptionsCardPointeDTO; | ||
paymentCardTokenScope?: Maybe<string>; | ||
}; | ||
export declare type PaymentSettingConvergeDTO = { | ||
credentials: PaymentCredentialsConvergeDTO; | ||
paymentCardTokenScope?: Maybe<string>; | ||
}; | ||
export declare type PaymentSettingDejavooDTO = { | ||
credentials: PaymentCredentialsDejavooDTO; | ||
paymentCardTokenScope?: Maybe<string>; | ||
}; | ||
export declare type PaymentSettingTSysDTO = { | ||
credentials: PaymentCredentialsTSysDTO; | ||
paymentCardTokenScope?: Maybe<string>; | ||
}; | ||
@@ -60,3 +70,11 @@ export declare enum PaymentOptionsCardPointeDeviceDTO { | ||
deviceId?: string; | ||
deviceIdTsep?: string; | ||
}; | ||
export declare enum PaymentGatewayDTO { | ||
CardPointe = "cardpointe", | ||
Bolt = "bolt", | ||
Converge = "converge", | ||
USAePay = "usaepay", | ||
Dejavoo = "dejavoo", | ||
TSYS = "tsys", | ||
PayU = "payu" | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PaymentOptionsCardPointeDeviceDTO = void 0; | ||
exports.PaymentGatewayDTO = exports.PaymentOptionsCardPointeDeviceDTO = void 0; | ||
var PaymentOptionsCardPointeDeviceDTO; | ||
@@ -9,2 +9,12 @@ (function (PaymentOptionsCardPointeDeviceDTO) { | ||
})(PaymentOptionsCardPointeDeviceDTO = exports.PaymentOptionsCardPointeDeviceDTO || (exports.PaymentOptionsCardPointeDeviceDTO = {})); | ||
var PaymentGatewayDTO; | ||
(function (PaymentGatewayDTO) { | ||
PaymentGatewayDTO["CardPointe"] = "cardpointe"; | ||
PaymentGatewayDTO["Bolt"] = "bolt"; | ||
PaymentGatewayDTO["Converge"] = "converge"; | ||
PaymentGatewayDTO["USAePay"] = "usaepay"; | ||
PaymentGatewayDTO["Dejavoo"] = "dejavoo"; | ||
PaymentGatewayDTO["TSYS"] = "tsys"; | ||
PaymentGatewayDTO["PayU"] = "payu"; | ||
})(PaymentGatewayDTO = exports.PaymentGatewayDTO || (exports.PaymentGatewayDTO = {})); | ||
//# sourceMappingURL=payment.js.map |
{ | ||
"name": "@figuredev/business-config-sdk", | ||
"version": "0.15.47", | ||
"version": "0.15.48", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
71400
68
1568