import { BaseSalesScanCodeResult, SalesContactInfoRuntime, SalesSdkAddProductWithFlowResult, SalesSdkCartBookingView, SalesSdkCartContextValue, SalesSdkCartDisplayLine, SalesSdkCartItemView, SalesSdkContextValue, SalesSdkEditCartLineResult, SalesSdkScanWalletAssetResult, SalesSdkWalletAssetId as SalesSdkWalletAssetId$1, ScanOrderOrderProduct, ScanOrderOrderProductIdentity } from "../../../../plus/salesSdk/types.js"; import { PromotionCodeSearchResult } from "../../../../plus/saleDetail/components/PromotionWalletPanels/promotionCodeSearch.js"; import { SaleVoucherView } from "../../../../plus/saleDetail/components/PromotionWalletPanels/adapters.js"; import { AddVoucherProductsParams } from "../../../../plus/saleDetail/components/PromotionWalletPanels/voucherProductAdd.js"; import { SaleVoucherHolderPort } from "../../../../plus/saleDetail/components/PromotionWalletPanels/actions.js"; import { OperationReference, ResolutionAcceptance } from "../../../HDLKiosk/kernel/application/types.js"; import { ApplicationDefinition } from "../../../HDLKiosk/kernel/application/runtime.js"; import { SalesCommand } from "../../runtime/operations/command.js"; import { KioskScanContext, KioskScanInput } from "../../sales/inputs/scan.js"; import { CheckoutPreparationMode, CheckoutPreparationPorts, CheckoutReceiptLookup } from "../../runtime/operations/checkoutCommands.js"; import { DecreaseContext, ProductSelection, SelectionContext } from "../../runtime/operations/catalog.js"; import { PaymentAttemptPorts, PaymentOptions, PaymentOptionsContext, PaymentSyncPort } from "../../runtime/operations/paymentCommands.js"; //#region src/components/kiosk/app/base/manifest.d.ts declare const baseKioskManifest: ApplicationDefinition<"sale", Readonly<{ id: "catalog"; commands: { removeLine: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; }, Promise>; setLineQuantity: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; quantity: number; }, Promise>; setVoucher: SalesCommand<{ setDiscount: (params: { discountId: number; isSelected: boolean; }) => Promise; holder: SaleVoucherHolderPort; missingHolderForm(): void; }, { voucher: SaleVoucherView; selected: boolean; }, Promise>; applyPromotionCode: SalesCommand<{ customerId?: number | undefined; scanWalletAsset?: ((code: string) => Promise) | undefined; scanPromotionCode: (code: string, customerId?: number | undefined) => Promise; onWalletSearchError?: ((error: unknown) => void) | undefined; }, { code: string; }, Promise>; addVoucherProducts: SalesCommand, { voucher: SaleVoucherView; products: Record[]; }, Promise<{ addedCount: number; }>>; setWalletAsset: SalesCommand Promise; clear: (this: unknown) => Promise; refresh: (this: unknown) => Promise; }, "select">, { assetId: SalesSdkWalletAssetId$1; selected: boolean; }, Promise>; bestVoucherSelection: SalesCommand, void, Promise<{ productList?: Record[] | undefined; discountList?: any[] | undefined; }>>; clearVoucherSelection: SalesCommand, void, Promise>; scan: SalesCommand> & { readonly kind: "kiosk.scan"; }; selectProduct: SalesCommand>; decreaseProduct: SalesCommand>; reloadCatalog: SalesCommand<{ reload(): void; }, void, void>; refreshInventory: SalesCommand<{ refresh(): Promise; }, void, Promise>; }; resolutions: { complete: ResolutionAcceptance; omit: ResolutionAcceptance; }; }> | Readonly<{ id: "cart"; commands: { setVoucher: SalesCommand<{ setDiscount: (params: { discountId: number; isSelected: boolean; }) => Promise; holder: SaleVoucherHolderPort; missingHolderForm(): void; }, { voucher: SaleVoucherView; selected: boolean; }, Promise>; applyPromotionCode: SalesCommand<{ customerId?: number | undefined; scanWalletAsset?: ((code: string) => Promise) | undefined; scanPromotionCode: (code: string, customerId?: number | undefined) => Promise; onWalletSearchError?: ((error: unknown) => void) | undefined; }, { code: string; }, Promise>; addVoucherProducts: SalesCommand, { voucher: SaleVoucherView; products: Record[]; }, Promise<{ addedCount: number; }>>; setWalletAsset: SalesCommand Promise; clear: (this: unknown) => Promise; refresh: (this: unknown) => Promise; }, "select">, { assetId: SalesSdkWalletAssetId$1; selected: boolean; }, Promise>; bestVoucherSelection: SalesCommand, void, Promise<{ productList?: Record[] | undefined; discountList?: any[] | undefined; }>>; clearVoucherSelection: SalesCommand, void, Promise>; scan: SalesCommand> & { readonly kind: "kiosk.scan"; }; removeLine: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; }, Promise>; setLineQuantity: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; quantity: number; }, Promise>; editLine: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; }, Promise>; setLineNote: SalesCommand, { identity: ScanOrderOrderProductIdentity; note: string; }, Promise>; setOrderNote: SalesCommand, { note: string; }, string>; assignBookingHolder: SalesCommand<{ assignHolderToBookingLine: (target: SalesSdkCartDisplayLine) => Promise; }, { line: SalesSdkCartDisplayLine; }, Promise>; selectGift: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; }, Promise>; editContact: SalesCommand, void, Promise>; }; resolutions: { complete: ResolutionAcceptance; }; }> | Readonly<{ id: "checkout"; commands: { prepare: SalesCommand>; checkSubmittedReceipt: SalesCommand>; }; resolutions: { complete: ResolutionAcceptance; omit: ResolutionAcceptance; }; }> | Readonly<{ id: "payment"; commands: { loadOptions: SalesCommand>; pay: SalesCommand>; confirmZero: SalesCommand>; retrySync: SalesCommand>; }; resolutions: { complete: ResolutionAcceptance; }; }> | Readonly<{ id: "result"; resolutions: {}; }>, OperationReference, Readonly<{ readonly id: "base.sale"; readonly exitPolicy: "sale.exit"; readonly steps: readonly [{ readonly slice: Readonly<{ id: "catalog"; commands: { removeLine: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; }, Promise>; setLineQuantity: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; quantity: number; }, Promise>; setVoucher: SalesCommand<{ setDiscount: (params: { discountId: number; isSelected: boolean; }) => Promise; holder: SaleVoucherHolderPort; missingHolderForm(): void; }, { voucher: SaleVoucherView; selected: boolean; }, Promise>; applyPromotionCode: SalesCommand<{ customerId?: number | undefined; scanWalletAsset?: ((code: string) => Promise) | undefined; scanPromotionCode: (code: string, customerId?: number | undefined) => Promise; onWalletSearchError?: ((error: unknown) => void) | undefined; }, { code: string; }, Promise>; addVoucherProducts: SalesCommand, { voucher: SaleVoucherView; products: Record[]; }, Promise<{ addedCount: number; }>>; setWalletAsset: SalesCommand Promise; clear: (this: unknown) => Promise; refresh: (this: unknown) => Promise; }, "select">, { assetId: SalesSdkWalletAssetId$1; selected: boolean; }, Promise>; bestVoucherSelection: SalesCommand, void, Promise<{ productList?: Record[] | undefined; discountList?: any[] | undefined; }>>; clearVoucherSelection: SalesCommand, void, Promise>; scan: SalesCommand> & { readonly kind: "kiosk.scan"; }; selectProduct: SalesCommand>; decreaseProduct: SalesCommand>; reloadCatalog: SalesCommand<{ reload(): void; }, void, void>; refreshInventory: SalesCommand<{ refresh(): Promise; }, void, Promise>; }; resolutions: { complete: ResolutionAcceptance; omit: ResolutionAcceptance; }; }>; readonly resolutionRouting: { readonly omit: "reenter"; }; readonly on: { readonly complete: "cart"; readonly omit: "checkout"; }; }, Readonly<{ id: "cart"; commands: { setVoucher: SalesCommand<{ setDiscount: (params: { discountId: number; isSelected: boolean; }) => Promise; holder: SaleVoucherHolderPort; missingHolderForm(): void; }, { voucher: SaleVoucherView; selected: boolean; }, Promise>; applyPromotionCode: SalesCommand<{ customerId?: number | undefined; scanWalletAsset?: ((code: string) => Promise) | undefined; scanPromotionCode: (code: string, customerId?: number | undefined) => Promise; onWalletSearchError?: ((error: unknown) => void) | undefined; }, { code: string; }, Promise>; addVoucherProducts: SalesCommand, { voucher: SaleVoucherView; products: Record[]; }, Promise<{ addedCount: number; }>>; setWalletAsset: SalesCommand Promise; clear: (this: unknown) => Promise; refresh: (this: unknown) => Promise; }, "select">, { assetId: SalesSdkWalletAssetId$1; selected: boolean; }, Promise>; bestVoucherSelection: SalesCommand, void, Promise<{ productList?: Record[] | undefined; discountList?: any[] | undefined; }>>; clearVoucherSelection: SalesCommand, void, Promise>; scan: SalesCommand> & { readonly kind: "kiosk.scan"; }; removeLine: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; }, Promise>; setLineQuantity: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; quantity: number; }, Promise>; editLine: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; }, Promise>; setLineNote: SalesCommand, { identity: ScanOrderOrderProductIdentity; note: string; }, Promise>; setOrderNote: SalesCommand, { note: string; }, string>; assignBookingHolder: SalesCommand<{ assignHolderToBookingLine: (target: SalesSdkCartDisplayLine) => Promise; }, { line: SalesSdkCartDisplayLine; }, Promise>; selectGift: SalesCommand, { line: SalesSdkCartItemView | SalesSdkCartBookingView; }, Promise>; editContact: SalesCommand, void, Promise>; }; resolutions: { complete: ResolutionAcceptance; }; }>, { readonly slice: Readonly<{ id: "checkout"; commands: { prepare: SalesCommand>; checkSubmittedReceipt: SalesCommand>; }; resolutions: { complete: ResolutionAcceptance; omit: ResolutionAcceptance; }; }>; readonly on: { readonly complete: "payment"; readonly omit: "result"; }; }, Readonly<{ id: "payment"; commands: { loadOptions: SalesCommand>; pay: SalesCommand>; confirmZero: SalesCommand>; retrySync: SalesCommand>; }; resolutions: { complete: ResolutionAcceptance; }; }>, { readonly slice: Readonly<{ id: "result"; resolutions: {}; }>; readonly isTerminal: true; }]; }>>; //#endregion export { baseKioskManifest };