@ancon/wildcat-utils 1.50.10 → 1.50.11
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.
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { AttendeeWithItems, CheckoutItem, NonEmptyArray, OrderFormat } from '@ancon/wildcat-types';
|
|
2
|
+
declare type Checkout = {
|
|
3
|
+
orderFormat: OrderFormat;
|
|
4
|
+
/** Checkout summary includes items */
|
|
5
|
+
items?: CheckoutItem[];
|
|
6
|
+
attendees?: NonEmptyArray<AttendeeWithItems>;
|
|
7
|
+
};
|
|
8
|
+
export default function isGiftCardCheckout<T extends Checkout>(checkout: T | null | undefined): boolean;
|
|
9
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const c=require("@ancon/wildcat-types"),u=require("./isGiftCardCheckoutItem.js");function m(e){var r;if(e){const{orderFormat:s,items:o,attendees:t}=e,i=o??((r=t==null?void 0:t[0])==null?void 0:r.items)??[];return s===c.OrderFormat.System&&i.some(u)}return!1}module.exports=m;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { OrderFormat as
|
|
2
|
-
import
|
|
3
|
-
function
|
|
4
|
-
var
|
|
5
|
-
|
|
1
|
+
import { OrderFormat as s } from "@ancon/wildcat-types";
|
|
2
|
+
import f from "./isGiftCardCheckoutItem.mjs";
|
|
3
|
+
function c(r) {
|
|
4
|
+
var o;
|
|
5
|
+
if (r) {
|
|
6
|
+
const { orderFormat: e, items: m, attendees: t } = r, i = m ?? ((o = t == null ? void 0 : t[0]) == null ? void 0 : o.items) ?? [];
|
|
7
|
+
return (
|
|
8
|
+
// Must be system order format
|
|
9
|
+
e === s.System && // Must have gift card item
|
|
10
|
+
i.some(f)
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
return !1;
|
|
6
14
|
}
|
|
7
15
|
export {
|
|
8
|
-
|
|
16
|
+
c as default
|
|
9
17
|
};
|