UNPKG

swipelime-client-node

Version:

swipelime-client-node is the official swipelime Node.js client library

130 lines (129 loc) 3.44 kB
"use strict"; // Copyright (c) 2024 swipelime (https://swipelime.com) // Use of this source code is governed by an MIT // license that can be found in the LICENSE file. Object.defineProperty(exports, "__esModule", { value: true }); exports.systemAlertTypes = exports.eventTypes = exports.commandTypes = exports.PaymentTypes = exports.TaskStatus = exports.TaskType = exports.SystemAlertType = exports.allPaymentTypes = exports.externalPaymentTypes = exports.localPaymentTypes = exports.allLanguages = void 0; /** * An array of all supported languages. */ exports.allLanguages = [ 'en', 'ar', 'bg', 'cs', 'da', 'de', 'el', 'es', 'et', 'fi', 'fr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'nb', 'nl', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'sv', 'tr', 'uk', 'zh' ]; /** * The local payment types. * @cash - Cash payment type. * @card - Card payment type. * There can be more local payments so this is not an exhaustive list. */ exports.localPaymentTypes = [ 'cash', 'card' ]; /** * The external payment types. */ exports.externalPaymentTypes = [ 'external' // This is used for external payment processors like Stripe etc. ]; /** * An array of all supported payment types. */ exports.allPaymentTypes = [...exports.localPaymentTypes, ...exports.externalPaymentTypes]; /** * The types of system alerts. * @longRunningTasks - There are tasks that didn't finish in a reasonable time frame so they need to be checked. */ var SystemAlertType; (function (SystemAlertType) { SystemAlertType[SystemAlertType["long-running-tasks"] = 1] = "long-running-tasks"; })(SystemAlertType || (exports.SystemAlertType = SystemAlertType = {})); /** * The types of tasks. */ var TaskType; (function (TaskType) { TaskType[TaskType["event"] = 1] = "event"; TaskType[TaskType["command"] = 2] = "command"; })(TaskType || (exports.TaskType = TaskType = {})); /** * The status of a task. */ var TaskStatus; (function (TaskStatus) { TaskStatus[TaskStatus["added"] = 1] = "added"; TaskStatus[TaskStatus["processing"] = 2] = "processing"; TaskStatus[TaskStatus["processed"] = 3] = "processed"; TaskStatus[TaskStatus["failed"] = 4] = "failed"; TaskStatus[TaskStatus["refused"] = 5] = "refused"; })(TaskStatus || (exports.TaskStatus = TaskStatus = {})); /** * The types of payment. */ var PaymentTypes; (function (PaymentTypes) { PaymentTypes[PaymentTypes["card"] = 0] = "card"; PaymentTypes[PaymentTypes["cash"] = 1] = "cash"; })(PaymentTypes || (exports.PaymentTypes = PaymentTypes = {})); /** * The available command types. */ exports.commandTypes = ['test', 'confirm-universal-menu-elements']; /** * The available event types. */ exports.eventTypes = [ 'test', 'customer-joined-table', 'order-items-added', 'order-items-confirmed', 'order-items-cancelled', 'order-items-changed', 'order-items-moved', 'payment-requested', 'payment-request-cancelled', 'order-items-payment-requested', 'order-items-payment-confirmed', 'order-items-payment-cancelled', 'universal-menu-elements-added', 'universal-menu-elements-updated', 'universal-menu-elements-removed', 'tables-added', 'tables-updated', 'tables-removed' ]; /** * The available system alert types. */ exports.systemAlertTypes = [ 'long-running-tasks' ];