@final-commerce/common 2.3.0 → 2.4.0-preprod.2
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.
- package/dist/index.d.mts +201 -2
- package/dist/index.d.ts +201 -2
- package/dist/index.js +474 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +454 -9
- package/dist/index.mjs.map +1 -1
- package/dist/pos-types/index.d.mts +147 -18
- package/dist/pos-types/index.d.ts +147 -18
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -389,7 +389,8 @@ declare enum StripeCurrencyCode {
|
|
|
389
389
|
|
|
390
390
|
declare enum ProductType {
|
|
391
391
|
SIMPLE = "simple",
|
|
392
|
-
VARIABLE = "variable"
|
|
392
|
+
VARIABLE = "variable",
|
|
393
|
+
BOOKING = "booking"
|
|
393
394
|
}
|
|
394
395
|
declare enum ProductStatus {
|
|
395
396
|
ACTIVE = "active",
|
|
@@ -403,6 +404,43 @@ declare enum PaymentProcessor {
|
|
|
403
404
|
EXTERNAL = "external"
|
|
404
405
|
}
|
|
405
406
|
|
|
407
|
+
declare enum BookingType {
|
|
408
|
+
RENTAL = "rental",
|
|
409
|
+
APPOINTMENT = "appointment",
|
|
410
|
+
OVERNIGHT = "overnight",
|
|
411
|
+
GROUP = "group"
|
|
412
|
+
}
|
|
413
|
+
declare enum BookingRatePeriod {
|
|
414
|
+
SLOT = "slot",
|
|
415
|
+
DAY = "day",
|
|
416
|
+
NIGHT = "night",
|
|
417
|
+
WEEK = "week",
|
|
418
|
+
MONTH = "month"
|
|
419
|
+
}
|
|
420
|
+
declare enum BookingResourceKind {
|
|
421
|
+
ASSET = "asset",
|
|
422
|
+
ROOM = "room",
|
|
423
|
+
PROPERTY = "property",
|
|
424
|
+
SPACE = "space",
|
|
425
|
+
STAFF = "staff",
|
|
426
|
+
TABLE = "table"
|
|
427
|
+
}
|
|
428
|
+
declare enum ReservationStatus {
|
|
429
|
+
HELD = "held",
|
|
430
|
+
CONFIRMED = "confirmed",
|
|
431
|
+
CANCELLED = "cancelled",
|
|
432
|
+
EXPIRED = "expired"
|
|
433
|
+
}
|
|
434
|
+
declare enum BookingResourceStatus {
|
|
435
|
+
ACTIVE = "active",
|
|
436
|
+
INACTIVE = "inactive"
|
|
437
|
+
}
|
|
438
|
+
declare enum ResourceAvailabilityState {
|
|
439
|
+
AVAILABLE = "available",
|
|
440
|
+
FULLY_BOOKED = "fullyBooked",
|
|
441
|
+
NO_HOURS_IN_RANGE = "noHoursInRange"
|
|
442
|
+
}
|
|
443
|
+
|
|
406
444
|
interface CurrencyConfig {
|
|
407
445
|
minorUnits: number;
|
|
408
446
|
symbol: string;
|
|
@@ -783,6 +821,13 @@ interface OrderLineItem {
|
|
|
783
821
|
returnedQuantity?: number;
|
|
784
822
|
[key: string]: unknown;
|
|
785
823
|
}
|
|
824
|
+
interface OrderReservationForContext {
|
|
825
|
+
internalId?: string;
|
|
826
|
+
quantity?: number;
|
|
827
|
+
fulfilledQuantity?: number;
|
|
828
|
+
returnedQuantity?: number;
|
|
829
|
+
[key: string]: unknown;
|
|
830
|
+
}
|
|
786
831
|
interface SplitPaymentPayment {
|
|
787
832
|
amount?: number;
|
|
788
833
|
[key: string]: unknown;
|
|
@@ -798,6 +843,7 @@ interface OrderContext {
|
|
|
798
843
|
paymentMethods: OrderPaymentMethod[];
|
|
799
844
|
refunds: OrderRefund[];
|
|
800
845
|
lineItems: OrderLineItem[];
|
|
846
|
+
reservations: OrderReservationForContext[];
|
|
801
847
|
};
|
|
802
848
|
computed: {
|
|
803
849
|
balance: number;
|
|
@@ -911,6 +957,7 @@ interface OrderLikeForContext {
|
|
|
911
957
|
refunds?: OrderRefund[];
|
|
912
958
|
refund?: OrderRefund[];
|
|
913
959
|
lineItems?: OrderLineItem[];
|
|
960
|
+
reservations?: OrderReservationForContext[];
|
|
914
961
|
}
|
|
915
962
|
interface OrderLikeForLegacyInference extends OrderLikeForContext {
|
|
916
963
|
status?: string;
|
|
@@ -1200,6 +1247,158 @@ interface ConfigUpdatedPayload {
|
|
|
1200
1247
|
}
|
|
1201
1248
|
type OrderStateEventPayload = StateTransitionCompletedPayload | StateTransitionBlockedPayload | ConfigUpdatedPayload;
|
|
1202
1249
|
|
|
1250
|
+
interface WeeklyHours {
|
|
1251
|
+
weekday: number;
|
|
1252
|
+
openMinute: number;
|
|
1253
|
+
closeMinute: number;
|
|
1254
|
+
}
|
|
1255
|
+
interface BookingRulesInput {
|
|
1256
|
+
ratePeriod: BookingRatePeriod | `${BookingRatePeriod}`;
|
|
1257
|
+
slot: {
|
|
1258
|
+
lengthMinutes: number;
|
|
1259
|
+
bufferMinutes?: number;
|
|
1260
|
+
minimumToRun?: number;
|
|
1261
|
+
minStay?: number;
|
|
1262
|
+
maxStay?: number;
|
|
1263
|
+
sharedAcrossProducts?: boolean;
|
|
1264
|
+
};
|
|
1265
|
+
window: {
|
|
1266
|
+
maxAdvanceDays?: number;
|
|
1267
|
+
minNoticeMinutes?: number;
|
|
1268
|
+
holdMinutes?: number;
|
|
1269
|
+
bookableFrom?: Date | string | null;
|
|
1270
|
+
bookableTo?: Date | string | null;
|
|
1271
|
+
};
|
|
1272
|
+
availability: {
|
|
1273
|
+
weeklyHours?: WeeklyHours[];
|
|
1274
|
+
offMarket?: {
|
|
1275
|
+
from: Date | string;
|
|
1276
|
+
to: Date | string;
|
|
1277
|
+
}[];
|
|
1278
|
+
arrivalDays?: number[];
|
|
1279
|
+
availableFrom?: Date | string | null;
|
|
1280
|
+
};
|
|
1281
|
+
checkInTime?: string | null;
|
|
1282
|
+
checkOutTime?: string | null;
|
|
1283
|
+
}
|
|
1284
|
+
interface BusyWindow {
|
|
1285
|
+
startAt: Date;
|
|
1286
|
+
bufferEndAt: Date;
|
|
1287
|
+
}
|
|
1288
|
+
interface GridSlot {
|
|
1289
|
+
startAt: Date;
|
|
1290
|
+
endAt: Date;
|
|
1291
|
+
bufferEndAt: Date;
|
|
1292
|
+
canStart: boolean;
|
|
1293
|
+
}
|
|
1294
|
+
declare class BookingRulesError extends Error {
|
|
1295
|
+
constructor(message: string);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
declare function windowEndsAt(rule: BookingRulesInput, now: Date): Date | null;
|
|
1299
|
+
declare function buildGrid(rule: BookingRulesInput, timeZone: string, from: Date, to: Date, now: Date, busy?: BusyWindow[]): GridSlot[];
|
|
1300
|
+
declare function slotsForWindow(grid: GridSlot[], startAt: Date, endAt: Date): GridSlot[];
|
|
1301
|
+
|
|
1302
|
+
interface BookingOccupancy {
|
|
1303
|
+
resourceId: string;
|
|
1304
|
+
productId: string;
|
|
1305
|
+
qty: number;
|
|
1306
|
+
startAt: Date;
|
|
1307
|
+
bufferEndAt: Date;
|
|
1308
|
+
}
|
|
1309
|
+
interface BookingResourceInput {
|
|
1310
|
+
id: string;
|
|
1311
|
+
name: string;
|
|
1312
|
+
seats?: number | null;
|
|
1313
|
+
timeZone: string;
|
|
1314
|
+
presence?: WeeklyHours[] | null;
|
|
1315
|
+
}
|
|
1316
|
+
interface ResourceAvailability {
|
|
1317
|
+
resourceId: string;
|
|
1318
|
+
name: string;
|
|
1319
|
+
capacity: number;
|
|
1320
|
+
booked: number;
|
|
1321
|
+
free: number;
|
|
1322
|
+
}
|
|
1323
|
+
interface AvailabilitySlot extends GridSlot {
|
|
1324
|
+
capacity: number;
|
|
1325
|
+
booked: number;
|
|
1326
|
+
free: number;
|
|
1327
|
+
resources: ResourceAvailability[];
|
|
1328
|
+
dayKey: string;
|
|
1329
|
+
}
|
|
1330
|
+
interface ResourceInWindow {
|
|
1331
|
+
resourceId: string;
|
|
1332
|
+
name: string;
|
|
1333
|
+
slots: number;
|
|
1334
|
+
free: number;
|
|
1335
|
+
state: ResourceAvailabilityState;
|
|
1336
|
+
}
|
|
1337
|
+
interface AvailabilityInput {
|
|
1338
|
+
productId: string;
|
|
1339
|
+
bookingRulesId?: string;
|
|
1340
|
+
bookingType?: BookingType;
|
|
1341
|
+
rule: BookingRulesInput;
|
|
1342
|
+
resources: BookingResourceInput[];
|
|
1343
|
+
occupied: BookingOccupancy[];
|
|
1344
|
+
from: Date;
|
|
1345
|
+
to: Date;
|
|
1346
|
+
now: Date;
|
|
1347
|
+
}
|
|
1348
|
+
declare const withinPresence: (slot: GridSlot, timeZone: string, presence?: WeeklyHours[] | null) => boolean;
|
|
1349
|
+
declare function occupancyIn(occupied: BookingOccupancy[], productId: string, startAt: Date, bufferEndAt: Date, shared: boolean): {
|
|
1350
|
+
taken: number;
|
|
1351
|
+
foreignProductId?: string;
|
|
1352
|
+
};
|
|
1353
|
+
declare function shopDayKey(instant: Date, timeZone: string): string;
|
|
1354
|
+
declare function shopDayRange(fromDayKey: string, count: number, timeZone: string): {
|
|
1355
|
+
from: Date;
|
|
1356
|
+
to: Date;
|
|
1357
|
+
};
|
|
1358
|
+
declare function buildAvailability({ productId, bookingRulesId, bookingType, rule, resources, occupied, from, to, now, }: AvailabilityInput): {
|
|
1359
|
+
resources: ResourceInWindow[];
|
|
1360
|
+
slots: AvailabilitySlot[];
|
|
1361
|
+
timeZone: string;
|
|
1362
|
+
days: string[];
|
|
1363
|
+
productId: string;
|
|
1364
|
+
bookingRulesId: string | undefined;
|
|
1365
|
+
bookingType: BookingType | undefined;
|
|
1366
|
+
ratePeriod: "slot" | "day" | "night" | "week" | "month" | BookingRatePeriod;
|
|
1367
|
+
minimumToRun: number | undefined;
|
|
1368
|
+
minStay: number | undefined;
|
|
1369
|
+
maxStay: number | undefined;
|
|
1370
|
+
bookableUntil: Date | null;
|
|
1371
|
+
beyondWindow: boolean;
|
|
1372
|
+
};
|
|
1373
|
+
interface ResourcePresenceRow {
|
|
1374
|
+
resourceId: string;
|
|
1375
|
+
outletId: string;
|
|
1376
|
+
weeklyHours?: WeeklyHours[] | null;
|
|
1377
|
+
}
|
|
1378
|
+
declare function presentAt<T extends {
|
|
1379
|
+
id: string;
|
|
1380
|
+
}>(resources: T[], rows: ResourcePresenceRow[], outletId?: string): {
|
|
1381
|
+
resource: T;
|
|
1382
|
+
presence?: WeeklyHours[] | null;
|
|
1383
|
+
}[];
|
|
1384
|
+
|
|
1385
|
+
declare const DEFAULT_HOLD_MINUTES = 10;
|
|
1386
|
+
interface PlanWindowInput {
|
|
1387
|
+
rule: BookingRulesInput;
|
|
1388
|
+
timeZone: string;
|
|
1389
|
+
presence?: WeeklyHours[] | null;
|
|
1390
|
+
startAt: Date;
|
|
1391
|
+
endAt: Date;
|
|
1392
|
+
now: Date;
|
|
1393
|
+
busy?: BusyWindow[];
|
|
1394
|
+
}
|
|
1395
|
+
declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, busy }: PlanWindowInput): {
|
|
1396
|
+
slots: GridSlot[];
|
|
1397
|
+
endAt: Date;
|
|
1398
|
+
bufferEndAt: Date;
|
|
1399
|
+
};
|
|
1400
|
+
declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
|
|
1401
|
+
|
|
1203
1402
|
declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
|
|
1204
1403
|
declare function isAdyenRolloutCountry(alpha2: string): boolean;
|
|
1205
1404
|
|
|
@@ -1214,4 +1413,4 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
|
|
|
1214
1413
|
declare const OtherFixedRates: Record<string, CurrencyRate>;
|
|
1215
1414
|
declare const COUNTRY_CURRENCIES: Record<string, string>;
|
|
1216
1415
|
|
|
1217
|
-
export { ADYEN_ROLLOUT_COUNTRY_CODES, type Amount, AttributeType, type AvailableTransition, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, CompanyType, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, type EndOfSessionReport, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderStateEventPayload, type OrderStateWritable, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, Platform, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ResidualPaymentMethod, ResidualStatus, type ResolveTemplateResult, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, addAmounts, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isConditionOperator, isFulfillmentState, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, signReportForDisplay, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, violatesFinancialInvariant };
|
|
1416
|
+
export { ADYEN_ROLLOUT_COUNTRY_CODES, type Amount, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, CompanyType, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, type EndOfSessionReport, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isConditionOperator, isFulfillmentState, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, occupancyIn, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, planWindow, presentAt, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, violatesFinancialInvariant, windowEndsAt, withinPresence };
|
package/dist/index.d.ts
CHANGED
|
@@ -389,7 +389,8 @@ declare enum StripeCurrencyCode {
|
|
|
389
389
|
|
|
390
390
|
declare enum ProductType {
|
|
391
391
|
SIMPLE = "simple",
|
|
392
|
-
VARIABLE = "variable"
|
|
392
|
+
VARIABLE = "variable",
|
|
393
|
+
BOOKING = "booking"
|
|
393
394
|
}
|
|
394
395
|
declare enum ProductStatus {
|
|
395
396
|
ACTIVE = "active",
|
|
@@ -403,6 +404,43 @@ declare enum PaymentProcessor {
|
|
|
403
404
|
EXTERNAL = "external"
|
|
404
405
|
}
|
|
405
406
|
|
|
407
|
+
declare enum BookingType {
|
|
408
|
+
RENTAL = "rental",
|
|
409
|
+
APPOINTMENT = "appointment",
|
|
410
|
+
OVERNIGHT = "overnight",
|
|
411
|
+
GROUP = "group"
|
|
412
|
+
}
|
|
413
|
+
declare enum BookingRatePeriod {
|
|
414
|
+
SLOT = "slot",
|
|
415
|
+
DAY = "day",
|
|
416
|
+
NIGHT = "night",
|
|
417
|
+
WEEK = "week",
|
|
418
|
+
MONTH = "month"
|
|
419
|
+
}
|
|
420
|
+
declare enum BookingResourceKind {
|
|
421
|
+
ASSET = "asset",
|
|
422
|
+
ROOM = "room",
|
|
423
|
+
PROPERTY = "property",
|
|
424
|
+
SPACE = "space",
|
|
425
|
+
STAFF = "staff",
|
|
426
|
+
TABLE = "table"
|
|
427
|
+
}
|
|
428
|
+
declare enum ReservationStatus {
|
|
429
|
+
HELD = "held",
|
|
430
|
+
CONFIRMED = "confirmed",
|
|
431
|
+
CANCELLED = "cancelled",
|
|
432
|
+
EXPIRED = "expired"
|
|
433
|
+
}
|
|
434
|
+
declare enum BookingResourceStatus {
|
|
435
|
+
ACTIVE = "active",
|
|
436
|
+
INACTIVE = "inactive"
|
|
437
|
+
}
|
|
438
|
+
declare enum ResourceAvailabilityState {
|
|
439
|
+
AVAILABLE = "available",
|
|
440
|
+
FULLY_BOOKED = "fullyBooked",
|
|
441
|
+
NO_HOURS_IN_RANGE = "noHoursInRange"
|
|
442
|
+
}
|
|
443
|
+
|
|
406
444
|
interface CurrencyConfig {
|
|
407
445
|
minorUnits: number;
|
|
408
446
|
symbol: string;
|
|
@@ -783,6 +821,13 @@ interface OrderLineItem {
|
|
|
783
821
|
returnedQuantity?: number;
|
|
784
822
|
[key: string]: unknown;
|
|
785
823
|
}
|
|
824
|
+
interface OrderReservationForContext {
|
|
825
|
+
internalId?: string;
|
|
826
|
+
quantity?: number;
|
|
827
|
+
fulfilledQuantity?: number;
|
|
828
|
+
returnedQuantity?: number;
|
|
829
|
+
[key: string]: unknown;
|
|
830
|
+
}
|
|
786
831
|
interface SplitPaymentPayment {
|
|
787
832
|
amount?: number;
|
|
788
833
|
[key: string]: unknown;
|
|
@@ -798,6 +843,7 @@ interface OrderContext {
|
|
|
798
843
|
paymentMethods: OrderPaymentMethod[];
|
|
799
844
|
refunds: OrderRefund[];
|
|
800
845
|
lineItems: OrderLineItem[];
|
|
846
|
+
reservations: OrderReservationForContext[];
|
|
801
847
|
};
|
|
802
848
|
computed: {
|
|
803
849
|
balance: number;
|
|
@@ -911,6 +957,7 @@ interface OrderLikeForContext {
|
|
|
911
957
|
refunds?: OrderRefund[];
|
|
912
958
|
refund?: OrderRefund[];
|
|
913
959
|
lineItems?: OrderLineItem[];
|
|
960
|
+
reservations?: OrderReservationForContext[];
|
|
914
961
|
}
|
|
915
962
|
interface OrderLikeForLegacyInference extends OrderLikeForContext {
|
|
916
963
|
status?: string;
|
|
@@ -1200,6 +1247,158 @@ interface ConfigUpdatedPayload {
|
|
|
1200
1247
|
}
|
|
1201
1248
|
type OrderStateEventPayload = StateTransitionCompletedPayload | StateTransitionBlockedPayload | ConfigUpdatedPayload;
|
|
1202
1249
|
|
|
1250
|
+
interface WeeklyHours {
|
|
1251
|
+
weekday: number;
|
|
1252
|
+
openMinute: number;
|
|
1253
|
+
closeMinute: number;
|
|
1254
|
+
}
|
|
1255
|
+
interface BookingRulesInput {
|
|
1256
|
+
ratePeriod: BookingRatePeriod | `${BookingRatePeriod}`;
|
|
1257
|
+
slot: {
|
|
1258
|
+
lengthMinutes: number;
|
|
1259
|
+
bufferMinutes?: number;
|
|
1260
|
+
minimumToRun?: number;
|
|
1261
|
+
minStay?: number;
|
|
1262
|
+
maxStay?: number;
|
|
1263
|
+
sharedAcrossProducts?: boolean;
|
|
1264
|
+
};
|
|
1265
|
+
window: {
|
|
1266
|
+
maxAdvanceDays?: number;
|
|
1267
|
+
minNoticeMinutes?: number;
|
|
1268
|
+
holdMinutes?: number;
|
|
1269
|
+
bookableFrom?: Date | string | null;
|
|
1270
|
+
bookableTo?: Date | string | null;
|
|
1271
|
+
};
|
|
1272
|
+
availability: {
|
|
1273
|
+
weeklyHours?: WeeklyHours[];
|
|
1274
|
+
offMarket?: {
|
|
1275
|
+
from: Date | string;
|
|
1276
|
+
to: Date | string;
|
|
1277
|
+
}[];
|
|
1278
|
+
arrivalDays?: number[];
|
|
1279
|
+
availableFrom?: Date | string | null;
|
|
1280
|
+
};
|
|
1281
|
+
checkInTime?: string | null;
|
|
1282
|
+
checkOutTime?: string | null;
|
|
1283
|
+
}
|
|
1284
|
+
interface BusyWindow {
|
|
1285
|
+
startAt: Date;
|
|
1286
|
+
bufferEndAt: Date;
|
|
1287
|
+
}
|
|
1288
|
+
interface GridSlot {
|
|
1289
|
+
startAt: Date;
|
|
1290
|
+
endAt: Date;
|
|
1291
|
+
bufferEndAt: Date;
|
|
1292
|
+
canStart: boolean;
|
|
1293
|
+
}
|
|
1294
|
+
declare class BookingRulesError extends Error {
|
|
1295
|
+
constructor(message: string);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
declare function windowEndsAt(rule: BookingRulesInput, now: Date): Date | null;
|
|
1299
|
+
declare function buildGrid(rule: BookingRulesInput, timeZone: string, from: Date, to: Date, now: Date, busy?: BusyWindow[]): GridSlot[];
|
|
1300
|
+
declare function slotsForWindow(grid: GridSlot[], startAt: Date, endAt: Date): GridSlot[];
|
|
1301
|
+
|
|
1302
|
+
interface BookingOccupancy {
|
|
1303
|
+
resourceId: string;
|
|
1304
|
+
productId: string;
|
|
1305
|
+
qty: number;
|
|
1306
|
+
startAt: Date;
|
|
1307
|
+
bufferEndAt: Date;
|
|
1308
|
+
}
|
|
1309
|
+
interface BookingResourceInput {
|
|
1310
|
+
id: string;
|
|
1311
|
+
name: string;
|
|
1312
|
+
seats?: number | null;
|
|
1313
|
+
timeZone: string;
|
|
1314
|
+
presence?: WeeklyHours[] | null;
|
|
1315
|
+
}
|
|
1316
|
+
interface ResourceAvailability {
|
|
1317
|
+
resourceId: string;
|
|
1318
|
+
name: string;
|
|
1319
|
+
capacity: number;
|
|
1320
|
+
booked: number;
|
|
1321
|
+
free: number;
|
|
1322
|
+
}
|
|
1323
|
+
interface AvailabilitySlot extends GridSlot {
|
|
1324
|
+
capacity: number;
|
|
1325
|
+
booked: number;
|
|
1326
|
+
free: number;
|
|
1327
|
+
resources: ResourceAvailability[];
|
|
1328
|
+
dayKey: string;
|
|
1329
|
+
}
|
|
1330
|
+
interface ResourceInWindow {
|
|
1331
|
+
resourceId: string;
|
|
1332
|
+
name: string;
|
|
1333
|
+
slots: number;
|
|
1334
|
+
free: number;
|
|
1335
|
+
state: ResourceAvailabilityState;
|
|
1336
|
+
}
|
|
1337
|
+
interface AvailabilityInput {
|
|
1338
|
+
productId: string;
|
|
1339
|
+
bookingRulesId?: string;
|
|
1340
|
+
bookingType?: BookingType;
|
|
1341
|
+
rule: BookingRulesInput;
|
|
1342
|
+
resources: BookingResourceInput[];
|
|
1343
|
+
occupied: BookingOccupancy[];
|
|
1344
|
+
from: Date;
|
|
1345
|
+
to: Date;
|
|
1346
|
+
now: Date;
|
|
1347
|
+
}
|
|
1348
|
+
declare const withinPresence: (slot: GridSlot, timeZone: string, presence?: WeeklyHours[] | null) => boolean;
|
|
1349
|
+
declare function occupancyIn(occupied: BookingOccupancy[], productId: string, startAt: Date, bufferEndAt: Date, shared: boolean): {
|
|
1350
|
+
taken: number;
|
|
1351
|
+
foreignProductId?: string;
|
|
1352
|
+
};
|
|
1353
|
+
declare function shopDayKey(instant: Date, timeZone: string): string;
|
|
1354
|
+
declare function shopDayRange(fromDayKey: string, count: number, timeZone: string): {
|
|
1355
|
+
from: Date;
|
|
1356
|
+
to: Date;
|
|
1357
|
+
};
|
|
1358
|
+
declare function buildAvailability({ productId, bookingRulesId, bookingType, rule, resources, occupied, from, to, now, }: AvailabilityInput): {
|
|
1359
|
+
resources: ResourceInWindow[];
|
|
1360
|
+
slots: AvailabilitySlot[];
|
|
1361
|
+
timeZone: string;
|
|
1362
|
+
days: string[];
|
|
1363
|
+
productId: string;
|
|
1364
|
+
bookingRulesId: string | undefined;
|
|
1365
|
+
bookingType: BookingType | undefined;
|
|
1366
|
+
ratePeriod: "slot" | "day" | "night" | "week" | "month" | BookingRatePeriod;
|
|
1367
|
+
minimumToRun: number | undefined;
|
|
1368
|
+
minStay: number | undefined;
|
|
1369
|
+
maxStay: number | undefined;
|
|
1370
|
+
bookableUntil: Date | null;
|
|
1371
|
+
beyondWindow: boolean;
|
|
1372
|
+
};
|
|
1373
|
+
interface ResourcePresenceRow {
|
|
1374
|
+
resourceId: string;
|
|
1375
|
+
outletId: string;
|
|
1376
|
+
weeklyHours?: WeeklyHours[] | null;
|
|
1377
|
+
}
|
|
1378
|
+
declare function presentAt<T extends {
|
|
1379
|
+
id: string;
|
|
1380
|
+
}>(resources: T[], rows: ResourcePresenceRow[], outletId?: string): {
|
|
1381
|
+
resource: T;
|
|
1382
|
+
presence?: WeeklyHours[] | null;
|
|
1383
|
+
}[];
|
|
1384
|
+
|
|
1385
|
+
declare const DEFAULT_HOLD_MINUTES = 10;
|
|
1386
|
+
interface PlanWindowInput {
|
|
1387
|
+
rule: BookingRulesInput;
|
|
1388
|
+
timeZone: string;
|
|
1389
|
+
presence?: WeeklyHours[] | null;
|
|
1390
|
+
startAt: Date;
|
|
1391
|
+
endAt: Date;
|
|
1392
|
+
now: Date;
|
|
1393
|
+
busy?: BusyWindow[];
|
|
1394
|
+
}
|
|
1395
|
+
declare function planWindow({ rule, timeZone, presence, startAt, endAt, now, busy }: PlanWindowInput): {
|
|
1396
|
+
slots: GridSlot[];
|
|
1397
|
+
endAt: Date;
|
|
1398
|
+
bufferEndAt: Date;
|
|
1399
|
+
};
|
|
1400
|
+
declare const holdExpiresAt: (rule: BookingRulesInput, now: Date) => Date;
|
|
1401
|
+
|
|
1203
1402
|
declare const ADYEN_ROLLOUT_COUNTRY_CODES: Set<string>;
|
|
1204
1403
|
declare function isAdyenRolloutCountry(alpha2: string): boolean;
|
|
1205
1404
|
|
|
@@ -1214,4 +1413,4 @@ declare const EUFixedRates: Record<string, CurrencyRate>;
|
|
|
1214
1413
|
declare const OtherFixedRates: Record<string, CurrencyRate>;
|
|
1215
1414
|
declare const COUNTRY_CURRENCIES: Record<string, string>;
|
|
1216
1415
|
|
|
1217
|
-
export { ADYEN_ROLLOUT_COUNTRY_CODES, type Amount, AttributeType, type AvailableTransition, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, CompanyType, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, type EndOfSessionReport, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderStateEventPayload, type OrderStateWritable, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, Platform, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ResidualPaymentMethod, ResidualStatus, type ResolveTemplateResult, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, addAmounts, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isConditionOperator, isFulfillmentState, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, signReportForDisplay, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, violatesFinancialInvariant };
|
|
1416
|
+
export { ADYEN_ROLLOUT_COUNTRY_CODES, type Amount, AttributeType, type AvailabilityInput, type AvailabilitySlot, type AvailableTransition, type BookingOccupancy, BookingRatePeriod, type BookingResourceInput, BookingResourceKind, BookingResourceStatus, BookingRulesError, type BookingRulesInput, BookingType, type BusyWindow, CONDITION_OPERATORS, COUNTRY_CURRENCIES, CURRENCY_CONFIG, type CartDiscountBucket, type CartFeeBucket, type CashDrawer, type CashRoundingTuple, CompanyType, type Condition, type ConditionGroup, type ConditionOperator, type ConfigUpdatedPayload, type ConfigValidationError, type ConfigValidationResult, type ConfigValidationWarning, type CrossAxisRequires, type CrossAxisRule, type CrossAxisTrigger, CurrencyCode, type CurrencyConfig, type CurrencyRate, CustomTableAvailability, CustomerPlatform, DEFAULT_CONFIG, DEFAULT_CROSS_AXIS_RULES, DEFAULT_DISPLAY_STATE_MAP, DEFAULT_HOLD_MINUTES, DEFAULT_RESOLVED_CONFIG, DEFAULT_UNIT_ID, type DeleteStateConfigFragmentParams, type DeleteStateConfigFragmentResponse, type DiscountsBreakdown, type DiscountsTuple, type DisplayStateResult, type DisplayStateRule, DualWriteStrategy, EUFixedRates, EUROPE, type EndOfSessionReport, ExtensionCategory, FINANCIAL_INVARIANTS, FULFILLMENT_STATES, type FailedCondition, type FeesBreakdown, FeesCustomBillingStatus, type FeesTuple, type FinancialInvariant, type FragmentParam, type FragmentValidationResult, type FulfillmentState, type FulfillmentStateDefinition, type FulfillmentTransitionPath, type GetAvailableTransitionsParams, type GetAvailableTransitionsResponse, type GetOrderDisplayStateParams, type GetOrderDisplayStateResponse, type GetOrderStateConfigParams, type GetOrderStateConfigResponse, type GetStateConfigFragmentParams, type GetStateConfigFragmentResponse, type GridSlot, InventoryBaseActionEnum, type InventoryBaseActionType, InventorySpecificActionType, InvoiceStatus, LegacyWriteStrategy, LibraryItemType, MAX_PRECISION, type Measurable, type MeasurementBase, type MeasurementUnit, type MeasurementUnitFamily, MenuProject, type ModifiersBreakdown, type ModifiersTuple, NAFixedRates, NORTH_AMERICA, NonRevenueItemType, ORDER_STATE_ACTIONS, ORDER_STATE_EVENTS, ORDER_STATE_TOPIC, type OrderContext, type OrderLikeForContext, type OrderLikeForLegacyInference, type OrderLineItem, type OrderMutationData, type OrderPaymentMethod, OrderPlatform, type OrderRefund, type OrderReservationForContext, type OrderStateEventPayload, type OrderStateWritable, type OrderWriteStrategy, OtherFixedRates, OwnerType, PATH_MODES, PAYMENT_STATES, POS_VALID_INITIAL_STATES, type PathMode, PaymentMethod, PaymentProcessor, type PaymentState, type PaymentStateDefinition, type PaymentTransitionPath, type PlanWindowInput, Platform, PreviewImageMode, PricingLevel, PricingPlanEnum, PricingRegionEnum, type ProductDiscountBucket, type ProductFeeBucket, ProductStatus, ProductType, PublicationAvailability, type PublicationConfig, PublicationStatus, REGION_MAPPING, REPORT_NEGATE_PATHS, ReceiptSendChannel, ReceiptType, type RefundsBreakdown, ReservationStatus, ResidualPaymentMethod, ResidualStatus, type ResolveTemplateResult, type ResourceAvailability, ResourceAvailabilityState, type ResourceInWindow, type ResourcePresenceRow, STATE_SCHEMA, STRIPE_SUPPORTED_COUNTRIES, SYSTEM_FAMILIES, SYSTEM_FAMILY_IDS, SYSTEM_UNITS, SYSTEM_UNIT_IDS, type SalesSummary, type SaveStateConfigFragmentParams, type SaveStateConfigFragmentResponse, type SettlementBreakdown, type SettlementBuckets, type SettlementCardSection, type SettlementCashSection, type SettlementCustomEntry, type SplitPayment, type SplitPaymentPayment, type StaffSales, type StaffSalesEntry, type StateConfig, type StateConfigFragment, type StateDefinition, type StatePair, type StateSchema, type StateTransitionBlockedPayload, type StateTransitionCompletedPayload, StationStatus, type StoredStateConfig, StripeCurrencyCode, StripeStatus, type TaxBreakdown, type TaxBreakdownRateEntry, type TaxBreakdownSection, type TaxBreakdownSubtotal, type TaxesTuple, TimePeriod, type TipEntry, type TipsBreakdown, type TipsTuple, TopMetericsSort, type TransitionBlockedBy, type TransitionConditionSet, type TransitionOrderStateParams, type TransitionOrderStateResponse, type TransitionPath, type TransitionRequest, type TransitionResult, UserTypes, type WeeklyHours, addAmounts, amountToString, assertUnitSane, availableIn, baseFor, baseFulfillmentDefinitions, baseOf, basePaymentDefinitions, buildAvailability, buildGrid, buildOrderContext, buildPosPresetConfig, buildResolvedConfig, calculatePercentage, canTransition, conditionSummary, convertFixedFeeToLocalCurrency, createAmount, crossAxisRuleApplies, deriveDisplayState, deriveFamilyCode, deriveUnitId, displayRuleMatchesPair, divideAmount, evaluateCondition, evaluateConditionSet, extendPrice, extendPriceFor, formatCurrency, formatInUnit, formatMinorUnitsToString, formatQuantity, fromBase, fromMinorUnits, generateMongoID, getAvailableTransitions, getCashAmountDue, getCountriesByRegion, getCurrencyConfig, getCurrentISODate, getFinancialInvariantViolations, getGoodsPortion, getLineSubtotal, getMinorUnitMultiplier, getMinorUnits, getPaymentLegTotal, getPricingRegionFromCountry, getSettlementTotal, getTotalCollected, holdExpiresAt, inferStatesFromLegacyStatus, isAdyenRolloutCountry, isConditionOperator, isFulfillmentState, isPaymentState, isSupportedCurrency, isSystemFamilyCode, isValidQuantity, isWhole, mapToLegacyStatus, maxPrecisionFor, mergeFragment, multiplyAmount, normalizeMongoIdString, occupancyIn, parseAmountToMinorUnits, parseCurrencyCode, parseStripeCurrencyCode, planWindow, presentAt, removeFragment, resolveFamily, resolveTemplate, resolveUnit, roundToPrecision, sameFamily, setOrderState, shopDayKey, shopDayRange, signReportForDisplay, slotsForWindow, stringifyMinorUnits, subtractAmounts, toBase, toMinorUnits, validateConfig, validateFragmentCompatibility, violatesFinancialInvariant, windowEndsAt, withinPresence };
|