diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..31883e6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "packages/infrastructure/src/private/nimara-infrastructure-private"] + path = packages/infrastructure/src/private/nimara-infrastructure-private + url = git@github.com:mirumee/nimara-infrastructure-private.git diff --git a/apps/storefront/package.json b/apps/storefront/package.json index 09b77af..820b4cf 100644 --- a/apps/storefront/package.json +++ b/apps/storefront/package.json @@ -31,6 +31,8 @@ "next-auth": "5.0.0-beta.17", "next-intl": "3.19.3", "nextjs-routes": "2.1.0", + "nimara-infrastructure-private": "file:../../packages/infrastructure/src/private", + "nuqs": "2.1.1", "react": "18.3.1", "react-dom": "18.3.1", "react-error-boundary": "4.0.13", diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts new file mode 100644 index 0000000..cccfc1b --- /dev/null +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector-utils.ts @@ -0,0 +1,213 @@ +"use client"; + +import { createParser, parseAsString } from "nuqs"; + +import type { + Attribute, + AttributeType, + AttributeValue, +} from "@nimara/domain/objects/Attribute"; +import type { Cart } from "@nimara/domain/objects/Cart"; +import type { + ProductAvailability, + ProductVariant, +} from "@nimara/domain/objects/Product"; +import type { User } from "@nimara/domain/objects/User"; + +export type AttributeDetails = { + name: string; + slug: string; + type: Attribute["type"]; + values: AttributeValue[]; +}; + +export type ChosenAttribute = { slug: string; value: string }; + +export type AttributePickerProps = { + availability: ProductAvailability; + cart: Cart | null; + user: (User & { accessToken: string | undefined }) | null; + variants: ProductVariant[]; +}; + +export const getVariantSelectionAttributes = ( + variantId: string, + variants: ProductVariant[], +): ChosenAttribute[] => { + const variant = variants.find(({ id }) => id === variantId); + + return ( + variant?.selectionAttributes + .map(({ slug, values }) => { + if (values.length) { + return { + slug, + value: values[0].slug, + }; + } + + return null; + }) + .filter(Boolean) ?? [] + ); +}; + +export const getParserForAttributeType = (type: AttributeType) => { + switch (type) { + case "MULTISELECT": + return createParser({ + parse: (value: string) => (value ? value.split(",") : []), + serialize: (values: string[]) => { + if (!Array.isArray(values)) { + return ""; + } + + return values.join(","); + }, + }).withDefault([]); + + case "DROPDOWN": + case "SWATCH": + return parseAsString.withDefault(""); + + default: + return parseAsString.withDefault(""); + } +}; + +export const getAllNonSelectionAttributes = (variants: ProductVariant[]) => { + const allNonSelectionAttributes: AttributeDetails[] = []; + + variants.forEach(({ nonSelectionAttributes }) => { + nonSelectionAttributes.forEach( + ({ + values, + type, + name, + slug, + }: { + name: string; + slug: string; + type: Attribute["type"]; + values: AttributeValue[]; + }) => { + if (slug && values?.length > 0) { + const attributeMatch = allNonSelectionAttributes.find( + (attribute) => attribute.slug === slug, + ); + + if (attributeMatch) { + const currentValuesSlug = attributeMatch.values.map( + ({ slug }) => slug, + ); + + const newValues = values.filter( + ({ slug }) => !currentValuesSlug.includes(slug), + ); + + attributeMatch.values.push(...newValues); + } else { + allNonSelectionAttributes.push({ + slug, + values: [...values], + name, + type, + }); + } + } + }, + ); + }); + + return allNonSelectionAttributes; +}; + +export const getAllSelectionAttributes = (variants: ProductVariant[]) => { + const allSelectionAttributes: AttributeDetails[] = []; + + variants.forEach(({ selectionAttributes }) => { + selectionAttributes.forEach( + ({ + values, + type, + name, + slug, + }: { + name: string; + slug: string; + type: Attribute["type"]; + values: AttributeValue[]; + }) => { + if (slug && values?.length > 0) { + const attributeMatch = allSelectionAttributes.find( + (attribute) => attribute.slug === slug, + ); + + if (attributeMatch) { + const currentValuesSlug = attributeMatch.values.map( + ({ slug }) => slug, + ); + + const newValues = values.filter( + ({ slug }) => !currentValuesSlug.includes(slug), + ); + + attributeMatch.values.push(...newValues); + } else { + allSelectionAttributes.push({ + slug, + values: [...values], + name, + type, + }); + } + } + }, + ); + }); + + return allSelectionAttributes; +}; + +// ! currently unsued +export const isAttributeCombinationPossible = ( + allVariants: ProductVariant[], + chosenAttributes: ChosenAttribute[], +) => { + if (chosenAttributes.length < 1) { + return true; + } + + return allVariants.some((variant) => + chosenAttributes.every(({ slug, value }) => { + const variantAttribute = variant.selectionAttributes.find( + (attr) => attr.slug === slug, + ); + + return variantAttribute?.values.some( + (attrValue) => attrValue.slug === value, + ); + }), + ); +}; + +export const validateValue = ( + slug: string, + value: unknown, + allSelectionAttributes: Attribute[], +) => { + const attribute = allSelectionAttributes.find((attr) => attr.slug === slug); + + if (!attribute) { + return false; + } + + if (attribute.type === "MULTISELECT") { + return ( + Array.isArray(value) && + value.every((v) => attribute.values.some((av) => av.slug === v)) + ); + } + + return value === "" || attribute.values.some((av) => av.slug === value); +}; diff --git a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector.tsx b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector.tsx index 099bad9..e78735a 100644 --- a/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector.tsx +++ b/apps/storefront/src/app/[locale]/(main)/products/[slug]/components/variant-selector.tsx @@ -1,379 +1,306 @@ "use client"; import { useTranslations } from "next-intl"; -import { useEffect, useState } from "react"; - -import type { - Attribute, - AttributeValue, -} from "@nimara/domain/objects/Attribute"; -import type { Cart } from "@nimara/domain/objects/Cart"; -import type { - ProductAvailability, - ProductVariant, -} from "@nimara/domain/objects/Product"; -import type { User } from "@nimara/domain/objects/User"; +import { useQueryStates } from "nuqs"; +import { useEffect, useMemo, useState } from "react"; + import { Label } from "@nimara/ui/components/label"; import { ToggleGroup, ToggleGroupItem, } from "@nimara/ui/components/toggle-group"; -import { usePathname, useRouter } from "@/i18n/routing"; import { useLocalizedFormatter } from "@/lib/formatters/use-localized-formatter"; import { isVariantInStock } from "@/lib/product"; +import { cn } from "@/lib/utils"; import { AddToBag } from "./add-to-bag"; import { VariantDropdown } from "./variant-dropdown"; +import { + type AttributePickerProps, + getAllSelectionAttributes, + getParserForAttributeType, + validateValue, +} from "./variant-selector-utils"; -type AttributeDetails = { - name: string; - slug: string; - type: Attribute["type"]; - values: AttributeValue[]; -}; -type SelectionAttributeMap = AttributeDetails[]; - -type SelectedAttribute = { slug: string; value: string }; - -export const getIdFromHash = () => { - const isOnServer = typeof window === "undefined"; - - return isOnServer ? "" : location.hash.replace("#", ""); -}; +export const VariantSelector = ({ + variants: productVariants, + availability: { + isAvailable: isProductAvailable, + variants: variantsAvailability, + startPrice, + }, + cart, + user, +}: AttributePickerProps) => { + const t = useTranslations(); + const formatter = useLocalizedFormatter(); + // used to discriminate between variants when there are multiple variants with the same set of selection attributes + const [discriminatedVariantId, setDiscriminatedVariantId] = useState(""); -const generateFullAttributeMap = (variants: ProductVariant[]) => { - const selectionAttributesMap: SelectionAttributeMap = []; - - variants.forEach(({ selectionAttributes }) => { - selectionAttributes.forEach( - ({ - values, - type, - name, - slug, - }: { - name: string; - slug: string; - type: Attribute["type"]; - values: AttributeValue[]; - }) => { - if (slug && values?.length > 0) { - const attributeMatch = selectionAttributesMap.find( - (attribute) => attribute.slug === slug, - ); + const allSelectionAttributes = useMemo( + () => getAllSelectionAttributes(productVariants), + [productVariants], + ); - if (attributeMatch) { - const currentValuesSlug = attributeMatch.values.map( - ({ slug }) => slug, - ); - - const newValues = values.filter( - ({ slug }) => !currentValuesSlug.includes(slug), - ); - - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - attributeMatch.values.push(...newValues); - } else { - selectionAttributesMap.push({ - slug, - values: [...values], - name, - type, - }); - } - } - }, - ); - }); + const [params, setParams] = useQueryStates( + Object.fromEntries( + allSelectionAttributes.map((attr) => [ + attr.slug, + getParserForAttributeType(attr.type), + ]), + ), + { + history: "replace", + }, + ); - return selectionAttributesMap; -}; + const chosenAttributes = useMemo( + () => + Object.entries(params ?? {}) + .map(([slug, value]) => { + return typeof value === "string" ? { slug, value } : null; + }) + .filter(Boolean), + [params], + ); -const narrowAttributeMapToSelectedAttributes = ( - variants: ProductVariant[], - selectionAttributesMap: SelectionAttributeMap, - selectedAttributes: SelectedAttribute[], -) => { - selectedAttributes.forEach((_, i, array) => { - let newValues: AttributeValue[] = []; - const attributesRequirements = array.slice(0, i + 1); - const selectionToUpdate = selectionAttributesMap[i + 1]; - - if (!selectionToUpdate) { + useEffect(() => { + if (!params) { return; } - variants.forEach(({ selectionAttributes }) => { - const match = attributesRequirements.every((requirement) => { - return selectionAttributes.some(({ values, slug }) => { - const valuesSlug = values.map(({ slug }: { slug: string }) => slug); + const validatedParams = Object.fromEntries( + allSelectionAttributes.map((attr, index) => { + const currentValue = params[attr.slug]; - return ( - requirement.slug === slug && valuesSlug.includes(requirement.value) - ); - }); - }); - - if (match) { - const attributes = selectionAttributes.filter( - ({ slug, values }) => - selectionToUpdate.slug === slug && values.length, - ); - - if (attributes.length) { - newValues.push( - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - ...attributes - .map(({ values }: { values: AttributeValue[] }) => values) - .flat(), - ); + if (!validateValue(attr.slug, currentValue, allSelectionAttributes)) { + return [attr.slug, attr.type === "MULTISELECT" ? [] : ""]; } - } - }); - const attributeMatch = selectionAttributesMap.find( - ({ slug }) => slug === selectionToUpdate.slug, + return [ + attr.slug, + index > 0 && params[allSelectionAttributes?.[index - 1]?.slug] === "" + ? "" + : currentValue, + ]; + }), ); - if (attributeMatch) { - attributeMatch.values = [...newValues]; + if (JSON.stringify(params) !== JSON.stringify(validatedParams)) { + setParams(validatedParams).catch((e) => { + console.error(e); + }); } - - newValues = []; - }); -}; - -const generateSelectionAttributeMap = ( - variants: ProductVariant[], - selectedAttributes: SelectedAttribute[], -): SelectionAttributeMap => { - const selectionAttributesMap = generateFullAttributeMap(variants); - - narrowAttributeMapToSelectedAttributes( - variants, - selectionAttributesMap, - selectedAttributes, + }, [ + params, + allSelectionAttributes, + setParams, + setDiscriminatedVariantId, + setParams, + ]); + + const areAllRequiredSelectionAttributesChosen = allSelectionAttributes.every( + ({ slug }) => { + const value = params?.[slug]; + + return value && (Array.isArray(value) ? value.length > 0 : value !== ""); + }, ); - return selectionAttributesMap; -}; - -const generateSelectedMapForVariant = ( - variantId: string, - variants: ProductVariant[], -): SelectedAttribute[] => { - const variant = variants.find(({ id }) => id === variantId); + const matchingVariants = useMemo(() => { + if (!areAllRequiredSelectionAttributesChosen) { + return []; + } - return ( - variant?.selectionAttributes - .map(({ slug, values }) => { - if (values.length) { - return { - slug, - value: values[0].slug, - }; + return productVariants.filter((variant) => + variant.selectionAttributes.every(({ slug, values, type }) => { + if (!values.length) { + return true; } - return null; - }) - .filter(Boolean) ?? [] - ); -}; - -type AttributePickerProps = { - availability: ProductAvailability; - cart: Cart | null; - user: (User & { accessToken: string | undefined }) | null; - variants: ProductVariant[]; -}; + const selectedValue = params?.[slug]; -export const VariantSelector = ({ - variants: productVariants, - availability: { - isAvailable: isProductAvailable, - variants: variantsAvailability, - startPrice, - }, - cart, - user, -}: AttributePickerProps) => { - const router = useRouter(); - const pathname = usePathname(); - const t = useTranslations(); - const formatter = useLocalizedFormatter(); + if (!selectedValue) { + return false; + } - const [selectedVariantId, setSelectedVariantId] = useState(""); - const [variants, setVariants] = useState([]); - const [selectedAttributes, setSelectedAttributes] = useState< - SelectedAttribute[] - >(generateSelectedMapForVariant(selectedVariantId, productVariants)); - const [selectionAttributesMap, setSelectionAttributesMap] = - useState( - generateSelectionAttributeMap(productVariants, selectedAttributes), + return type === "MULTISELECT" + ? (selectedValue as string[]).every((v) => + values.some((attr) => attr.slug === v), + ) + : values.some((v) => v.slug === selectedValue); + }), ); + }, [params, productVariants, allSelectionAttributes]); + + const chosenVariant = discriminatedVariantId + ? (productVariants.find(({ id }) => id === discriminatedVariantId) ?? null) + : matchingVariants?.length === 1 + ? matchingVariants?.[0] + : null; - const startingPrice = startPrice; - const selectedVariant = variantsAvailability - ? variantsAvailability.find(({ id }) => id === selectedVariantId) + const chosenVariantAvailability = variantsAvailability + ? variantsAvailability.find(({ id }) => id === chosenVariant?.id) : undefined; - const isVariantAvailable = selectedVariant - ? isVariantInStock(selectedVariant, cart?.lines) - : isProductAvailable; + + const isVariantAvailable = + chosenVariant && chosenVariantAvailability + ? isVariantInStock(chosenVariantAvailability, cart?.lines) + : isProductAvailable; const getPrice = () => { - if (selectedVariant) { - if (selectedVariant.price.amount === 0) { + if (chosenVariantAvailability) { + if (chosenVariantAvailability.price.amount === 0) { return t("common.free"); } - return formatter.price({ amount: selectedVariant.price.amount }); + return formatter.price({ + amount: chosenVariantAvailability.price.amount, + }); } const hasFreeVariant = variantsAvailability.some( (variant) => variant.price.amount === 0, ); - if (hasFreeVariant || startingPrice.amount === 0) { + if (hasFreeVariant || startPrice.amount === 0) { return t("common.free"); } return t("common.from-price", { - price: formatter.price({ amount: startingPrice.amount }), + price: formatter.price({ amount: startPrice.amount }), }); }; - useEffect(() => { - const regeneratedSelectionAttributesMap = generateSelectionAttributeMap( - productVariants, - selectedAttributes, - ); - - if (selectedAttributes.length) { - const variantWithSelectedAttributes = productVariants.filter((variant) => - variant.selectionAttributes.every(({ slug, values }) => { - if (values.length) { - const attributeMatch = selectedAttributes.find( - (attribute) => slug === attribute.slug, - ); - - return attributeMatch?.value === values[0].slug; - } - - return true; - }), - ); - - if (variantWithSelectedAttributes) { - setVariants(variantWithSelectedAttributes); - } - } - - setSelectionAttributesMap(regeneratedSelectionAttributesMap); - }, [selectedAttributes]); - - useEffect(() => { - if (selectedVariantId) { - router.push(`${pathname}#${selectedVariantId}`, { scroll: false }); - } else if (getIdFromHash() && !selectedVariantId) { - router.push(pathname, { scroll: false }); - } - }, [selectedVariantId]); - - useEffect(() => { - /** - * Can't set this in initial useState due to hydration error - */ - const variantId = getIdFromHash(); - - // Check if the variant id exists in the product variants. - const isVariantIdValid = - productVariants.findIndex((v) => v.id === variantId) !== -1; - - if (variantId && isVariantIdValid) { - setSelectedVariantId(variantId); - setSelectedAttributes( - generateSelectedMapForVariant(variantId, productVariants), - ); - } - }, []); - return ( <>

