import { objectType, inputObjectType, enumType } from "nexus"; const Checkout = objectType({ name: "Checkout", definition(t) { t.field("address", { type: CheckoutAddress }); t.nonNull.field("createdAt", { type: "DateTime" }); t.nonNull.id("id"); t.nonNull.list.nonNull.field("items", { type: Item }); t.nonNull.field("orderType", { type: OrderType }); t.nonNull.field("priceSummary", { type: PriceSummary }); t.nonNull.field("pricingType", { type: PricingType }); t.nonNull.string("redirectUrl"); t.nonNull.field("updatedAt", { type: "DateTime" }); }, }); const CheckoutAddress = objectType({ name: "CheckoutAddress", definition(t) { t.string("city"); t.nonNull.boolean("deliverable"); t.string("formatted"); t.field("geometry", { type: CheckoutAddressGeometry }); t.string("state"); t.string("street1"); t.string("street2"); t.nonNull.boolean("valid"); t.string("zip"); }, }); const CheckoutAddressGeometry = objectType({ name: "CheckoutAddressGeometry", definition(t) { t.list.nonNull.float("coordinates"); t.string("type"); }, }); const LatLngEntityResponse = objectType({ name: "LatLngEntityResponse", definition(t) { t.float("lat"); t.float("lng"); }, }); const Item = objectType({ name: "Item", definition(t) { t.nonNull.id("id"); t.nonNull.list.nonNull.string("errors"); t.nonNull.string("option"); t.nonNull.field("product", { type: ERPProduct }); t.nonNull.string("productId"); t.nonNull.int("quantity"); t.nonNull.boolean("valid"); t.boolean("isDiscounted"); t.float("basePrice"); t.field("discounts", { type: ItemDiscounts }); t.field("taxes", { type: ItemTaxes }); }, }); const ItemDiscounts = objectType({ name: "ItemDiscounts", definition(t) { t.int("total"); }, }); const ItemTaxes = objectType({ name: "ItemTaxes", definition(t) { t.int("total"); t.int("cannabis"); t.int("sales"); }, }); const PriceSummary = objectType({ name: "PriceSummary", definition(t) { t.nonNull.int("discounts"); t.nonNull.int("fees"); t.nonNull.int("mixAndMatch"); t.nonNull.int("rewards"); t.nonNull.int("subtotal"); t.nonNull.int("taxes"); t.nonNull.int("total"); }, }); const ActiveCannabinoid = objectType({ name: "ActiveCannabinoid", definition(t) { t.id("cannabinoidId"); t.field("unit", { type: PotencyUnit }); t.float("value"); t.field("cannabinoid", { type: Cannabinoid }); }, }); const ERPBrand = objectType({ name: "ERPBrand", definition(t) { t.nonNull.string("description"); t.nonNull.id("id"); t.string("imageUrl"); t.nonNull.string("name"); }, }); const Cannabinoid = objectType({ name: "Cannabinoid", definition(t) { t.string("description"); t.nonNull.id("id"); t.nonNull.string("name"); }, }); const CategoryLimit = objectType({ name: "CategoryLimit", definition(t) { t.string("name"); t.string("value"); }, }); const Coordinates = objectType({ name: "Coordinates", definition(t) { t.float("latitude"); t.float("longitude"); }, }); const DeliverySettings = objectType({ name: "DeliverySettings", definition(t) { t.boolean("afterHoursOrderingForDelivery"); t.boolean("afterHoursOrderingForPickup"); t.field("deliveryArea", { type: "JSON" }); t.string("deliveryFee"); t.string("deliveryMinimum"); t.boolean("disablePurchaseLimits"); t.boolean("limitPerCustomer"); t.int("pickupMinimum"); t.boolean("scheduledOrderingForDelivery"); t.boolean("scheduledOrderingForPickup"); }, }); const ERPProduct = objectType({ name: "ERPProduct", definition(t) { t.field("brand", { type: ERPBrand }); t.field("category", { type: Category }); t.nonNull.list.nonNull.field("effects", { type: Effects }); t.nonNull.id("id"); t.id("productBatchId"); t.nonNull.string("image"); t.nonNull.string("name"); t.string("slug"); t.string("posId"); t.field("potencyCbd", { type: Potency }); t.field("potencyThc", { type: Potency }); t.nonNull.boolean("staffPick"); t.field("strainType", { type: StrainType }); t.field("subcategory", { type: ERPSubcategory }); t.nonNull.list.nonNull.field("variants", { type: ProductVariant }); t.list.field("cannabinoids", { type: ActiveCannabinoid }); }, }); const ERPRetailer = objectType({ name: "ERPRetailer", definition(t) { t.nonNull.string("address"); t.nonNull.list.nonNull.field("categoryLimits", { type: CategoryLimit }); t.nonNull.field("deliverySettings", { type: DeliverySettings }); t.nonNull.field("fulfillmentOptions", { type: FulfillmentOptions }); t.nonNull.field("hours", { type: HoursSettings }); t.nonNull.id("id"); t.nonNull.list.nonNull.field("menuTypes", { type: MenuType }); t.nonNull.string("name"); t.nonNull.field("paymentOptions", { type: PaymentOptions }); t.nonNull.field("settings", { type: Settings }); t.field("coordinates", { type: Coordinates }); }, }); const FulfillmentOptions = objectType({ name: "FulfillmentOptions", definition(t) { t.boolean("curbsidePickup"); t.boolean("delivery"); t.boolean("driveThruPickup"); t.boolean("pickup"); }, }); const Hours = objectType({ name: "Hours", definition(t) { t.field("Sunday", { type: HoursDay }); t.field("Monday", { type: HoursDay }); t.field("Tuesday", { type: HoursDay }); t.field("Wednesday", { type: HoursDay }); t.field("Thursday", { type: HoursDay }); t.field("Friday", { type: HoursDay }); t.field("Saturday", { type: HoursDay }); }, }); const HoursDay = objectType({ name: "HoursDay", definition(t) { t.boolean("active"); t.string("end"); t.string("start"); }, }); const HoursSettings = objectType({ name: "HoursSettings", definition(t) { t.field("delivery", { type: Hours }); t.field("pickup", { type: Hours }); t.field("regular", { type: Hours }); t.list.field("special", { type: SpecialHours }); }, }); const PaymentOptions = objectType({ name: "PaymentOptions", definition(t) { t.boolean("aeropay"); t.boolean("alt36"); t.boolean("canPay"); t.boolean("cashless"); t.boolean("cashOnly"); t.boolean("check"); t.boolean("creditCard"); t.boolean("creditCardAtDoor"); t.boolean("creditCardByPhone"); t.boolean("debitOnly"); t.boolean("hypur"); t.boolean("linx"); t.boolean("merrco"); t.boolean("payInStore"); t.boolean("paytender"); }, }); const Potency = objectType({ name: "Potency", definition(t) { t.nonNull.string("formatted"); t.nonNull.list.nonNull.float("range"); t.nonNull.string("unit"); }, }); const ProductVariant = objectType({ name: "ProductVariant", definition(t) { t.nonNull.id("id"); t.nonNull.string("option"); t.float("priceMed"); t.float("priceRec"); t.float("specialPriceMed"); t.float("specialPriceRec"); t.int("quantity"); }, }); const Settings = objectType({ name: "Settings", definition(t) { t.string("menuWeights"); }, }); const SpecialHours = objectType({ name: "SpecialHours", definition(t) { t.nonNull.string("endDate"); t.list.field("hoursPerDay", { type: SpecialHoursDay }); t.nonNull.string("name"); t.nonNull.string("startDate"); }, }); const SpecialHoursDay = objectType({ name: "SpecialHoursDay", definition(t) { t.nonNull.string("date"); t.nonNull.field("deliveryHours", { type: HoursDay }); t.nonNull.field("pickupHours", { type: HoursDay }); }, }); const MenuFilter = inputObjectType({ name: "MenuFilter", definition(t) { t.string("brandId"); t.field("category", { type: Category }); t.list.nonNull.field("effects", { type: Effects }); t.field("menuSection", { type: MenuSectionFilter }); t.field("potencyCbd", { type: PotencyRange }); t.field("potencyThc", { type: PotencyRange }); t.string("search"); t.field("strainType", { type: StrainType }); t.field("subcategory", { type: ERPSubcategory }); t.list.nonNull.string("weights"); }, }); const MenuSectionFilter = inputObjectType({ name: "MenuSectionFilter", definition(t) { t.nonNull.field("type", { type: MenuSectionFilterType }); t.string("name"); }, }); const MenuSort = inputObjectType({ name: "MenuSort", definition(t) { t.nonNull.field("direction", { type: SortDirection }); t.nonNull.field("key", { type: MenuSortKey }); }, }); const PotencyRange = inputObjectType({ name: "PotencyRange", definition(t) { t.float("max"); t.float("min"); t.field("unit", { type: PotencyUnit }); }, }); const Category = enumType({ name: "CategoryType", members: [ "ORALS", "ACCESSORIES", "APPAREL", "CBD", "CLONES", "CONCENTRATES", "EDIBLES", "FLOWER", "NOT_APPLICABLE", "PRE_ROLLS", "SEEDS", "TINCTURES", "TOPICALS", "VAPORIZERS", ], }); const Effects = enumType({ name: "Effects", members: [ "CALM", "CLEAR_MIND", "CREATIVE", "ENERGETIC", "FOCUSED", "HAPPY", "INSPIRED", "RELAXED", "SLEEPY", "UPLIFTED", ], }); const MenuSectionFilterType = enumType({ name: "MenuSectionFilterType", members: ["CUSTOM_SECTION", "SPECIALS", "STAFF_PICKS"], }); const MenuSortKey = enumType({ name: "MenuSortKey", members: ["NAME", "POPULAR"], }); const MenuType = enumType({ name: "MenuType", members: ["MEDICAL", "RECREATIONAL"], }); const OrderType = enumType({ name: "OrderType", members: ["DELIVERY", "PICKUP"], }); const PotencyUnit = enumType({ name: "PotencyUnit", members: [ "MILLIGRAMS", "MILLIGRAMS_PER_GRAM", "MILLIGRAMS_PER_ML", "PERCENTAGE", ], }); const PricingType = enumType({ name: "PricingType", members: ["MEDICAL", "RECREATIONAL"], }); const SortDirection = enumType({ name: "SortDirection", members: ["ASC", "DESC"], }); const StrainType = enumType({ name: "StrainType", members: ["HIGH_CBD", "HYBRID", "INDICA", "NOT_APPLICABLE", "SATIVA"], }); const ERPSubcategory = enumType({ name: "ERPSubcategory", members: [ "DEFAULT", "SINGLES", "PACKS", "INFUSED", "BLUNTS", "CARTRIDGES", "PODS", "DISPOSABLES", "BUNDLES", "SHATTER", "LIVE_RESIN", "WAX", "ROSIN", "KIEF", "BUDDER", "CRUMBLE", "RSO", "APPLICATORS", "SUGAR", "SAUCE", "DIAMONDS", "ISOLATE", "INFUSED_FLOWER", "HASH", "BADDER", "OIL", "CHOCOLATES", "GUMMIES", "BAKED_GOODS", "DRINKS", "CAPSULES_TABLETS", "CHEWS", "HARD_CANDY", "SUBLINGUAL", "FROZEN_TREATS", "SAVORY_SNACKS", "COOKING_BAKING", "DISSOLVABLES", "LOZENGES", "SUCKERS", "BALMS", "TOPICAL_OILS", "LOTIONS", "STICKS_ROLL_ONS", "TRANSDERMAL_PATCHES", "BATH_PRODUCTS", "LIP_BALMS", "SOAPS", "LUBRICANTS", "SUPPOSITORIES", "UNFLAVORED", "FLAVORED", "HERBAL", "PET", "SPRAYS", "SHAKE_TRIM", "PRE_GROUND", "SMALL_BUDS", "INFUSED_BUD", "BATTERIES", "LIGHTERS", "DEVICES", "PAPERS_ROLLING_SUPPLIES", "GIFT_CARDS", "GRINDERS", "GLASSWARE", "TRAYS", "DAB_TOOLS", "CLEANING_SOLUTIONS", "STORAGE_CONTAINERS", ], }); const allTypes = [ ActiveCannabinoid, ERPBrand, Cannabinoid, CategoryLimit, Coordinates, DeliverySettings, ERPProduct, ERPRetailer, FulfillmentOptions, Hours, HoursDay, HoursSettings, PaymentOptions, Potency, ProductVariant, Settings, SpecialHours, SpecialHoursDay, MenuFilter, MenuSectionFilter, MenuSort, PotencyRange, Category, Effects, LatLngEntityResponse, MenuSectionFilterType, MenuSortKey, MenuType, OrderType, PotencyUnit, PricingType, SortDirection, StrainType, ERPSubcategory, Checkout, ]; export default allTypes;