{getPrice()}

-
- {selectionAttributesMap.map(({ slug, name, values }, index) => { - const arePreviousAttributesSelected = - index < selectedAttributes.length + 1; - const hasValues = values.length > 0; - - if (!(arePreviousAttributesSelected && hasValues)) { - return null; - } +
+ {allSelectionAttributes.map(({ slug, name, values, type }, index) => { + const isPreviousAttributeSelected = + index === 0 ? true : !!chosenAttributes[index - 1]?.value; - const defaultValue = selectedAttributes.find((val) => { + const chosenAttribute = chosenAttributes.find((val) => { if (val.slug === slug) { return values.some((v) => v.slug === val.value); } return false; - })?.value; + }); return (
- + + { - setVariants([]); - setSelectedVariantId(""); - setSelectedAttributes((values) => { - if (index < values.length - 1) { - // Undo if someone selects one of the previous attribute. - values.splice(index, values.length - index, { - slug, - value: valueSlug, - }); - } else if (valueSlug) { - // Insert new attribute choice. - values.splice(index, 1, { slug, value: valueSlug }); - } else { - // Replace current attribute choice. - values.splice(index, 1); - } - - return [...values]; + setDiscriminatedVariantId(""); + setParams({ + ...params, + [slug]: valueSlug, + }).catch((e) => { + console.error(e); }); }} > - {values.map(({ slug, name }) => ( - - {name} - - ))} + {values.map(({ slug: valueSlug, name: valueName, value }) => { + const isSelected = chosenAttributes.some( + (attr) => attr.slug === slug && attr.value === valueSlug, + ); + + return type === "SWATCH" ? ( + +
+ +
+ + ) : ( + + {valueName} + + ); + })}
); })} -
- -
+ {matchingVariants?.length > 1 && ( +
+ { + setDiscriminatedVariantId(variantId); + }} + selectedVariantId={discriminatedVariantId} + /> +
+ )}
1 + ? discriminatedVariantId + : chosenVariant + ? chosenVariant?.id + : areAllRequiredSelectionAttributesChosen + ? "NOTIFY_ME" + : "" + } + isVariantAvailable={ + matchingVariants?.length > 1 + ? true + : chosenVariant + ? isVariantAvailable + : areAllRequiredSelectionAttributesChosen + ? false + : true + } user={user} /> diff --git a/apps/storefront/src/app/[locale]/(main)/search/_filters/filters-container.tsx b/apps/storefront/src/app/[locale]/(main)/search/_filters/filters-container.tsx index a016e50..0769497 100644 --- a/apps/storefront/src/app/[locale]/(main)/search/_filters/filters-container.tsx +++ b/apps/storefront/src/app/[locale]/(main)/search/_filters/filters-container.tsx @@ -38,7 +38,7 @@ const renderFilterComponent = ( searchParams: Record, ) => { // TODO: Extend this function for other, more adequate Filter components - switch (facet?.type) { + switch (facet.type) { case "PLAIN_TEXT": return ( { const t = await getTranslations(); - const genderFacet = facets.filter((facet) => facet.slug === "gender")[0]; - const sizeFacet = facets.filter((facet) => facet.slug === "size")[0]; + const genderFacet = facets.filter((facet) => facet.slug === "gender"); + const sizeFacet = facets.filter((facet) => facet.slug === "size"); const colorFacet = facets .filter((facet) => facet.slug === "color") .map((facet) => ({ @@ -105,7 +105,7 @@ export const FiltersContainer = async ({ label: t(`colors.${color}`), value: color as string, })), - }))[0]; + })); const updateFiltersWithSearchParams = handleFiltersFormSubmit.bind( null, @@ -156,13 +156,19 @@ export const FiltersContainer = async ({
- {renderFilterComponent(genderFacet, searchParams)} + {genderFacet.map((facet) => + renderFilterComponent(facet, searchParams), + )}
- {renderFilterComponent(sizeFacet, searchParams)} + {sizeFacet.map((facet) => + renderFilterComponent(facet, searchParams), + )}
- {renderFilterComponent(colorFacet, searchParams)} + {colorFacet.map((facet) => + renderFilterComponent(facet, searchParams), + )}
diff --git a/apps/storefront/src/app/[locale]/layout.tsx b/apps/storefront/src/app/[locale]/layout.tsx index 850f86f..7a07bb0 100644 --- a/apps/storefront/src/app/[locale]/layout.tsx +++ b/apps/storefront/src/app/[locale]/layout.tsx @@ -2,6 +2,7 @@ import "@nimara/ui/styles/globals"; import type { Metadata } from "next"; import { NextIntlClientProvider, useMessages } from "next-intl"; +import { NuqsAdapter } from "nuqs/adapters/next/app"; import type { ReactNode } from "react"; import { Toaster } from "@nimara/ui/components/toaster"; @@ -33,9 +34,11 @@ export default function LocaleLayout({ className={cn("min-h-[100dvh]", "flex flex-col", aspekta.className)} > - {children} - - + + {children} + + + diff --git a/apps/storefront/src/graphql/fragments/generated.ts b/apps/storefront/src/graphql/fragments/generated.ts index c635740..70c55cf 100644 --- a/apps/storefront/src/graphql/fragments/generated.ts +++ b/apps/storefront/src/graphql/fragments/generated.ts @@ -1,902 +1,272 @@ -import type * as Types from "@nimara/codegen/schema"; - -import type { DocumentTypeDecoration } from "@graphql-typed-document-node/core"; -export type MenuEventSubscriptionFragment_MenuCreated_menu_Menu = { - slug: string; -}; - -export type MenuEventSubscriptionFragment_MenuDeleted_menu_Menu = { - slug: string; -}; - -export type MenuEventSubscriptionFragment_MenuItemCreated_menuItem_MenuItem_menu_Menu = - { slug: string }; - -export type MenuEventSubscriptionFragment_MenuItemCreated_menuItem_MenuItem = { - menu: MenuEventSubscriptionFragment_MenuItemCreated_menuItem_MenuItem_menu_Menu; -}; - -export type MenuEventSubscriptionFragment_MenuItemDeleted_menuItem_MenuItem_menu_Menu = - { slug: string }; - -export type MenuEventSubscriptionFragment_MenuItemDeleted_menuItem_MenuItem = { - menu: MenuEventSubscriptionFragment_MenuItemDeleted_menuItem_MenuItem_menu_Menu; -}; - -export type MenuEventSubscriptionFragment_MenuItemUpdated_menuItem_MenuItem_menu_Menu = - { slug: string }; - -export type MenuEventSubscriptionFragment_MenuItemUpdated_menuItem_MenuItem = { - menu: MenuEventSubscriptionFragment_MenuItemUpdated_menuItem_MenuItem_menu_Menu; -}; - -export type MenuEventSubscriptionFragment_MenuUpdated_menu_Menu = { - slug: string; -}; - -export type MenuEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s = - { - __typename: - | "AccountChangeEmailRequested" - | "AccountConfirmationRequested" - | "AccountConfirmed" - | "AccountDeleteRequested" - | "AccountDeleted" - | "AccountEmailChanged" - | "AccountSetPasswordRequested" - | "AddressCreated" - | "AddressDeleted" - | "AddressUpdated" - | "AppDeleted" - | "AppInstalled" - | "AppStatusChanged" - | "AppUpdated" - | "AttributeCreated" - | "AttributeDeleted" - | "AttributeUpdated" - | "AttributeValueCreated" - | "AttributeValueDeleted" - | "AttributeValueUpdated"; - }; - -export type MenuEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi = - { - __typename: - | "CalculateTaxes" - | "CategoryCreated" - | "CategoryDeleted" - | "CategoryUpdated" - | "ChannelCreated" - | "ChannelDeleted" - | "ChannelMetadataUpdated" - | "ChannelStatusChanged" - | "ChannelUpdated" - | "CheckoutCreated" - | "CheckoutFilterShippingMethods" - | "CheckoutFullyPaid" - | "CheckoutMetadataUpdated" - | "CheckoutUpdated" - | "CollectionCreated" - | "CollectionDeleted" - | "CollectionMetadataUpdated" - | "CollectionUpdated" - | "CustomerCreated" - | "CustomerMetadataUpdated"; - }; - -export type MenuEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc = - { - __typename: - | "CustomerUpdated" - | "DraftOrderCreated" - | "DraftOrderDeleted" - | "DraftOrderUpdated" - | "FulfillmentApproved" - | "FulfillmentCanceled" - | "FulfillmentCreated" - | "FulfillmentMetadataUpdated" - | "FulfillmentTrackingNumberUpdated" - | "GiftCardCreated" - | "GiftCardDeleted" - | "GiftCardExportCompleted" - | "GiftCardMetadataUpdated" - | "GiftCardSent" - | "GiftCardStatusChanged" - | "GiftCardUpdated" - | "InvoiceDeleted" - | "InvoiceRequested" - | "InvoiceSent" - | "ListStoredPaymentMethods"; - }; - -export type MenuEventSubscriptionFragment_YPBc8Fb7zCwJHzmQq3eEe6vg8QVjucSZas0RkBvRw = - { - __typename: - | "OrderBulkCreated" - | "OrderCancelled" - | "OrderConfirmed" - | "OrderCreated" - | "OrderExpired" - | "OrderFilterShippingMethods" - | "OrderFulfilled" - | "OrderFullyPaid" - | "OrderFullyRefunded" - | "OrderMetadataUpdated" - | "OrderPaid" - | "OrderRefunded" - | "OrderUpdated" - | "PageCreated" - | "PageDeleted" - | "PageTypeCreated" - | "PageTypeDeleted" - | "PageTypeUpdated" - | "PageUpdated" - | "PaymentAuthorize"; - }; - -export type MenuEventSubscriptionFragment_HezzdL7zxss93HwVi8tlZ0cHDsAaHlrfWxRRlz93Zzk = - { - __typename: - | "PaymentCaptureEvent" - | "PaymentConfirmEvent" - | "PaymentGatewayInitializeSession" - | "PaymentGatewayInitializeTokenizationSession" - | "PaymentListGateways" - | "PaymentMethodInitializeTokenizationSession" - | "PaymentMethodProcessTokenizationSession" - | "PaymentProcessEvent" - | "PaymentRefundEvent" - | "PaymentVoidEvent" - | "PermissionGroupCreated" - | "PermissionGroupDeleted" - | "PermissionGroupUpdated" - | "ProductCreated" - | "ProductDeleted" - | "ProductExportCompleted" - | "ProductMediaCreated" - | "ProductMediaDeleted" - | "ProductMediaUpdated" - | "ProductMetadataUpdated"; - }; - -export type MenuEventSubscriptionFragment_3wM2nJglZysZqyXe2PXv7dgg5ra3r2CqLh0G03sc = - { - __typename: - | "ProductUpdated" - | "ProductVariantBackInStock" - | "ProductVariantCreated" - | "ProductVariantDeleted" - | "ProductVariantMetadataUpdated" - | "ProductVariantOutOfStock" - | "ProductVariantStockUpdated" - | "ProductVariantUpdated" - | "PromotionCreated" - | "PromotionDeleted" - | "PromotionEnded" - | "PromotionRuleCreated" - | "PromotionRuleDeleted" - | "PromotionRuleUpdated" - | "PromotionStarted" - | "PromotionUpdated" - | "SaleCreated" - | "SaleDeleted" - | "SaleToggle" - | "SaleUpdated"; - }; - -export type MenuEventSubscriptionFragment_C3zANrKmQj4BCk0zTQanbiWn8nIAzXKzJqHd4o3iO4 = - { - __typename: - | "ShippingListMethodsForCheckout" - | "ShippingPriceCreated" - | "ShippingPriceDeleted" - | "ShippingPriceUpdated" - | "ShippingZoneCreated" - | "ShippingZoneDeleted" - | "ShippingZoneMetadataUpdated" - | "ShippingZoneUpdated" - | "ShopMetadataUpdated" - | "StaffCreated" - | "StaffDeleted" - | "StaffSetPasswordRequested" - | "StaffUpdated" - | "StoredPaymentMethodDeleteRequested" - | "ThumbnailCreated" - | "TransactionCancelationRequested" - | "TransactionChargeRequested" - | "TransactionInitializeSession" - | "TransactionItemMetadataUpdated" - | "TransactionProcessSession"; - }; - -export type MenuEventSubscriptionFragment_6nSTrout1sXuRsQxm391yzMyp6EmS8Np4Fh4jhvgns = - { - __typename: - | "TransactionRefundRequested" - | "TranslationCreated" - | "TranslationUpdated" - | "VoucherCodeExportCompleted" - | "VoucherCodesCreated" - | "VoucherCodesDeleted" - | "VoucherCreated" - | "VoucherDeleted" - | "VoucherMetadataUpdated" - | "VoucherUpdated" - | "WarehouseCreated" - | "WarehouseDeleted" - | "WarehouseMetadataUpdated" - | "WarehouseUpdated"; - }; - -export type MenuEventSubscriptionFragment_MenuCreated = { - menu: MenuEventSubscriptionFragment_MenuCreated_menu_Menu | null; -} & { __typename: "MenuCreated" }; - -export type MenuEventSubscriptionFragment_MenuDeleted = { - menu: MenuEventSubscriptionFragment_MenuDeleted_menu_Menu | null; -} & { __typename: "MenuDeleted" }; - -export type MenuEventSubscriptionFragment_MenuItemCreated = { - menuItem: MenuEventSubscriptionFragment_MenuItemCreated_menuItem_MenuItem | null; -} & { __typename: "MenuItemCreated" }; - -export type MenuEventSubscriptionFragment_MenuItemDeleted = { - menuItem: MenuEventSubscriptionFragment_MenuItemDeleted_menuItem_MenuItem | null; -} & { __typename: "MenuItemDeleted" }; - -export type MenuEventSubscriptionFragment_MenuItemUpdated = { - menuItem: MenuEventSubscriptionFragment_MenuItemUpdated_menuItem_MenuItem | null; -} & { __typename: "MenuItemUpdated" }; - -export type MenuEventSubscriptionFragment_MenuUpdated = { - menu: MenuEventSubscriptionFragment_MenuUpdated_menu_Menu | null; -} & { __typename: "MenuUpdated" }; - -export type MenuEventSubscriptionFragment = - | MenuEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s - | MenuEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi - | MenuEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc - | MenuEventSubscriptionFragment_YPBc8Fb7zCwJHzmQq3eEe6vg8QVjucSZas0RkBvRw - | MenuEventSubscriptionFragment_HezzdL7zxss93HwVi8tlZ0cHDsAaHlrfWxRRlz93Zzk - | MenuEventSubscriptionFragment_3wM2nJglZysZqyXe2PXv7dgg5ra3r2CqLh0G03sc - | MenuEventSubscriptionFragment_C3zANrKmQj4BCk0zTQanbiWn8nIAzXKzJqHd4o3iO4 - | MenuEventSubscriptionFragment_6nSTrout1sXuRsQxm391yzMyp6EmS8Np4Fh4jhvgns - | MenuEventSubscriptionFragment_MenuCreated - | MenuEventSubscriptionFragment_MenuDeleted - | MenuEventSubscriptionFragment_MenuItemCreated - | MenuEventSubscriptionFragment_MenuItemDeleted - | MenuEventSubscriptionFragment_MenuItemUpdated - | MenuEventSubscriptionFragment_MenuUpdated; - -export type Money = { currency: string; amount: number }; - -export type PageEventSubscriptionFragment_PageCreated_page_Page = { - slug: string; -}; - -export type PageEventSubscriptionFragment_PageDeleted_page_Page = { - slug: string; -}; - -export type PageEventSubscriptionFragment_PageTypeCreated_pageType_PageType = { - slug: string; -}; - -export type PageEventSubscriptionFragment_PageTypeDeleted_pageType_PageType = { - slug: string; -}; - -export type PageEventSubscriptionFragment_PageTypeUpdated_pageType_PageType = { - slug: string; -}; - -export type PageEventSubscriptionFragment_PageUpdated_page_Page = { - slug: string; -}; - -export type PageEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s = - { - __typename: - | "AccountChangeEmailRequested" - | "AccountConfirmationRequested" - | "AccountConfirmed" - | "AccountDeleteRequested" - | "AccountDeleted" - | "AccountEmailChanged" - | "AccountSetPasswordRequested" - | "AddressCreated" - | "AddressDeleted" - | "AddressUpdated" - | "AppDeleted" - | "AppInstalled" - | "AppStatusChanged" - | "AppUpdated" - | "AttributeCreated" - | "AttributeDeleted" - | "AttributeUpdated" - | "AttributeValueCreated" - | "AttributeValueDeleted" - | "AttributeValueUpdated"; - }; - -export type PageEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi = - { - __typename: - | "CalculateTaxes" - | "CategoryCreated" - | "CategoryDeleted" - | "CategoryUpdated" - | "ChannelCreated" - | "ChannelDeleted" - | "ChannelMetadataUpdated" - | "ChannelStatusChanged" - | "ChannelUpdated" - | "CheckoutCreated" - | "CheckoutFilterShippingMethods" - | "CheckoutFullyPaid" - | "CheckoutMetadataUpdated" - | "CheckoutUpdated" - | "CollectionCreated" - | "CollectionDeleted" - | "CollectionMetadataUpdated" - | "CollectionUpdated" - | "CustomerCreated" - | "CustomerMetadataUpdated"; - }; - -export type PageEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc = - { - __typename: - | "CustomerUpdated" - | "DraftOrderCreated" - | "DraftOrderDeleted" - | "DraftOrderUpdated" - | "FulfillmentApproved" - | "FulfillmentCanceled" - | "FulfillmentCreated" - | "FulfillmentMetadataUpdated" - | "FulfillmentTrackingNumberUpdated" - | "GiftCardCreated" - | "GiftCardDeleted" - | "GiftCardExportCompleted" - | "GiftCardMetadataUpdated" - | "GiftCardSent" - | "GiftCardStatusChanged" - | "GiftCardUpdated" - | "InvoiceDeleted" - | "InvoiceRequested" - | "InvoiceSent" - | "ListStoredPaymentMethods"; - }; - -export type PageEventSubscriptionFragment_ScBspfyBrxPcHRwpBe5ZtJu4sXvFlHuN0Vv5mTMah4 = - { - __typename: - | "MenuCreated" - | "MenuDeleted" - | "MenuItemCreated" - | "MenuItemDeleted" - | "MenuItemUpdated" - | "MenuUpdated" - | "OrderBulkCreated" - | "OrderCancelled" - | "OrderConfirmed" - | "OrderCreated" - | "OrderExpired" - | "OrderFilterShippingMethods" - | "OrderFulfilled" - | "OrderFullyPaid" - | "OrderFullyRefunded" - | "OrderMetadataUpdated" - | "OrderPaid" - | "OrderRefunded" - | "OrderUpdated" - | "PaymentAuthorize"; - }; - -export type PageEventSubscriptionFragment_HezzdL7zxss93HwVi8tlZ0cHDsAaHlrfWxRRlz93Zzk = - { - __typename: - | "PaymentCaptureEvent" - | "PaymentConfirmEvent" - | "PaymentGatewayInitializeSession" - | "PaymentGatewayInitializeTokenizationSession" - | "PaymentListGateways" - | "PaymentMethodInitializeTokenizationSession" - | "PaymentMethodProcessTokenizationSession" - | "PaymentProcessEvent" - | "PaymentRefundEvent" - | "PaymentVoidEvent" - | "PermissionGroupCreated" - | "PermissionGroupDeleted" - | "PermissionGroupUpdated" - | "ProductCreated" - | "ProductDeleted" - | "ProductExportCompleted" - | "ProductMediaCreated" - | "ProductMediaDeleted" - | "ProductMediaUpdated" - | "ProductMetadataUpdated"; - }; - -export type PageEventSubscriptionFragment_3wM2nJglZysZqyXe2PXv7dgg5ra3r2CqLh0G03sc = - { - __typename: - | "ProductUpdated" - | "ProductVariantBackInStock" - | "ProductVariantCreated" - | "ProductVariantDeleted" - | "ProductVariantMetadataUpdated" - | "ProductVariantOutOfStock" - | "ProductVariantStockUpdated" - | "ProductVariantUpdated" - | "PromotionCreated" - | "PromotionDeleted" - | "PromotionEnded" - | "PromotionRuleCreated" - | "PromotionRuleDeleted" - | "PromotionRuleUpdated" - | "PromotionStarted" - | "PromotionUpdated" - | "SaleCreated" - | "SaleDeleted" - | "SaleToggle" - | "SaleUpdated"; - }; - -export type PageEventSubscriptionFragment_C3zANrKmQj4BCk0zTQanbiWn8nIAzXKzJqHd4o3iO4 = - { - __typename: - | "ShippingListMethodsForCheckout" - | "ShippingPriceCreated" - | "ShippingPriceDeleted" - | "ShippingPriceUpdated" - | "ShippingZoneCreated" - | "ShippingZoneDeleted" - | "ShippingZoneMetadataUpdated" - | "ShippingZoneUpdated" - | "ShopMetadataUpdated" - | "StaffCreated" - | "StaffDeleted" - | "StaffSetPasswordRequested" - | "StaffUpdated" - | "StoredPaymentMethodDeleteRequested" - | "ThumbnailCreated" - | "TransactionCancelationRequested" - | "TransactionChargeRequested" - | "TransactionInitializeSession" - | "TransactionItemMetadataUpdated" - | "TransactionProcessSession"; - }; - -export type PageEventSubscriptionFragment_6nSTrout1sXuRsQxm391yzMyp6EmS8Np4Fh4jhvgns = - { - __typename: - | "TransactionRefundRequested" - | "TranslationCreated" - | "TranslationUpdated" - | "VoucherCodeExportCompleted" - | "VoucherCodesCreated" - | "VoucherCodesDeleted" - | "VoucherCreated" - | "VoucherDeleted" - | "VoucherMetadataUpdated" - | "VoucherUpdated" - | "WarehouseCreated" - | "WarehouseDeleted" - | "WarehouseMetadataUpdated" - | "WarehouseUpdated"; - }; - -export type PageEventSubscriptionFragment_PageCreated = { - page: PageEventSubscriptionFragment_PageCreated_page_Page | null; -} & { __typename: "PageCreated" }; - -export type PageEventSubscriptionFragment_PageDeleted = { - page: PageEventSubscriptionFragment_PageDeleted_page_Page | null; -} & { __typename: "PageDeleted" }; - -export type PageEventSubscriptionFragment_PageTypeCreated = { - pageType: PageEventSubscriptionFragment_PageTypeCreated_pageType_PageType | null; -} & { __typename: "PageTypeCreated" }; - -export type PageEventSubscriptionFragment_PageTypeDeleted = { - pageType: PageEventSubscriptionFragment_PageTypeDeleted_pageType_PageType | null; -} & { __typename: "PageTypeDeleted" }; - -export type PageEventSubscriptionFragment_PageTypeUpdated = { - pageType: PageEventSubscriptionFragment_PageTypeUpdated_pageType_PageType | null; -} & { __typename: "PageTypeUpdated" }; - -export type PageEventSubscriptionFragment_PageUpdated = { - page: PageEventSubscriptionFragment_PageUpdated_page_Page | null; -} & { __typename: "PageUpdated" }; - -export type PageEventSubscriptionFragment = - | PageEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s - | PageEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi - | PageEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc - | PageEventSubscriptionFragment_ScBspfyBrxPcHRwpBe5ZtJu4sXvFlHuN0Vv5mTMah4 - | PageEventSubscriptionFragment_HezzdL7zxss93HwVi8tlZ0cHDsAaHlrfWxRRlz93Zzk - | PageEventSubscriptionFragment_3wM2nJglZysZqyXe2PXv7dgg5ra3r2CqLh0G03sc - | PageEventSubscriptionFragment_C3zANrKmQj4BCk0zTQanbiWn8nIAzXKzJqHd4o3iO4 - | PageEventSubscriptionFragment_6nSTrout1sXuRsQxm391yzMyp6EmS8Np4Fh4jhvgns - | PageEventSubscriptionFragment_PageCreated - | PageEventSubscriptionFragment_PageDeleted - | PageEventSubscriptionFragment_PageTypeCreated - | PageEventSubscriptionFragment_PageTypeDeleted - | PageEventSubscriptionFragment_PageTypeUpdated - | PageEventSubscriptionFragment_PageUpdated; - -export type ProductEventSubscriptionFragment_ProductDeleted_product_Product = { - slug: string; -}; - -export type ProductEventSubscriptionFragment_ProductMediaCreated_productMedia_ProductMedia = - { productId: string | null }; - -export type ProductEventSubscriptionFragment_ProductMediaDeleted_productMedia_ProductMedia = - { productId: string | null }; - -export type ProductEventSubscriptionFragment_ProductMediaUpdated_productMedia_ProductMedia = - { productId: string | null }; - -export type ProductEventSubscriptionFragment_ProductMetadataUpdated_product_Product = - { slug: string }; - -export type ProductEventSubscriptionFragment_ProductUpdated_product_Product = { - slug: string; -}; - -export type ProductEventSubscriptionFragment_ProductVariantBackInStock_productVariant_ProductVariant_product_Product = - { slug: string }; - -export type ProductEventSubscriptionFragment_ProductVariantBackInStock_productVariant_ProductVariant = - { - product: ProductEventSubscriptionFragment_ProductVariantBackInStock_productVariant_ProductVariant_product_Product; - }; - -export type ProductEventSubscriptionFragment_ProductVariantCreated_productVariant_ProductVariant_product_Product = - { slug: string }; - -export type ProductEventSubscriptionFragment_ProductVariantCreated_productVariant_ProductVariant = - { - product: ProductEventSubscriptionFragment_ProductVariantCreated_productVariant_ProductVariant_product_Product; - }; - -export type ProductEventSubscriptionFragment_ProductVariantDeleted_productVariant_ProductVariant_product_Product = - { slug: string }; - -export type ProductEventSubscriptionFragment_ProductVariantDeleted_productVariant_ProductVariant = - { - product: ProductEventSubscriptionFragment_ProductVariantDeleted_productVariant_ProductVariant_product_Product; - }; - -export type ProductEventSubscriptionFragment_ProductVariantMetadataUpdated_productVariant_ProductVariant_product_Product = - { slug: string }; - -export type ProductEventSubscriptionFragment_ProductVariantMetadataUpdated_productVariant_ProductVariant = - { - product: ProductEventSubscriptionFragment_ProductVariantMetadataUpdated_productVariant_ProductVariant_product_Product; - }; - -export type ProductEventSubscriptionFragment_ProductVariantOutOfStock_productVariant_ProductVariant_product_Product = - { slug: string }; - -export type ProductEventSubscriptionFragment_ProductVariantOutOfStock_productVariant_ProductVariant = - { - product: ProductEventSubscriptionFragment_ProductVariantOutOfStock_productVariant_ProductVariant_product_Product; - }; - -export type ProductEventSubscriptionFragment_ProductVariantStockUpdated_productVariant_ProductVariant_product_Product = - { slug: string }; - -export type ProductEventSubscriptionFragment_ProductVariantStockUpdated_productVariant_ProductVariant = - { - product: ProductEventSubscriptionFragment_ProductVariantStockUpdated_productVariant_ProductVariant_product_Product; - }; - -export type ProductEventSubscriptionFragment_ProductVariantUpdated_productVariant_ProductVariant_product_Product = - { slug: string }; - -export type ProductEventSubscriptionFragment_ProductVariantUpdated_productVariant_ProductVariant = - { - product: ProductEventSubscriptionFragment_ProductVariantUpdated_productVariant_ProductVariant_product_Product; - }; - -export type ProductEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s = - { - __typename: - | "AccountChangeEmailRequested" - | "AccountConfirmationRequested" - | "AccountConfirmed" - | "AccountDeleteRequested" - | "AccountDeleted" - | "AccountEmailChanged" - | "AccountSetPasswordRequested" - | "AddressCreated" - | "AddressDeleted" - | "AddressUpdated" - | "AppDeleted" - | "AppInstalled" - | "AppStatusChanged" - | "AppUpdated" - | "AttributeCreated" - | "AttributeDeleted" - | "AttributeUpdated" - | "AttributeValueCreated" - | "AttributeValueDeleted" - | "AttributeValueUpdated"; - }; - -export type ProductEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi = - { - __typename: - | "CalculateTaxes" - | "CategoryCreated" - | "CategoryDeleted" - | "CategoryUpdated" - | "ChannelCreated" - | "ChannelDeleted" - | "ChannelMetadataUpdated" - | "ChannelStatusChanged" - | "ChannelUpdated" - | "CheckoutCreated" - | "CheckoutFilterShippingMethods" - | "CheckoutFullyPaid" - | "CheckoutMetadataUpdated" - | "CheckoutUpdated" - | "CollectionCreated" - | "CollectionDeleted" - | "CollectionMetadataUpdated" - | "CollectionUpdated" - | "CustomerCreated" - | "CustomerMetadataUpdated"; - }; - -export type ProductEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc = - { - __typename: - | "CustomerUpdated" - | "DraftOrderCreated" - | "DraftOrderDeleted" - | "DraftOrderUpdated" - | "FulfillmentApproved" - | "FulfillmentCanceled" - | "FulfillmentCreated" - | "FulfillmentMetadataUpdated" - | "FulfillmentTrackingNumberUpdated" - | "GiftCardCreated" - | "GiftCardDeleted" - | "GiftCardExportCompleted" - | "GiftCardMetadataUpdated" - | "GiftCardSent" - | "GiftCardStatusChanged" - | "GiftCardUpdated" - | "InvoiceDeleted" - | "InvoiceRequested" - | "InvoiceSent" - | "ListStoredPaymentMethods"; - }; - -export type ProductEventSubscriptionFragment_IIttyh9obOk2HiNzq9wRoe2KykonejXScLlZcpen38 = - { - __typename: - | "MenuCreated" - | "MenuDeleted" - | "MenuItemCreated" - | "MenuItemDeleted" - | "MenuItemUpdated" - | "MenuUpdated" - | "OrderBulkCreated" - | "OrderCancelled" - | "OrderConfirmed" - | "OrderCreated" - | "OrderExpired" - | "OrderFilterShippingMethods" - | "OrderFulfilled" - | "OrderFullyPaid" - | "OrderFullyRefunded" - | "OrderMetadataUpdated" - | "OrderPaid" - | "OrderRefunded" - | "OrderUpdated" - | "PageCreated"; - }; - -export type ProductEventSubscriptionFragment_AH3BZpCszuOvBtBprYx65eaRIx5Joylb7Ve3GdBzgk = - { - __typename: - | "PageDeleted" - | "PageTypeCreated" - | "PageTypeDeleted" - | "PageTypeUpdated" - | "PageUpdated" - | "PaymentAuthorize" - | "PaymentCaptureEvent" - | "PaymentConfirmEvent" - | "PaymentGatewayInitializeSession" - | "PaymentGatewayInitializeTokenizationSession" - | "PaymentListGateways" - | "PaymentMethodInitializeTokenizationSession" - | "PaymentMethodProcessTokenizationSession" - | "PaymentProcessEvent" - | "PaymentRefundEvent" - | "PaymentVoidEvent" - | "PermissionGroupCreated" - | "PermissionGroupDeleted" - | "PermissionGroupUpdated" - | "ProductCreated"; - }; - -export type ProductEventSubscriptionFragment_EvFnHgkX6P7pzjiB5OWndOnCyOuSi5d6jGRaXUcoA = - { - __typename: - | "ProductExportCompleted" - | "PromotionCreated" - | "PromotionDeleted" - | "PromotionEnded" - | "PromotionRuleCreated" - | "PromotionRuleDeleted" - | "PromotionRuleUpdated" - | "PromotionStarted" - | "PromotionUpdated" - | "SaleCreated" - | "SaleDeleted" - | "SaleToggle" - | "SaleUpdated" - | "ShippingListMethodsForCheckout" - | "ShippingPriceCreated" - | "ShippingPriceDeleted" - | "ShippingPriceUpdated" - | "ShippingZoneCreated" - | "ShippingZoneDeleted" - | "ShippingZoneMetadataUpdated"; - }; - -export type ProductEventSubscriptionFragment_JHf7mHimOuDizDnHjb1xQ3HwEmj1W8kXDpiYpPrD2Fy = - { - __typename: - | "ShippingZoneUpdated" - | "ShopMetadataUpdated" - | "StaffCreated" - | "StaffDeleted" - | "StaffSetPasswordRequested" - | "StaffUpdated" - | "StoredPaymentMethodDeleteRequested" - | "ThumbnailCreated" - | "TransactionCancelationRequested" - | "TransactionChargeRequested" - | "TransactionInitializeSession" - | "TransactionItemMetadataUpdated" - | "TransactionProcessSession" - | "TransactionRefundRequested" - | "TranslationCreated" - | "TranslationUpdated" - | "VoucherCodeExportCompleted" - | "VoucherCodesCreated" - | "VoucherCodesDeleted" - | "VoucherCreated"; - }; - -export type ProductEventSubscriptionFragment_31FaXgouTQcpsEbEj1GRkTibOhoDnUtWAnhJoBn6k = - { - __typename: - | "VoucherDeleted" - | "VoucherMetadataUpdated" - | "VoucherUpdated" - | "WarehouseCreated" - | "WarehouseDeleted" - | "WarehouseMetadataUpdated" - | "WarehouseUpdated"; - }; - -export type ProductEventSubscriptionFragment_ProductDeleted = { - product: ProductEventSubscriptionFragment_ProductDeleted_product_Product | null; -} & { __typename: "ProductDeleted" }; - -export type ProductEventSubscriptionFragment_ProductMediaCreated = { - productMedia: ProductEventSubscriptionFragment_ProductMediaCreated_productMedia_ProductMedia | null; -} & { __typename: "ProductMediaCreated" }; - -export type ProductEventSubscriptionFragment_ProductMediaDeleted = { - productMedia: ProductEventSubscriptionFragment_ProductMediaDeleted_productMedia_ProductMedia | null; -} & { __typename: "ProductMediaDeleted" }; - -export type ProductEventSubscriptionFragment_ProductMediaUpdated = { - productMedia: ProductEventSubscriptionFragment_ProductMediaUpdated_productMedia_ProductMedia | null; -} & { __typename: "ProductMediaUpdated" }; - -export type ProductEventSubscriptionFragment_ProductMetadataUpdated = { - product: ProductEventSubscriptionFragment_ProductMetadataUpdated_product_Product | null; -} & { __typename: "ProductMetadataUpdated" }; - -export type ProductEventSubscriptionFragment_ProductUpdated = { - product: ProductEventSubscriptionFragment_ProductUpdated_product_Product | null; -} & { __typename: "ProductUpdated" }; - -export type ProductEventSubscriptionFragment_ProductVariantBackInStock = { - productVariant: ProductEventSubscriptionFragment_ProductVariantBackInStock_productVariant_ProductVariant | null; -} & { __typename: "ProductVariantBackInStock" }; - -export type ProductEventSubscriptionFragment_ProductVariantCreated = { - productVariant: ProductEventSubscriptionFragment_ProductVariantCreated_productVariant_ProductVariant | null; -} & { __typename: "ProductVariantCreated" }; - -export type ProductEventSubscriptionFragment_ProductVariantDeleted = { - productVariant: ProductEventSubscriptionFragment_ProductVariantDeleted_productVariant_ProductVariant | null; -} & { __typename: "ProductVariantDeleted" }; - -export type ProductEventSubscriptionFragment_ProductVariantMetadataUpdated = { - productVariant: ProductEventSubscriptionFragment_ProductVariantMetadataUpdated_productVariant_ProductVariant | null; -} & { __typename: "ProductVariantMetadataUpdated" }; - -export type ProductEventSubscriptionFragment_ProductVariantOutOfStock = { - productVariant: ProductEventSubscriptionFragment_ProductVariantOutOfStock_productVariant_ProductVariant | null; -} & { __typename: "ProductVariantOutOfStock" }; - -export type ProductEventSubscriptionFragment_ProductVariantStockUpdated = { - productVariant: ProductEventSubscriptionFragment_ProductVariantStockUpdated_productVariant_ProductVariant | null; -} & { __typename: "ProductVariantStockUpdated" }; - -export type ProductEventSubscriptionFragment_ProductVariantUpdated = { - productVariant: ProductEventSubscriptionFragment_ProductVariantUpdated_productVariant_ProductVariant | null; -} & { __typename: "ProductVariantUpdated" }; - -export type ProductEventSubscriptionFragment = - | ProductEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s - | ProductEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi - | ProductEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc - | ProductEventSubscriptionFragment_IIttyh9obOk2HiNzq9wRoe2KykonejXScLlZcpen38 - | ProductEventSubscriptionFragment_AH3BZpCszuOvBtBprYx65eaRIx5Joylb7Ve3GdBzgk - | ProductEventSubscriptionFragment_EvFnHgkX6P7pzjiB5OWndOnCyOuSi5d6jGRaXUcoA - | ProductEventSubscriptionFragment_JHf7mHimOuDizDnHjb1xQ3HwEmj1W8kXDpiYpPrD2Fy - | ProductEventSubscriptionFragment_31FaXgouTQcpsEbEj1GRkTibOhoDnUtWAnhJoBn6k - | ProductEventSubscriptionFragment_ProductDeleted - | ProductEventSubscriptionFragment_ProductMediaCreated - | ProductEventSubscriptionFragment_ProductMediaDeleted - | ProductEventSubscriptionFragment_ProductMediaUpdated - | ProductEventSubscriptionFragment_ProductMetadataUpdated - | ProductEventSubscriptionFragment_ProductUpdated - | ProductEventSubscriptionFragment_ProductVariantBackInStock - | ProductEventSubscriptionFragment_ProductVariantCreated - | ProductEventSubscriptionFragment_ProductVariantDeleted - | ProductEventSubscriptionFragment_ProductVariantMetadataUpdated - | ProductEventSubscriptionFragment_ProductVariantOutOfStock - | ProductEventSubscriptionFragment_ProductVariantStockUpdated - | ProductEventSubscriptionFragment_ProductVariantUpdated; - -export type TaxedMoney_TaxedMoney_net_Money = { - currency: string; - amount: number; -}; - -export type TaxedMoney_TaxedMoney_gross_Money = { - currency: string; - amount: number; -}; - -export type TaxedMoney_TaxedMoney_tax_Money = { - currency: string; - amount: number; -}; - -export type TaxedMoney = { - net: TaxedMoney_TaxedMoney_net_Money; - gross: TaxedMoney_TaxedMoney_gross_Money; - tax: TaxedMoney_TaxedMoney_tax_Money; -}; +import type * as Types from '@nimara/codegen/schema'; + +import type { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; +export type MenuEventSubscriptionFragment_MenuCreated_menu_Menu = { slug: string }; + +export type MenuEventSubscriptionFragment_MenuDeleted_menu_Menu = { slug: string }; + +export type MenuEventSubscriptionFragment_MenuItemCreated_menuItem_MenuItem_menu_Menu = { slug: string }; + +export type MenuEventSubscriptionFragment_MenuItemCreated_menuItem_MenuItem = { menu: MenuEventSubscriptionFragment_MenuItemCreated_menuItem_MenuItem_menu_Menu }; + +export type MenuEventSubscriptionFragment_MenuItemDeleted_menuItem_MenuItem_menu_Menu = { slug: string }; + +export type MenuEventSubscriptionFragment_MenuItemDeleted_menuItem_MenuItem = { menu: MenuEventSubscriptionFragment_MenuItemDeleted_menuItem_MenuItem_menu_Menu }; + +export type MenuEventSubscriptionFragment_MenuItemUpdated_menuItem_MenuItem_menu_Menu = { slug: string }; + +export type MenuEventSubscriptionFragment_MenuItemUpdated_menuItem_MenuItem = { menu: MenuEventSubscriptionFragment_MenuItemUpdated_menuItem_MenuItem_menu_Menu }; + +export type MenuEventSubscriptionFragment_MenuUpdated_menu_Menu = { slug: string }; + +export type MenuEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s = { __typename: 'AccountChangeEmailRequested' | 'AccountConfirmationRequested' | 'AccountConfirmed' | 'AccountDeleteRequested' | 'AccountDeleted' | 'AccountEmailChanged' | 'AccountSetPasswordRequested' | 'AddressCreated' | 'AddressDeleted' | 'AddressUpdated' | 'AppDeleted' | 'AppInstalled' | 'AppStatusChanged' | 'AppUpdated' | 'AttributeCreated' | 'AttributeDeleted' | 'AttributeUpdated' | 'AttributeValueCreated' | 'AttributeValueDeleted' | 'AttributeValueUpdated' }; + +export type MenuEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi = { __typename: 'CalculateTaxes' | 'CategoryCreated' | 'CategoryDeleted' | 'CategoryUpdated' | 'ChannelCreated' | 'ChannelDeleted' | 'ChannelMetadataUpdated' | 'ChannelStatusChanged' | 'ChannelUpdated' | 'CheckoutCreated' | 'CheckoutFilterShippingMethods' | 'CheckoutFullyPaid' | 'CheckoutMetadataUpdated' | 'CheckoutUpdated' | 'CollectionCreated' | 'CollectionDeleted' | 'CollectionMetadataUpdated' | 'CollectionUpdated' | 'CustomerCreated' | 'CustomerMetadataUpdated' }; + +export type MenuEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc = { __typename: 'CustomerUpdated' | 'DraftOrderCreated' | 'DraftOrderDeleted' | 'DraftOrderUpdated' | 'FulfillmentApproved' | 'FulfillmentCanceled' | 'FulfillmentCreated' | 'FulfillmentMetadataUpdated' | 'FulfillmentTrackingNumberUpdated' | 'GiftCardCreated' | 'GiftCardDeleted' | 'GiftCardExportCompleted' | 'GiftCardMetadataUpdated' | 'GiftCardSent' | 'GiftCardStatusChanged' | 'GiftCardUpdated' | 'InvoiceDeleted' | 'InvoiceRequested' | 'InvoiceSent' | 'ListStoredPaymentMethods' }; + +export type MenuEventSubscriptionFragment_YPBc8Fb7zCwJHzmQq3eEe6vg8QVjucSZas0RkBvRw = { __typename: 'OrderBulkCreated' | 'OrderCancelled' | 'OrderConfirmed' | 'OrderCreated' | 'OrderExpired' | 'OrderFilterShippingMethods' | 'OrderFulfilled' | 'OrderFullyPaid' | 'OrderFullyRefunded' | 'OrderMetadataUpdated' | 'OrderPaid' | 'OrderRefunded' | 'OrderUpdated' | 'PageCreated' | 'PageDeleted' | 'PageTypeCreated' | 'PageTypeDeleted' | 'PageTypeUpdated' | 'PageUpdated' | 'PaymentAuthorize' }; + +export type MenuEventSubscriptionFragment_HezzdL7zxss93HwVi8tlZ0cHDsAaHlrfWxRRlz93Zzk = { __typename: 'PaymentCaptureEvent' | 'PaymentConfirmEvent' | 'PaymentGatewayInitializeSession' | 'PaymentGatewayInitializeTokenizationSession' | 'PaymentListGateways' | 'PaymentMethodInitializeTokenizationSession' | 'PaymentMethodProcessTokenizationSession' | 'PaymentProcessEvent' | 'PaymentRefundEvent' | 'PaymentVoidEvent' | 'PermissionGroupCreated' | 'PermissionGroupDeleted' | 'PermissionGroupUpdated' | 'ProductCreated' | 'ProductDeleted' | 'ProductExportCompleted' | 'ProductMediaCreated' | 'ProductMediaDeleted' | 'ProductMediaUpdated' | 'ProductMetadataUpdated' }; + +export type MenuEventSubscriptionFragment_3wM2nJglZysZqyXe2PXv7dgg5ra3r2CqLh0G03sc = { __typename: 'ProductUpdated' | 'ProductVariantBackInStock' | 'ProductVariantCreated' | 'ProductVariantDeleted' | 'ProductVariantMetadataUpdated' | 'ProductVariantOutOfStock' | 'ProductVariantStockUpdated' | 'ProductVariantUpdated' | 'PromotionCreated' | 'PromotionDeleted' | 'PromotionEnded' | 'PromotionRuleCreated' | 'PromotionRuleDeleted' | 'PromotionRuleUpdated' | 'PromotionStarted' | 'PromotionUpdated' | 'SaleCreated' | 'SaleDeleted' | 'SaleToggle' | 'SaleUpdated' }; + +export type MenuEventSubscriptionFragment_C3zANrKmQj4BCk0zTQanbiWn8nIAzXKzJqHd4o3iO4 = { __typename: 'ShippingListMethodsForCheckout' | 'ShippingPriceCreated' | 'ShippingPriceDeleted' | 'ShippingPriceUpdated' | 'ShippingZoneCreated' | 'ShippingZoneDeleted' | 'ShippingZoneMetadataUpdated' | 'ShippingZoneUpdated' | 'ShopMetadataUpdated' | 'StaffCreated' | 'StaffDeleted' | 'StaffSetPasswordRequested' | 'StaffUpdated' | 'StoredPaymentMethodDeleteRequested' | 'ThumbnailCreated' | 'TransactionCancelationRequested' | 'TransactionChargeRequested' | 'TransactionInitializeSession' | 'TransactionItemMetadataUpdated' | 'TransactionProcessSession' }; + +export type MenuEventSubscriptionFragment_6nSTrout1sXuRsQxm391yzMyp6EmS8Np4Fh4jhvgns = { __typename: 'TransactionRefundRequested' | 'TranslationCreated' | 'TranslationUpdated' | 'VoucherCodeExportCompleted' | 'VoucherCodesCreated' | 'VoucherCodesDeleted' | 'VoucherCreated' | 'VoucherDeleted' | 'VoucherMetadataUpdated' | 'VoucherUpdated' | 'WarehouseCreated' | 'WarehouseDeleted' | 'WarehouseMetadataUpdated' | 'WarehouseUpdated' }; + +export type MenuEventSubscriptionFragment_MenuCreated = ( + { menu: MenuEventSubscriptionFragment_MenuCreated_menu_Menu | null } + & { __typename: 'MenuCreated' } +); + +export type MenuEventSubscriptionFragment_MenuDeleted = ( + { menu: MenuEventSubscriptionFragment_MenuDeleted_menu_Menu | null } + & { __typename: 'MenuDeleted' } +); + +export type MenuEventSubscriptionFragment_MenuItemCreated = ( + { menuItem: MenuEventSubscriptionFragment_MenuItemCreated_menuItem_MenuItem | null } + & { __typename: 'MenuItemCreated' } +); + +export type MenuEventSubscriptionFragment_MenuItemDeleted = ( + { menuItem: MenuEventSubscriptionFragment_MenuItemDeleted_menuItem_MenuItem | null } + & { __typename: 'MenuItemDeleted' } +); + +export type MenuEventSubscriptionFragment_MenuItemUpdated = ( + { menuItem: MenuEventSubscriptionFragment_MenuItemUpdated_menuItem_MenuItem | null } + & { __typename: 'MenuItemUpdated' } +); + +export type MenuEventSubscriptionFragment_MenuUpdated = ( + { menu: MenuEventSubscriptionFragment_MenuUpdated_menu_Menu | null } + & { __typename: 'MenuUpdated' } +); + +export type MenuEventSubscriptionFragment = MenuEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s | MenuEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi | MenuEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc | MenuEventSubscriptionFragment_YPBc8Fb7zCwJHzmQq3eEe6vg8QVjucSZas0RkBvRw | MenuEventSubscriptionFragment_HezzdL7zxss93HwVi8tlZ0cHDsAaHlrfWxRRlz93Zzk | MenuEventSubscriptionFragment_3wM2nJglZysZqyXe2PXv7dgg5ra3r2CqLh0G03sc | MenuEventSubscriptionFragment_C3zANrKmQj4BCk0zTQanbiWn8nIAzXKzJqHd4o3iO4 | MenuEventSubscriptionFragment_6nSTrout1sXuRsQxm391yzMyp6EmS8Np4Fh4jhvgns | MenuEventSubscriptionFragment_MenuCreated | MenuEventSubscriptionFragment_MenuDeleted | MenuEventSubscriptionFragment_MenuItemCreated | MenuEventSubscriptionFragment_MenuItemDeleted | MenuEventSubscriptionFragment_MenuItemUpdated | MenuEventSubscriptionFragment_MenuUpdated; + +export type Money = { currency: string, amount: number }; + +export type PageEventSubscriptionFragment_PageCreated_page_Page = { slug: string }; + +export type PageEventSubscriptionFragment_PageDeleted_page_Page = { slug: string }; + +export type PageEventSubscriptionFragment_PageTypeCreated_pageType_PageType = { slug: string }; + +export type PageEventSubscriptionFragment_PageTypeDeleted_pageType_PageType = { slug: string }; + +export type PageEventSubscriptionFragment_PageTypeUpdated_pageType_PageType = { slug: string }; + +export type PageEventSubscriptionFragment_PageUpdated_page_Page = { slug: string }; + +export type PageEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s = { __typename: 'AccountChangeEmailRequested' | 'AccountConfirmationRequested' | 'AccountConfirmed' | 'AccountDeleteRequested' | 'AccountDeleted' | 'AccountEmailChanged' | 'AccountSetPasswordRequested' | 'AddressCreated' | 'AddressDeleted' | 'AddressUpdated' | 'AppDeleted' | 'AppInstalled' | 'AppStatusChanged' | 'AppUpdated' | 'AttributeCreated' | 'AttributeDeleted' | 'AttributeUpdated' | 'AttributeValueCreated' | 'AttributeValueDeleted' | 'AttributeValueUpdated' }; + +export type PageEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi = { __typename: 'CalculateTaxes' | 'CategoryCreated' | 'CategoryDeleted' | 'CategoryUpdated' | 'ChannelCreated' | 'ChannelDeleted' | 'ChannelMetadataUpdated' | 'ChannelStatusChanged' | 'ChannelUpdated' | 'CheckoutCreated' | 'CheckoutFilterShippingMethods' | 'CheckoutFullyPaid' | 'CheckoutMetadataUpdated' | 'CheckoutUpdated' | 'CollectionCreated' | 'CollectionDeleted' | 'CollectionMetadataUpdated' | 'CollectionUpdated' | 'CustomerCreated' | 'CustomerMetadataUpdated' }; + +export type PageEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc = { __typename: 'CustomerUpdated' | 'DraftOrderCreated' | 'DraftOrderDeleted' | 'DraftOrderUpdated' | 'FulfillmentApproved' | 'FulfillmentCanceled' | 'FulfillmentCreated' | 'FulfillmentMetadataUpdated' | 'FulfillmentTrackingNumberUpdated' | 'GiftCardCreated' | 'GiftCardDeleted' | 'GiftCardExportCompleted' | 'GiftCardMetadataUpdated' | 'GiftCardSent' | 'GiftCardStatusChanged' | 'GiftCardUpdated' | 'InvoiceDeleted' | 'InvoiceRequested' | 'InvoiceSent' | 'ListStoredPaymentMethods' }; + +export type PageEventSubscriptionFragment_ScBspfyBrxPcHRwpBe5ZtJu4sXvFlHuN0Vv5mTMah4 = { __typename: 'MenuCreated' | 'MenuDeleted' | 'MenuItemCreated' | 'MenuItemDeleted' | 'MenuItemUpdated' | 'MenuUpdated' | 'OrderBulkCreated' | 'OrderCancelled' | 'OrderConfirmed' | 'OrderCreated' | 'OrderExpired' | 'OrderFilterShippingMethods' | 'OrderFulfilled' | 'OrderFullyPaid' | 'OrderFullyRefunded' | 'OrderMetadataUpdated' | 'OrderPaid' | 'OrderRefunded' | 'OrderUpdated' | 'PaymentAuthorize' }; + +export type PageEventSubscriptionFragment_HezzdL7zxss93HwVi8tlZ0cHDsAaHlrfWxRRlz93Zzk = { __typename: 'PaymentCaptureEvent' | 'PaymentConfirmEvent' | 'PaymentGatewayInitializeSession' | 'PaymentGatewayInitializeTokenizationSession' | 'PaymentListGateways' | 'PaymentMethodInitializeTokenizationSession' | 'PaymentMethodProcessTokenizationSession' | 'PaymentProcessEvent' | 'PaymentRefundEvent' | 'PaymentVoidEvent' | 'PermissionGroupCreated' | 'PermissionGroupDeleted' | 'PermissionGroupUpdated' | 'ProductCreated' | 'ProductDeleted' | 'ProductExportCompleted' | 'ProductMediaCreated' | 'ProductMediaDeleted' | 'ProductMediaUpdated' | 'ProductMetadataUpdated' }; + +export type PageEventSubscriptionFragment_3wM2nJglZysZqyXe2PXv7dgg5ra3r2CqLh0G03sc = { __typename: 'ProductUpdated' | 'ProductVariantBackInStock' | 'ProductVariantCreated' | 'ProductVariantDeleted' | 'ProductVariantMetadataUpdated' | 'ProductVariantOutOfStock' | 'ProductVariantStockUpdated' | 'ProductVariantUpdated' | 'PromotionCreated' | 'PromotionDeleted' | 'PromotionEnded' | 'PromotionRuleCreated' | 'PromotionRuleDeleted' | 'PromotionRuleUpdated' | 'PromotionStarted' | 'PromotionUpdated' | 'SaleCreated' | 'SaleDeleted' | 'SaleToggle' | 'SaleUpdated' }; + +export type PageEventSubscriptionFragment_C3zANrKmQj4BCk0zTQanbiWn8nIAzXKzJqHd4o3iO4 = { __typename: 'ShippingListMethodsForCheckout' | 'ShippingPriceCreated' | 'ShippingPriceDeleted' | 'ShippingPriceUpdated' | 'ShippingZoneCreated' | 'ShippingZoneDeleted' | 'ShippingZoneMetadataUpdated' | 'ShippingZoneUpdated' | 'ShopMetadataUpdated' | 'StaffCreated' | 'StaffDeleted' | 'StaffSetPasswordRequested' | 'StaffUpdated' | 'StoredPaymentMethodDeleteRequested' | 'ThumbnailCreated' | 'TransactionCancelationRequested' | 'TransactionChargeRequested' | 'TransactionInitializeSession' | 'TransactionItemMetadataUpdated' | 'TransactionProcessSession' }; + +export type PageEventSubscriptionFragment_6nSTrout1sXuRsQxm391yzMyp6EmS8Np4Fh4jhvgns = { __typename: 'TransactionRefundRequested' | 'TranslationCreated' | 'TranslationUpdated' | 'VoucherCodeExportCompleted' | 'VoucherCodesCreated' | 'VoucherCodesDeleted' | 'VoucherCreated' | 'VoucherDeleted' | 'VoucherMetadataUpdated' | 'VoucherUpdated' | 'WarehouseCreated' | 'WarehouseDeleted' | 'WarehouseMetadataUpdated' | 'WarehouseUpdated' }; + +export type PageEventSubscriptionFragment_PageCreated = ( + { page: PageEventSubscriptionFragment_PageCreated_page_Page | null } + & { __typename: 'PageCreated' } +); + +export type PageEventSubscriptionFragment_PageDeleted = ( + { page: PageEventSubscriptionFragment_PageDeleted_page_Page | null } + & { __typename: 'PageDeleted' } +); + +export type PageEventSubscriptionFragment_PageTypeCreated = ( + { pageType: PageEventSubscriptionFragment_PageTypeCreated_pageType_PageType | null } + & { __typename: 'PageTypeCreated' } +); + +export type PageEventSubscriptionFragment_PageTypeDeleted = ( + { pageType: PageEventSubscriptionFragment_PageTypeDeleted_pageType_PageType | null } + & { __typename: 'PageTypeDeleted' } +); + +export type PageEventSubscriptionFragment_PageTypeUpdated = ( + { pageType: PageEventSubscriptionFragment_PageTypeUpdated_pageType_PageType | null } + & { __typename: 'PageTypeUpdated' } +); + +export type PageEventSubscriptionFragment_PageUpdated = ( + { page: PageEventSubscriptionFragment_PageUpdated_page_Page | null } + & { __typename: 'PageUpdated' } +); + +export type PageEventSubscriptionFragment = PageEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s | PageEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi | PageEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc | PageEventSubscriptionFragment_ScBspfyBrxPcHRwpBe5ZtJu4sXvFlHuN0Vv5mTMah4 | PageEventSubscriptionFragment_HezzdL7zxss93HwVi8tlZ0cHDsAaHlrfWxRRlz93Zzk | PageEventSubscriptionFragment_3wM2nJglZysZqyXe2PXv7dgg5ra3r2CqLh0G03sc | PageEventSubscriptionFragment_C3zANrKmQj4BCk0zTQanbiWn8nIAzXKzJqHd4o3iO4 | PageEventSubscriptionFragment_6nSTrout1sXuRsQxm391yzMyp6EmS8Np4Fh4jhvgns | PageEventSubscriptionFragment_PageCreated | PageEventSubscriptionFragment_PageDeleted | PageEventSubscriptionFragment_PageTypeCreated | PageEventSubscriptionFragment_PageTypeDeleted | PageEventSubscriptionFragment_PageTypeUpdated | PageEventSubscriptionFragment_PageUpdated; + +export type ProductEventSubscriptionFragment_ProductDeleted_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductMediaCreated_productMedia_ProductMedia = { productId: string | null }; + +export type ProductEventSubscriptionFragment_ProductMediaDeleted_productMedia_ProductMedia = { productId: string | null }; + +export type ProductEventSubscriptionFragment_ProductMediaUpdated_productMedia_ProductMedia = { productId: string | null }; + +export type ProductEventSubscriptionFragment_ProductMetadataUpdated_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductUpdated_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductVariantBackInStock_productVariant_ProductVariant_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductVariantBackInStock_productVariant_ProductVariant = { product: ProductEventSubscriptionFragment_ProductVariantBackInStock_productVariant_ProductVariant_product_Product }; + +export type ProductEventSubscriptionFragment_ProductVariantCreated_productVariant_ProductVariant_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductVariantCreated_productVariant_ProductVariant = { product: ProductEventSubscriptionFragment_ProductVariantCreated_productVariant_ProductVariant_product_Product }; + +export type ProductEventSubscriptionFragment_ProductVariantDeleted_productVariant_ProductVariant_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductVariantDeleted_productVariant_ProductVariant = { product: ProductEventSubscriptionFragment_ProductVariantDeleted_productVariant_ProductVariant_product_Product }; + +export type ProductEventSubscriptionFragment_ProductVariantMetadataUpdated_productVariant_ProductVariant_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductVariantMetadataUpdated_productVariant_ProductVariant = { product: ProductEventSubscriptionFragment_ProductVariantMetadataUpdated_productVariant_ProductVariant_product_Product }; + +export type ProductEventSubscriptionFragment_ProductVariantOutOfStock_productVariant_ProductVariant_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductVariantOutOfStock_productVariant_ProductVariant = { product: ProductEventSubscriptionFragment_ProductVariantOutOfStock_productVariant_ProductVariant_product_Product }; + +export type ProductEventSubscriptionFragment_ProductVariantStockUpdated_productVariant_ProductVariant_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductVariantStockUpdated_productVariant_ProductVariant = { product: ProductEventSubscriptionFragment_ProductVariantStockUpdated_productVariant_ProductVariant_product_Product }; + +export type ProductEventSubscriptionFragment_ProductVariantUpdated_productVariant_ProductVariant_product_Product = { slug: string }; + +export type ProductEventSubscriptionFragment_ProductVariantUpdated_productVariant_ProductVariant = { product: ProductEventSubscriptionFragment_ProductVariantUpdated_productVariant_ProductVariant_product_Product }; + +export type ProductEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s = { __typename: 'AccountChangeEmailRequested' | 'AccountConfirmationRequested' | 'AccountConfirmed' | 'AccountDeleteRequested' | 'AccountDeleted' | 'AccountEmailChanged' | 'AccountSetPasswordRequested' | 'AddressCreated' | 'AddressDeleted' | 'AddressUpdated' | 'AppDeleted' | 'AppInstalled' | 'AppStatusChanged' | 'AppUpdated' | 'AttributeCreated' | 'AttributeDeleted' | 'AttributeUpdated' | 'AttributeValueCreated' | 'AttributeValueDeleted' | 'AttributeValueUpdated' }; + +export type ProductEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi = { __typename: 'CalculateTaxes' | 'CategoryCreated' | 'CategoryDeleted' | 'CategoryUpdated' | 'ChannelCreated' | 'ChannelDeleted' | 'ChannelMetadataUpdated' | 'ChannelStatusChanged' | 'ChannelUpdated' | 'CheckoutCreated' | 'CheckoutFilterShippingMethods' | 'CheckoutFullyPaid' | 'CheckoutMetadataUpdated' | 'CheckoutUpdated' | 'CollectionCreated' | 'CollectionDeleted' | 'CollectionMetadataUpdated' | 'CollectionUpdated' | 'CustomerCreated' | 'CustomerMetadataUpdated' }; + +export type ProductEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc = { __typename: 'CustomerUpdated' | 'DraftOrderCreated' | 'DraftOrderDeleted' | 'DraftOrderUpdated' | 'FulfillmentApproved' | 'FulfillmentCanceled' | 'FulfillmentCreated' | 'FulfillmentMetadataUpdated' | 'FulfillmentTrackingNumberUpdated' | 'GiftCardCreated' | 'GiftCardDeleted' | 'GiftCardExportCompleted' | 'GiftCardMetadataUpdated' | 'GiftCardSent' | 'GiftCardStatusChanged' | 'GiftCardUpdated' | 'InvoiceDeleted' | 'InvoiceRequested' | 'InvoiceSent' | 'ListStoredPaymentMethods' }; + +export type ProductEventSubscriptionFragment_IIttyh9obOk2HiNzq9wRoe2KykonejXScLlZcpen38 = { __typename: 'MenuCreated' | 'MenuDeleted' | 'MenuItemCreated' | 'MenuItemDeleted' | 'MenuItemUpdated' | 'MenuUpdated' | 'OrderBulkCreated' | 'OrderCancelled' | 'OrderConfirmed' | 'OrderCreated' | 'OrderExpired' | 'OrderFilterShippingMethods' | 'OrderFulfilled' | 'OrderFullyPaid' | 'OrderFullyRefunded' | 'OrderMetadataUpdated' | 'OrderPaid' | 'OrderRefunded' | 'OrderUpdated' | 'PageCreated' }; + +export type ProductEventSubscriptionFragment_AH3BZpCszuOvBtBprYx65eaRIx5Joylb7Ve3GdBzgk = { __typename: 'PageDeleted' | 'PageTypeCreated' | 'PageTypeDeleted' | 'PageTypeUpdated' | 'PageUpdated' | 'PaymentAuthorize' | 'PaymentCaptureEvent' | 'PaymentConfirmEvent' | 'PaymentGatewayInitializeSession' | 'PaymentGatewayInitializeTokenizationSession' | 'PaymentListGateways' | 'PaymentMethodInitializeTokenizationSession' | 'PaymentMethodProcessTokenizationSession' | 'PaymentProcessEvent' | 'PaymentRefundEvent' | 'PaymentVoidEvent' | 'PermissionGroupCreated' | 'PermissionGroupDeleted' | 'PermissionGroupUpdated' | 'ProductCreated' }; + +export type ProductEventSubscriptionFragment_EvFnHgkX6P7pzjiB5OWndOnCyOuSi5d6jGRaXUcoA = { __typename: 'ProductExportCompleted' | 'PromotionCreated' | 'PromotionDeleted' | 'PromotionEnded' | 'PromotionRuleCreated' | 'PromotionRuleDeleted' | 'PromotionRuleUpdated' | 'PromotionStarted' | 'PromotionUpdated' | 'SaleCreated' | 'SaleDeleted' | 'SaleToggle' | 'SaleUpdated' | 'ShippingListMethodsForCheckout' | 'ShippingPriceCreated' | 'ShippingPriceDeleted' | 'ShippingPriceUpdated' | 'ShippingZoneCreated' | 'ShippingZoneDeleted' | 'ShippingZoneMetadataUpdated' }; + +export type ProductEventSubscriptionFragment_JHf7mHimOuDizDnHjb1xQ3HwEmj1W8kXDpiYpPrD2Fy = { __typename: 'ShippingZoneUpdated' | 'ShopMetadataUpdated' | 'StaffCreated' | 'StaffDeleted' | 'StaffSetPasswordRequested' | 'StaffUpdated' | 'StoredPaymentMethodDeleteRequested' | 'ThumbnailCreated' | 'TransactionCancelationRequested' | 'TransactionChargeRequested' | 'TransactionInitializeSession' | 'TransactionItemMetadataUpdated' | 'TransactionProcessSession' | 'TransactionRefundRequested' | 'TranslationCreated' | 'TranslationUpdated' | 'VoucherCodeExportCompleted' | 'VoucherCodesCreated' | 'VoucherCodesDeleted' | 'VoucherCreated' }; + +export type ProductEventSubscriptionFragment_31FaXgouTQcpsEbEj1GRkTibOhoDnUtWAnhJoBn6k = { __typename: 'VoucherDeleted' | 'VoucherMetadataUpdated' | 'VoucherUpdated' | 'WarehouseCreated' | 'WarehouseDeleted' | 'WarehouseMetadataUpdated' | 'WarehouseUpdated' }; + +export type ProductEventSubscriptionFragment_ProductDeleted = ( + { product: ProductEventSubscriptionFragment_ProductDeleted_product_Product | null } + & { __typename: 'ProductDeleted' } +); + +export type ProductEventSubscriptionFragment_ProductMediaCreated = ( + { productMedia: ProductEventSubscriptionFragment_ProductMediaCreated_productMedia_ProductMedia | null } + & { __typename: 'ProductMediaCreated' } +); + +export type ProductEventSubscriptionFragment_ProductMediaDeleted = ( + { productMedia: ProductEventSubscriptionFragment_ProductMediaDeleted_productMedia_ProductMedia | null } + & { __typename: 'ProductMediaDeleted' } +); + +export type ProductEventSubscriptionFragment_ProductMediaUpdated = ( + { productMedia: ProductEventSubscriptionFragment_ProductMediaUpdated_productMedia_ProductMedia | null } + & { __typename: 'ProductMediaUpdated' } +); + +export type ProductEventSubscriptionFragment_ProductMetadataUpdated = ( + { product: ProductEventSubscriptionFragment_ProductMetadataUpdated_product_Product | null } + & { __typename: 'ProductMetadataUpdated' } +); + +export type ProductEventSubscriptionFragment_ProductUpdated = ( + { product: ProductEventSubscriptionFragment_ProductUpdated_product_Product | null } + & { __typename: 'ProductUpdated' } +); + +export type ProductEventSubscriptionFragment_ProductVariantBackInStock = ( + { productVariant: ProductEventSubscriptionFragment_ProductVariantBackInStock_productVariant_ProductVariant | null } + & { __typename: 'ProductVariantBackInStock' } +); + +export type ProductEventSubscriptionFragment_ProductVariantCreated = ( + { productVariant: ProductEventSubscriptionFragment_ProductVariantCreated_productVariant_ProductVariant | null } + & { __typename: 'ProductVariantCreated' } +); + +export type ProductEventSubscriptionFragment_ProductVariantDeleted = ( + { productVariant: ProductEventSubscriptionFragment_ProductVariantDeleted_productVariant_ProductVariant | null } + & { __typename: 'ProductVariantDeleted' } +); + +export type ProductEventSubscriptionFragment_ProductVariantMetadataUpdated = ( + { productVariant: ProductEventSubscriptionFragment_ProductVariantMetadataUpdated_productVariant_ProductVariant | null } + & { __typename: 'ProductVariantMetadataUpdated' } +); + +export type ProductEventSubscriptionFragment_ProductVariantOutOfStock = ( + { productVariant: ProductEventSubscriptionFragment_ProductVariantOutOfStock_productVariant_ProductVariant | null } + & { __typename: 'ProductVariantOutOfStock' } +); + +export type ProductEventSubscriptionFragment_ProductVariantStockUpdated = ( + { productVariant: ProductEventSubscriptionFragment_ProductVariantStockUpdated_productVariant_ProductVariant | null } + & { __typename: 'ProductVariantStockUpdated' } +); + +export type ProductEventSubscriptionFragment_ProductVariantUpdated = ( + { productVariant: ProductEventSubscriptionFragment_ProductVariantUpdated_productVariant_ProductVariant | null } + & { __typename: 'ProductVariantUpdated' } +); + +export type ProductEventSubscriptionFragment = ProductEventSubscriptionFragment_Uchm3Qz7YjEsQhTMfPIk01DEzLiWluHMnX4k1L6Dt0s | ProductEventSubscriptionFragment_QJpVopnj9tAw174uVjo0KxVhwcLOzKKnfYk3kiIjlRi | ProductEventSubscriptionFragment_JmEtZQo0d9WfwXdErwExR3cyw1iBd2N3dSKfWlpIxc | ProductEventSubscriptionFragment_IIttyh9obOk2HiNzq9wRoe2KykonejXScLlZcpen38 | ProductEventSubscriptionFragment_AH3BZpCszuOvBtBprYx65eaRIx5Joylb7Ve3GdBzgk | ProductEventSubscriptionFragment_EvFnHgkX6P7pzjiB5OWndOnCyOuSi5d6jGRaXUcoA | ProductEventSubscriptionFragment_JHf7mHimOuDizDnHjb1xQ3HwEmj1W8kXDpiYpPrD2Fy | ProductEventSubscriptionFragment_31FaXgouTQcpsEbEj1GRkTibOhoDnUtWAnhJoBn6k | ProductEventSubscriptionFragment_ProductDeleted | ProductEventSubscriptionFragment_ProductMediaCreated | ProductEventSubscriptionFragment_ProductMediaDeleted | ProductEventSubscriptionFragment_ProductMediaUpdated | ProductEventSubscriptionFragment_ProductMetadataUpdated | ProductEventSubscriptionFragment_ProductUpdated | ProductEventSubscriptionFragment_ProductVariantBackInStock | ProductEventSubscriptionFragment_ProductVariantCreated | ProductEventSubscriptionFragment_ProductVariantDeleted | ProductEventSubscriptionFragment_ProductVariantMetadataUpdated | ProductEventSubscriptionFragment_ProductVariantOutOfStock | ProductEventSubscriptionFragment_ProductVariantStockUpdated | ProductEventSubscriptionFragment_ProductVariantUpdated; + +export type TaxedMoney_TaxedMoney_net_Money = { currency: string, amount: number }; + +export type TaxedMoney_TaxedMoney_gross_Money = { currency: string, amount: number }; + +export type TaxedMoney_TaxedMoney_tax_Money = { currency: string, amount: number }; + +export type TaxedMoney = { net: TaxedMoney_TaxedMoney_net_Money, gross: TaxedMoney_TaxedMoney_gross_Money, tax: TaxedMoney_TaxedMoney_tax_Money }; export class TypedDocumentString extends String implements DocumentTypeDecoration { - __apiType?: DocumentTypeDecoration["__apiType"]; + __apiType?: DocumentTypeDecoration['__apiType']; - constructor( - private value: string, - public __meta__?: Record, - ) { + constructor(private value: string, public __meta__?: Record) { super(value); } @@ -904,8 +274,7 @@ export class TypedDocumentString return this.value; } } -export const MenuEventSubscriptionFragment = new TypedDocumentString( - ` +export const MenuEventSubscriptionFragment = new TypedDocumentString(` fragment MenuEventSubscriptionFragment on Event { __typename ... on MenuCreated { @@ -945,11 +314,8 @@ export const MenuEventSubscriptionFragment = new TypedDocumentString( } } } - `, - { fragmentName: "MenuEventSubscriptionFragment" }, -) as unknown as TypedDocumentString; -export const PageEventSubscriptionFragment = new TypedDocumentString( - ` + `, {"fragmentName":"MenuEventSubscriptionFragment"}) as unknown as TypedDocumentString; +export const PageEventSubscriptionFragment = new TypedDocumentString(` fragment PageEventSubscriptionFragment on Event { __typename ... on PageCreated { @@ -983,11 +349,8 @@ export const PageEventSubscriptionFragment = new TypedDocumentString( } } } - `, - { fragmentName: "PageEventSubscriptionFragment" }, -) as unknown as TypedDocumentString; -export const ProductEventSubscriptionFragment = new TypedDocumentString( - ` + `, {"fragmentName":"PageEventSubscriptionFragment"}) as unknown as TypedDocumentString; +export const ProductEventSubscriptionFragment = new TypedDocumentString(` fragment ProductEventSubscriptionFragment on Event { __typename ... on ProductUpdated { @@ -1070,11 +433,8 @@ export const ProductEventSubscriptionFragment = new TypedDocumentString( } } } - `, - { fragmentName: "ProductEventSubscriptionFragment" }, -) as unknown as TypedDocumentString; -export const TaxedMoney = new TypedDocumentString( - ` + `, {"fragmentName":"ProductEventSubscriptionFragment"}) as unknown as TypedDocumentString; +export const TaxedMoney = new TypedDocumentString(` fragment TaxedMoney on TaxedMoney { net { ...Money @@ -1089,6 +449,4 @@ export const TaxedMoney = new TypedDocumentString( fragment Money on Money { currency amount -}`, - { fragmentName: "TaxedMoney" }, -) as unknown as TypedDocumentString; +}`, {"fragmentName":"TaxedMoney"}) as unknown as TypedDocumentString; \ No newline at end of file diff --git a/apps/storefront/src/graphql/queries/generated.ts b/apps/storefront/src/graphql/queries/generated.ts index 585c54e..49d65c0 100644 --- a/apps/storefront/src/graphql/queries/generated.ts +++ b/apps/storefront/src/graphql/queries/generated.ts @@ -1,35 +1,29 @@ -import type * as Types from "@nimara/codegen/schema"; +import type * as Types from '@nimara/codegen/schema'; -import type { DocumentTypeDecoration } from "@graphql-typed-document-node/core"; +import type { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; export type ProductSlugQuery_product_Product = { slug: string }; -export type ProductSlugQuery_Query = { - product: ProductSlugQuery_product_Product | null; -}; +export type ProductSlugQuery_Query = { product: ProductSlugQuery_product_Product | null }; + export type ProductSlugQueryVariables = Types.Exact<{ - id: Types.Scalars["ID"]["input"]; + id: Types.Scalars['ID']['input']; }>; + export type ProductSlugQuery = ProductSlugQuery_Query; -export type Products_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = - { name: string }; +export type Products_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = { name: string }; + +export type Products_products_ProductCountableConnection_edges_ProductCountableEdge = { node: Products_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product }; + +export type Products_products_ProductCountableConnection = { edges: Array }; -export type Products_products_ProductCountableConnection_edges_ProductCountableEdge = - { - node: Products_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product; - }; +export type Products_Query = { products: Products_products_ProductCountableConnection | null }; -export type Products_products_ProductCountableConnection = { - edges: Array; -}; -export type Products_Query = { - products: Products_products_ProductCountableConnection | null; -}; +export type ProductsVariables = Types.Exact<{ [key: string]: never; }>; -export type ProductsVariables = Types.Exact<{ [key: string]: never }>; export type Products = Products_Query; @@ -37,12 +31,9 @@ export class TypedDocumentString extends String implements DocumentTypeDecoration { - __apiType?: DocumentTypeDecoration["__apiType"]; + __apiType?: DocumentTypeDecoration['__apiType']; - constructor( - private value: string, - public __meta__?: Record, - ) { + constructor(private value: string, public __meta__?: Record) { super(value); } @@ -57,10 +48,7 @@ export const ProductSlugQueryDocument = new TypedDocumentString(` slug } } - `) as unknown as TypedDocumentString< - ProductSlugQuery, - ProductSlugQueryVariables ->; + `) as unknown as TypedDocumentString; export const ProductsDocument = new TypedDocumentString(` query Products { products(first: 10) { @@ -71,4 +59,4 @@ export const ProductsDocument = new TypedDocumentString(` } } } - `) as unknown as TypedDocumentString; + `) as unknown as TypedDocumentString; \ No newline at end of file diff --git a/apps/storefront/src/services/search.ts b/apps/storefront/src/services/search.ts index 4caf8ed..05001a8 100644 --- a/apps/storefront/src/services/search.ts +++ b/apps/storefront/src/services/search.ts @@ -54,7 +54,7 @@ export const searchServiceAlgolia = algoliaSearchService({ { availableFacets: facets, channel: "channel-us", - indexName: `channel-us.USD.products`, + indexName: `channel-us`, virtualReplicas: [ { indexName: `channel-us.USD.products.name_asc`, @@ -109,4 +109,5 @@ export const searchServiceSaleor = saleorSearchService({ }, }); +// export const searchService: SearchService = searchServiceSaleor; export const searchService: SearchService = searchServiceAlgolia; diff --git a/packages/domain/src/objects/SearchProduct.ts b/packages/domain/src/objects/SearchProduct.ts index 38070f0..4ad90ce 100644 --- a/packages/domain/src/objects/SearchProduct.ts +++ b/packages/domain/src/objects/SearchProduct.ts @@ -9,6 +9,7 @@ export type SearchProduct = { | null; name: string; price: number; + productId: string; slug: string; thumbnail: { alt?: string; diff --git a/packages/infrastructure/src/private/.eslintrc.js b/packages/infrastructure/src/private/.eslintrc.js new file mode 100644 index 0000000..6aa83f6 --- /dev/null +++ b/packages/infrastructure/src/private/.eslintrc.js @@ -0,0 +1,10 @@ +module.exports = { + $schema: "https://json.schemastore.org/eslintrc.json", + extends: ["custom/base.js"], + root: true, + parserOptions: { + project: "tsconfig.json", + tsconfigRootDir: __dirname, + sourceType: "module", + }, +}; diff --git a/packages/infrastructure/src/private/algolia/search/infrastructure/get-facets-infra.ts b/packages/infrastructure/src/private/algolia/search/infrastructure/get-facets-infra.ts index f36c41d..0d3288b 100644 --- a/packages/infrastructure/src/private/algolia/search/infrastructure/get-facets-infra.ts +++ b/packages/infrastructure/src/private/algolia/search/infrastructure/get-facets-infra.ts @@ -50,6 +50,11 @@ export const algoliaGetFacetsInfra = ({ const indexFacetConfig = index.availableFacets[facetName]; if (!indexFacetConfig) { + loggingService.error("Missing facet configuration within index", { + facetName, + indexName: index.indexName, + }); + return acc; } diff --git a/packages/infrastructure/src/private/algolia/search/infrastructure/search-infra.ts b/packages/infrastructure/src/private/algolia/search/infrastructure/search-infra.ts index 53ef688..7f96d08 100644 --- a/packages/infrastructure/src/private/algolia/search/infrastructure/search-infra.ts +++ b/packages/infrastructure/src/private/algolia/search/infrastructure/search-infra.ts @@ -1,4 +1,5 @@ import algoliasearch from "algoliasearch"; +import { join } from "path"; import { loggingService } from "@nimara/infrastructure/logging/service"; import type { SearchInfra } from "@nimara/infrastructure/use-cases/search/types"; @@ -33,15 +34,7 @@ export const algoliaSearchInfra = ({ // Create a mapping between slugs and Algolia name const parsedFilters = Object.entries(filters ?? {}) - .reduce((acc, [name, value]) => { - if (name === "category") { - const formattedValue = ( - String(value).charAt(0).toUpperCase() + String(value).slice(1) - ).replaceAll("-", " & "); - - acc.push(`categories.lvl0:'${formattedValue}'`); - } - + .reduce((acc, [name, value], index) => { if (name in facetsMapping) { const values = value.split("."); diff --git a/packages/infrastructure/src/private/algolia/search/serializers.ts b/packages/infrastructure/src/private/algolia/search/serializers.ts index 1f3fdac..56d788e 100644 --- a/packages/infrastructure/src/private/algolia/search/serializers.ts +++ b/packages/infrastructure/src/private/algolia/search/serializers.ts @@ -7,14 +7,14 @@ export const searchProductSerializer: RecordSerializer = ( ) => Object.freeze({ currency: data.currency, - id: data.productId, + id: data.objectID, + productId: data.productId, name: data.productName, slug: data.slug, price: Number(data.grossPrice), thumbnail: data.thumbnail ? { - // INFO: just for demo purposes - url: data.thumbnail.replace("=/256/", "=/1024/"), + url: data.thumbnail, } : null, media: Array.isArray(data.media) @@ -23,5 +23,4 @@ export const searchProductSerializer: RecordSerializer = ( alt: mediaItem.alt, })) : null, - updatedAt: data.updatedAt, }); diff --git a/packages/infrastructure/src/private/package.json b/packages/infrastructure/src/private/package.json new file mode 100644 index 0000000..b7bf809 --- /dev/null +++ b/packages/infrastructure/src/private/package.json @@ -0,0 +1,27 @@ +{ + "name": "nimara-infrastructure-private", + "version": "1.0.0", + "scripts": { + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "test": "vitest run", + "test:watch": "vitest --watch" + }, + "exports": { + "./*": "./src/*.ts" + }, + "dependencies": { + "algoliasearch": "4.22.1", + "instantsearch.js": "4.64.0", + "prettier": "3.3.3" + }, + "devDependencies": { + "@nimara/domain": "workspace:*", + "@nimara/config": "workspace:*", + "@nimara/infrastructure": "workspace:*", + "eslint": "^8.57.0", + "eslint-config-custom": "workspace:*", + "graphql": "16.9.0", + "tsconfig": "workspace:*", + "typescript": "^5.5.4" + } +} diff --git a/packages/infrastructure/src/private/prettier.config.js b/packages/infrastructure/src/private/prettier.config.js new file mode 100644 index 0000000..d6a6686 --- /dev/null +++ b/packages/infrastructure/src/private/prettier.config.js @@ -0,0 +1 @@ +module.exports = require("@nimara/config/prettier"); diff --git a/packages/infrastructure/src/private/tsconfig.json b/packages/infrastructure/src/private/tsconfig.json new file mode 100644 index 0000000..d81db68 --- /dev/null +++ b/packages/infrastructure/src/private/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "tsconfig/react-library.json", + "include": ["./**/*.ts", "./**/*.tsx", "./**/*/*.d.ts"], + "exclude": ["dist", "build", "node_modules"] +} diff --git a/packages/infrastructure/src/public/saleor/search/graphql/fragments/generated.ts b/packages/infrastructure/src/public/saleor/search/graphql/fragments/generated.ts index e7af1fe..c0073a4 100644 --- a/packages/infrastructure/src/public/saleor/search/graphql/fragments/generated.ts +++ b/packages/infrastructure/src/public/saleor/search/graphql/fragments/generated.ts @@ -1,8 +1,6 @@ import type * as Types from '@nimara/codegen/schema'; import type { DocumentTypeDecoration } from '@graphql-typed-document-node/core'; -export type SearchProductFragment_Product_translation_ProductTranslation = { name: string | null }; - export type SearchProductFragment_Product_thumbnail_Image = { url: string, alt: string | null }; export type SearchProductFragment_Product_variants_ProductVariant_pricing_VariantPricingInfo_price_TaxedMoney_gross_Money = { amount: number }; @@ -31,7 +29,7 @@ export type SearchProductFragment_Product_pricing_ProductPricingInfo_priceRange_ export type SearchProductFragment_Product_pricing_ProductPricingInfo = { priceRange: SearchProductFragment_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange | null }; -export type SearchProductFragment = { id: string, name: string, slug: string, updatedAt: string, translation: SearchProductFragment_Product_translation_ProductTranslation | null, thumbnail: SearchProductFragment_Product_thumbnail_Image | null, variants: Array | null, media: Array | null, pricing: SearchProductFragment_Product_pricing_ProductPricingInfo | null }; +export type SearchProductFragment = { id: string, name: string, slug: string, updatedAt: string, thumbnail: SearchProductFragment_Product_thumbnail_Image | null, variants: Array | null, media: Array | null, pricing: SearchProductFragment_Product_pricing_ProductPricingInfo | null }; export class TypedDocumentString extends String @@ -51,9 +49,6 @@ export const SearchProductFragment = new TypedDocumentString(` fragment SearchProductFragment on Product { id name - translation(languageCode: $languageCode) { - name - } slug thumbnail(format: WEBP, size: 512) { url diff --git a/packages/infrastructure/src/public/saleor/search/graphql/queries/generated.ts b/packages/infrastructure/src/public/saleor/search/graphql/queries/generated.ts index 3e9cc8c..9c168ad 100644 --- a/packages/infrastructure/src/public/saleor/search/graphql/queries/generated.ts +++ b/packages/infrastructure/src/public/saleor/search/graphql/queries/generated.ts @@ -36,8 +36,6 @@ export type FacetsQueryVariables = Types.Exact<{ export type FacetsQuery = FacetsQuery_Query; -export type SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_translation_ProductTranslation = { name: string | null }; - export type SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_thumbnail_Image = { url: string, alt: string | null }; export type SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_variants_ProductVariant_pricing_VariantPricingInfo_price_TaxedMoney_gross_Money = { amount: number }; @@ -66,7 +64,7 @@ export type SearchProductQuery_products_ProductCountableConnection_edges_Product export type SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo = { priceRange: SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo_priceRange_TaxedMoneyRange | null }; -export type SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = { id: string, name: string, slug: string, updatedAt: string, translation: SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_translation_ProductTranslation | null, thumbnail: SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_thumbnail_Image | null, variants: Array | null, media: Array | null, pricing: SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo | null }; +export type SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product = { id: string, name: string, slug: string, updatedAt: string, thumbnail: SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_thumbnail_Image | null, variants: Array | null, media: Array | null, pricing: SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product_pricing_ProductPricingInfo | null }; export type SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge = { node: SearchProductQuery_products_ProductCountableConnection_edges_ProductCountableEdge_node_Product }; @@ -80,13 +78,11 @@ export type SearchProductQuery_Query = { products: SearchProductQuery_products_P export type SearchProductQueryVariables = Types.Exact<{ after?: Types.InputMaybe; before?: Types.InputMaybe; - channel: Types.Scalars['String']['input']; filter?: Types.InputMaybe; first?: Types.InputMaybe; last?: Types.InputMaybe; search?: Types.InputMaybe; sortBy?: Types.InputMaybe; - languageCode: Types.LanguageCodeEnum; where?: Types.InputMaybe; }>; @@ -154,11 +150,10 @@ export const FacetsQueryDocument = new TypedDocumentString(` } `) as unknown as TypedDocumentString; export const SearchProductQueryDocument = new TypedDocumentString(` - query SearchProductQuery($after: String, $before: String, $channel: String!, $filter: ProductFilterInput, $first: Int, $last: Int, $search: String, $sortBy: ProductOrder, $languageCode: LanguageCodeEnum!, $where: ProductWhereInput) { + query SearchProductQuery($after: String, $before: String, $filter: ProductFilterInput, $first: Int, $last: Int, $search: String, $sortBy: ProductOrder, $where: ProductWhereInput) { products( after: $after before: $before - channel: $channel filter: $filter first: $first last: $last @@ -183,9 +178,6 @@ export const SearchProductQueryDocument = new TypedDocumentString(` fragment SearchProductFragment on Product { id name - translation(languageCode: $languageCode) { - name - } slug thumbnail(format: WEBP, size: 512) { url diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8de7726..59f7f9b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -70,13 +70,13 @@ importers: dependencies: next: specifier: ^13.0.6 - version: 13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) nextra: specifier: 2.13.4 - version: 2.13.4(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 2.13.4(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) nextra-theme-docs: specifier: 2.13.4 - version: 2.13.4(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nextra@2.13.4(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 2.13.4(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nextra@2.13.4(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18.2.0 version: 18.3.1 @@ -119,7 +119,7 @@ importers: version: 7.114.0 '@sentry/nextjs': specifier: ^8.12.0 - version: 8.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.25.1)(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.90.3) + version: 8.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.25.1)(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.90.3) '@sentry/types': specifier: ^8.12.0 version: 8.13.0 @@ -152,16 +152,22 @@ importers: version: 0.368.0(react@18.3.1) next: specifier: 14.2.12 - version: 14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) next-auth: specifier: 5.0.0-beta.17 - version: 5.0.0-beta.17(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + version: 5.0.0-beta.17(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) next-intl: specifier: 3.19.3 - version: 3.19.3(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + version: 3.19.3(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) nextjs-routes: specifier: 2.1.0 - version: 2.1.0(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + version: 2.1.0(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + nimara-infrastructure-private: + specifier: file:../../packages/infrastructure/src/private + version: file:packages/infrastructure/src/private + nuqs: + specifier: 2.1.1 + version: 2.1.1(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) react: specifier: 18.3.1 version: 18.3.1 @@ -7869,6 +7875,9 @@ packages: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} + mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} @@ -8026,6 +8035,9 @@ packages: react: '>=16.13.1' react-dom: '>=16.13.1' + nimara-infrastructure-private@file:packages/infrastructure/src/private: + resolution: {directory: packages/infrastructure/src/private, type: directory} + no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} @@ -8191,6 +8203,21 @@ packages: nullthrows@1.1.1: resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==} + nuqs@2.1.1: + resolution: {integrity: sha512-iM2H8lMmhvk9bxupUs2oRle9usRNEAqppOkTMXOxD/uK85gOKAubU7T2zmPo8fnYQS4n5e/XswTiq+gLYGpy3w==} + peerDependencies: + '@remix-run/react': '>= 2' + next: '>= 14.2.0' + react: '>= 18.2.0' + react-router-dom: '>= 6' + peerDependenciesMeta: + '@remix-run/react': + optional: true + next: + optional: true + react-router-dom: + optional: true + oauth4webapi@2.10.4: resolution: {integrity: sha512-DSoj8QoChzOCQlJkRmYxAJCIpnXFW32R0Uq7avyghIeB6iJq0XAblOD7pcq3mx4WEBDwMuKr0Y1qveCBleG2Xw==} @@ -14381,7 +14408,7 @@ snapshots: cookie: 0.6.0 graphql: 16.9.0 optionalDependencies: - next: 14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) @@ -14567,7 +14594,7 @@ snapshots: '@sentry/utils': 7.114.0 localforage: 1.10.0 - '@sentry/nextjs@8.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.25.1)(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.90.3)': + '@sentry/nextjs@8.13.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.52.1(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.25.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.25.1)(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.90.3)': dependencies: '@opentelemetry/instrumentation-http': 0.52.1(@opentelemetry/api@1.9.0) '@rollup/plugin-commonjs': 26.0.1(rollup@3.29.4) @@ -14580,7 +14607,7 @@ snapshots: '@sentry/vercel-edge': 8.13.0 '@sentry/webpack-plugin': 2.20.1(webpack@5.90.3) chalk: 3.0.0 - next: 14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) resolve: 1.22.8 rollup: 3.29.4 stacktrace-parser: 0.1.10 @@ -14932,7 +14959,7 @@ snapshots: get-port: 5.1.1 giget: 1.1.3 globby: 11.1.0 - jscodeshift: 0.15.1(@babel/preset-env@7.23.5(@babel/core@7.24.7)) + jscodeshift: 0.15.1(@babel/preset-env@7.23.5(@babel/core@7.23.5)) leven: 3.1.0 ora: 5.4.1 prettier: 2.8.8 @@ -14967,7 +14994,7 @@ snapshots: '@types/cross-spawn': 6.0.6 cross-spawn: 7.0.3 globby: 11.1.0 - jscodeshift: 0.15.1(@babel/preset-env@7.23.5(@babel/core@7.24.7)) + jscodeshift: 0.15.1(@babel/preset-env@7.23.5(@babel/core@7.23.5)) lodash: 4.17.21 prettier: 2.8.8 recast: 0.23.4 @@ -19351,7 +19378,7 @@ snapshots: dependencies: argparse: 2.0.1 - jscodeshift@0.15.1(@babel/preset-env@7.23.5(@babel/core@7.24.7)): + jscodeshift@0.15.1(@babel/preset-env@7.23.5(@babel/core@7.23.5)): dependencies: '@babel/core': 7.24.7 '@babel/parser': 7.23.5 @@ -20332,6 +20359,8 @@ snapshots: minipass: 3.3.6 yallist: 4.0.0 + mitt@3.0.1: {} + mkdirp-classic@0.5.3: {} mkdirp@0.3.0: {} @@ -20372,17 +20401,17 @@ snapshots: nerf-dart@1.0.0: {} - next-auth@5.0.0-beta.17(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1): + next-auth@5.0.0-beta.17(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1): dependencies: '@auth/core': 0.30.0 - next: 14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 - next-intl@3.19.3(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1): + next-intl@3.19.3(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1): dependencies: '@formatjs/intl-localematcher': 0.5.4 negotiator: 0.6.3 - next: 14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 use-intl: 3.19.3(react@18.3.1) @@ -20397,19 +20426,19 @@ snapshots: transitivePeerDependencies: - supports-color - next-seo@6.6.0(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-seo@6.6.0(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - next: 13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - next-themes@0.2.1(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-themes@0.2.1(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - next: 13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 13.5.6 '@swc/helpers': 0.5.2 @@ -20435,7 +20464,7 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.2.12 '@swc/helpers': 0.5.5 @@ -20462,12 +20491,12 @@ snapshots: - '@babel/core' - babel-plugin-macros - nextjs-routes@2.1.0(next@14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)): + nextjs-routes@2.1.0(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)): dependencies: chokidar: 3.5.3 - next: 14.2.12(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - nextra-theme-docs@2.13.4(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nextra@2.13.4(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + nextra-theme-docs@2.13.4(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nextra@2.13.4(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@headlessui/react': 1.7.19(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@popperjs/core': 2.11.8 @@ -20478,16 +20507,16 @@ snapshots: git-url-parse: 13.1.1 intersection-observer: 0.12.2 match-sorter: 6.3.4 - next: 13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - next-seo: 6.6.0(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - next-themes: 0.2.1(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - nextra: 2.13.4(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next-seo: 6.6.0(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next-themes: 0.2.1(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + nextra: 2.13.4(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) scroll-into-view-if-needed: 3.1.0 zod: 3.22.4 - nextra@2.13.4(next@13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + nextra@2.13.4(next@13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@headlessui/react': 1.7.19(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mdx-js/mdx': 2.3.0 @@ -20501,7 +20530,7 @@ snapshots: gray-matter: 4.0.3 katex: 0.16.11 lodash.get: 4.4.2 - next: 13.5.6(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 13.5.6(@opentelemetry/api@1.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) next-mdx-remote: 4.4.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) p-limit: 3.1.0 react: 18.3.1 @@ -20521,6 +20550,12 @@ snapshots: transitivePeerDependencies: - supports-color + nimara-infrastructure-private@file:packages/infrastructure/src/private: + dependencies: + algoliasearch: 4.22.1 + instantsearch.js: 4.64.0(algoliasearch@4.22.1) + prettier: 3.3.3 + no-case@3.0.4: dependencies: lower-case: 2.0.2 @@ -20607,6 +20642,13 @@ snapshots: nullthrows@1.1.1: {} + nuqs@2.1.1(next@14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1): + dependencies: + mitt: 3.0.1 + react: 18.3.1 + optionalDependencies: + next: 14.2.12(@babel/core@7.24.7)(@opentelemetry/api@1.9.0)(@playwright/test@1.46.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + oauth4webapi@2.10.4: {} object-assign@4.1.1: {} diff --git a/turbo.json b/turbo.json index e6ada46..255f35a 100644 --- a/turbo.json +++ b/turbo.json @@ -6,6 +6,7 @@ "BASE_URL", "NEXT_PUBLIC_ALGOLIA_API_KEY", "NEXT_PUBLIC_ALGOLIA_APP_ID", + "NEXT_PUBLIC_ALGOLIA_INDEX_PREFIX", "SALEOR_APP_TOKEN", "SENTRY_AUTH_TOKEN", "SENTRY_ORG",