@debales/ai 1.1.13 → 1.1.14-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/browser/ai-browser.js +791 -437
  2. package/dist/module/ai.js +32520 -27333
  3. package/dist/module/ai.umd.js +525 -505
  4. package/package.json +1 -1
  5. package/dist/browser/adapter/BaseCartAdapter.d.ts +0 -17
  6. package/dist/browser/adapter/CartAdapterFactory.d.ts +0 -10
  7. package/dist/browser/adapter/DefaultCartAdapter.d.ts +0 -15
  8. package/dist/browser/adapter/MagentoCartAdapter.d.ts +0 -27
  9. package/dist/browser/adapter/ShopifyCartAdapter.d.ts +0 -20
  10. package/dist/browser/browser.d.ts +0 -9
  11. package/dist/browser/components/ChatbotComponent.d.ts +0 -17
  12. package/dist/browser/components/ChatbotComponent1.d.ts +0 -17
  13. package/dist/browser/components/ChatbotComponent2.d.ts +0 -17
  14. package/dist/browser/components/ChatbotComponent3.d.ts +0 -17
  15. package/dist/browser/components/Chatbotshow.d.ts +0 -2
  16. package/dist/browser/components/common/AddBulkItemsButton.d.ts +0 -1
  17. package/dist/browser/components/common/Button.d.ts +0 -2
  18. package/dist/browser/components/common/CheckoutButton.d.ts +0 -1
  19. package/dist/browser/components/common/CollectionSlider.d.ts +0 -11
  20. package/dist/browser/components/common/DiscountModel.d.ts +0 -8
  21. package/dist/browser/components/common/DiscountPanel.d.ts +0 -8
  22. package/dist/browser/components/common/DownArrow.d.ts +0 -5
  23. package/dist/browser/components/common/DynamicSuggestedQuestion.d.ts +0 -15
  24. package/dist/browser/components/common/DynamicSuggestedQuestion1.d.ts +0 -17
  25. package/dist/browser/components/common/DynamicSuggestedQuestion2.d.ts +0 -15
  26. package/dist/browser/components/common/DynamicSuggestedQuestion3.d.ts +0 -15
  27. package/dist/browser/components/common/ExitModal.d.ts +0 -8
  28. package/dist/browser/components/common/FormField.d.ts +0 -11
  29. package/dist/browser/components/common/Input.d.ts +0 -11
  30. package/dist/browser/components/common/LoadingAnimation.d.ts +0 -7
  31. package/dist/browser/components/common/NormalizePrice.d.ts +0 -13
  32. package/dist/browser/components/common/PhoneInput.d.ts +0 -12
  33. package/dist/browser/components/common/ProductSlider.d.ts +0 -16
  34. package/dist/browser/components/common/SelectLanguage.d.ts +0 -7
  35. package/dist/browser/components/common/SuggestedQuestion.d.ts +0 -19
  36. package/dist/browser/components/common/UserInfoModel.d.ts +0 -14
  37. package/dist/browser/components/common/VariantSelectionModel.d.ts +0 -18
  38. package/dist/browser/components/common/loading-dots.d.ts +0 -4
  39. package/dist/browser/components/common/pop-up.d.ts +0 -2
  40. package/dist/browser/components/common/shadowWrapper.d.ts +0 -10
  41. package/dist/browser/components/footer/ChatInputBox.d.ts +0 -4
  42. package/dist/browser/components/icons/index.d.ts +0 -19
  43. package/dist/browser/constants/dom.d.ts +0 -2
  44. package/dist/browser/constants/events.d.ts +0 -30
  45. package/dist/browser/constants/index.d.ts +0 -7
  46. package/dist/browser/constants/storage-key.d.ts +0 -12
  47. package/dist/browser/context/CartContext.d.ts +0 -3
  48. package/dist/browser/context/ShadowDomContext.d.ts +0 -3
  49. package/dist/browser/hooks/useDebales.d.ts +0 -3
  50. package/dist/browser/index.d.ts +0 -3
  51. package/dist/browser/lib/debalesAnalytics.d.ts +0 -37
  52. package/dist/browser/lib/debalesGlobalObject.d.ts +0 -2
  53. package/dist/browser/lib/platformDetection.d.ts +0 -4
  54. package/dist/browser/lib/platfromValidator.d.ts +0 -2
  55. package/dist/browser/lib/socket.d.ts +0 -19
  56. package/dist/browser/lib/urlHelper.d.ts +0 -18
  57. package/dist/browser/lib/util.d.ts +0 -74
  58. package/dist/browser/main.d.ts +0 -1
  59. package/dist/browser/provider/CartProvider.d.ts +0 -8
  60. package/dist/browser/provider/DebalesProvider.d.ts +0 -7
  61. package/dist/browser/provider/index.d.ts +0 -5
  62. package/dist/browser/types/cart.d.ts +0 -49
  63. package/dist/browser/types/debales.d.ts +0 -54
  64. package/dist/browser/types/index.d.ts +0 -146
  65. package/dist/browser/types/magento.d.ts +0 -37
  66. package/dist/browser/types/shopify.d.ts +0 -22
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@debales/ai",
3
3
  "private": false,
4
4
  "access": "public",
5
- "version": "1.1.13",
5
+ "version": "1.1.14-canary.1",
6
6
  "type": "module",
7
7
  "main": "./dist/module/ai.js",
8
8
  "types": "./dist/module/index.d.ts",
@@ -1,17 +0,0 @@
1
- import { Product } from '../types';
2
- import { CartItem, CartOperationResult, CartPlatformAdapter, CartState } from '../types/cart';
3
- import { EcommercePlatform } from '../types/index';
4
- export declare abstract class BaseCartAdapter implements CartPlatformAdapter {
5
- abstract readonly platform: EcommercePlatform;
6
- isSupported(): boolean;
7
- abstract fetchCart(): Promise<CartOperationResult<CartState>>;
8
- abstract addToCart(variantId: string, quantity?: number, properties?: Record<string, string>): Promise<CartOperationResult<void>>;
9
- abstract removeFromCart(itemId: number): Promise<CartOperationResult<void>>;
10
- abstract updateQuantity(cartItem: CartItem): Promise<CartOperationResult<void>>;
11
- abstract clearCart(): Promise<CartOperationResult<void>>;
12
- abstract generateCartUrl(domain: string): string;
13
- abstract generateProductUrl(domain: string, product: Product): string;
14
- abstract addCartAttributes(attributes?: Record<string, string>): Promise<CartOperationResult<void>>;
15
- protected createSuccessResult<T>(data: T, message?: string): CartOperationResult<T>;
16
- protected createErrorResult<T>(error: string): CartOperationResult<T>;
17
- }
@@ -1,10 +0,0 @@
1
- import { CartPlatformAdapter } from '../types/cart';
2
- import { EcommercePlatform } from '../types/index';
3
- export declare class CartAdapterFactory {
4
- private static instance;
5
- private adapterCache;
6
- private constructor();
7
- static getInstance(): CartAdapterFactory;
8
- getAdapter(platform?: EcommercePlatform): CartPlatformAdapter;
9
- clearCache(): void;
10
- }
@@ -1,15 +0,0 @@
1
- import { Product } from '../types';
2
- import { CartItem, CartOperationResult, CartState } from '../types/cart';
3
- import { EcommercePlatform } from '../types/index';
4
- import { BaseCartAdapter } from './BaseCartAdapter';
5
- export declare class DefaultCartAdapter extends BaseCartAdapter {
6
- readonly platform = EcommercePlatform.DEFAULT;
7
- fetchCart(): Promise<CartOperationResult<CartState>>;
8
- addToCart(variantId: string, quantity?: number, properties?: Record<string, string>): Promise<CartOperationResult<void>>;
9
- removeFromCart(itemId: number): Promise<CartOperationResult<void>>;
10
- updateQuantity(cartItem: CartItem): Promise<CartOperationResult<void>>;
11
- clearCart(): Promise<CartOperationResult<void>>;
12
- generateCartUrl(domain: string): string;
13
- generateProductUrl(domain: string, product: Product): string;
14
- addCartAttributes(attributes?: Record<string, string>): Promise<CartOperationResult<void>>;
15
- }
@@ -1,27 +0,0 @@
1
- import { Product } from '../types';
2
- import { CartItem, CartOperationResult, CartState } from '../types/cart';
3
- import { EcommercePlatform } from '../types/index';
4
- import { BaseCartAdapter } from './BaseCartAdapter';
5
- declare global {
6
- interface Window {
7
- checkout?: {
8
- checkoutUrl?: string;
9
- baseUrl?: string;
10
- };
11
- }
12
- }
13
- export declare class MagentoCartAdapter extends BaseCartAdapter {
14
- readonly platform = EcommercePlatform.MAGENTO;
15
- private readonly checkoutEndpoint;
16
- private readonly baseUrl;
17
- constructor();
18
- private normalizeCartData;
19
- fetchCart(): Promise<CartOperationResult<CartState>>;
20
- addToCart(variantId: string, quantity?: number): Promise<CartOperationResult<void>>;
21
- removeFromCart(itemId: number): Promise<CartOperationResult<void>>;
22
- updateQuantity(cartItem: CartItem): Promise<CartOperationResult<void>>;
23
- clearCart(): Promise<CartOperationResult<void>>;
24
- generateCartUrl(domain: string): string;
25
- generateProductUrl(domain: string, product: Product): string;
26
- addCartAttributes(attributes?: Record<string, string>): Promise<CartOperationResult<void>>;
27
- }
@@ -1,20 +0,0 @@
1
- import { Product } from '../types';
2
- import { CartItem, CartOperationResult, CartState } from '../types/cart';
3
- import { EcommercePlatform } from '../types/index';
4
- import { BaseCartAdapter } from './BaseCartAdapter';
5
- export declare class ShopifyCartAdapter extends BaseCartAdapter {
6
- readonly platform = EcommercePlatform.SHOPIFY;
7
- private readonly cartEndpoint;
8
- private readonly localCartKey;
9
- constructor();
10
- private normalizeCartData;
11
- generateProductUrl(domain: string, product: Product): string;
12
- private updateTrackCart;
13
- fetchCart(): Promise<CartOperationResult<CartState>>;
14
- addToCart(variantId: string, quantity?: number, properties?: Record<string, string>): Promise<CartOperationResult<void>>;
15
- removeFromCart(itemId: number): Promise<CartOperationResult<void>>;
16
- updateQuantity(cartItem: CartItem): Promise<CartOperationResult<void>>;
17
- clearCart(): Promise<CartOperationResult<void>>;
18
- addCartAttributes(attributes?: Record<string, string>): Promise<CartOperationResult<void>>;
19
- generateCartUrl(domain: string): string;
20
- }
@@ -1,9 +0,0 @@
1
- interface ChatbotConfig {
2
- botId: string;
3
- containerId?: string;
4
- }
5
- declare function initDebalesChatbot(config: ChatbotConfig): {
6
- container: HTMLElement;
7
- unmount: () => void;
8
- } | undefined;
9
- export { initDebalesChatbot };
@@ -1,17 +0,0 @@
1
- import { ChatBoxProps } from '../types';
2
- declare global {
3
- interface Window {
4
- triggerGokwikCustomCheckout?: () => void;
5
- shiprocketCheckoutEvents?: {
6
- buyCart?: () => void;
7
- };
8
- openRzpCheckout?: () => void;
9
- Thinkific?: {
10
- current_user?: {
11
- full_name: string;
12
- email: string;
13
- };
14
- };
15
- }
16
- }
17
- export declare const ChatbotComponent: ({ botId }: ChatBoxProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,17 +0,0 @@
1
- import { ChatBoxProps } from '../types';
2
- declare global {
3
- interface Window {
4
- triggerGokwikCustomCheckout?: () => void;
5
- shiprocketCheckoutEvents?: {
6
- buyCart?: () => void;
7
- };
8
- openRzpCheckout?: () => void;
9
- Thinkific?: {
10
- current_user?: {
11
- full_name: string;
12
- email: string;
13
- };
14
- };
15
- }
16
- }
17
- export declare const ChatbotComponent1: ({ botId }: ChatBoxProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,17 +0,0 @@
1
- import { ChatBoxProps } from '../types';
2
- declare global {
3
- interface Window {
4
- triggerGokwikCustomCheckout?: () => void;
5
- shiprocketCheckoutEvents?: {
6
- buyCart?: () => void;
7
- };
8
- openRzpCheckout?: () => void;
9
- Thinkific?: {
10
- current_user?: {
11
- full_name: string;
12
- email: string;
13
- };
14
- };
15
- }
16
- }
17
- export declare const ChatbotComponent2: ({ botId }: ChatBoxProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,17 +0,0 @@
1
- import { ChatBoxProps } from '../types';
2
- declare global {
3
- interface Window {
4
- triggerGokwikCustomCheckout?: () => void;
5
- shiprocketCheckoutEvents?: {
6
- buyCart?: () => void;
7
- };
8
- openRzpCheckout?: () => void;
9
- Thinkific?: {
10
- current_user?: {
11
- full_name: string;
12
- email: string;
13
- };
14
- };
15
- }
16
- }
17
- export declare const ChatbotComponent3: ({ botId }: ChatBoxProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +0,0 @@
1
- import { ChatBoxProps } from '../types';
2
- export declare const Chatbotshow: ({ botId }: ChatBoxProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const AddBulkItemsButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
@@ -1,2 +0,0 @@
1
- export declare const Button: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
2
- export declare const GradientButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
@@ -1 +0,0 @@
1
- export declare const CheckoutButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Message, UiData } from '../../types';
3
- interface CollectionSliderProps {
4
- message: Message;
5
- botId: string;
6
- uidata: UiData;
7
- onSendMessage: (message: string) => Promise<void>;
8
- loading: boolean;
9
- }
10
- declare const CollectionSlider: React.FC<CollectionSliderProps>;
11
- export default CollectionSlider;
@@ -1,8 +0,0 @@
1
- import { UiData } from '../../types';
2
- interface DiscountModalProps {
3
- discount: string;
4
- uiData: UiData;
5
- onClose: () => void;
6
- }
7
- export declare const DiscountModal: ({ discount, uiData, onClose, }: DiscountModalProps) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { UiData } from '../../types';
2
- interface DiscountPanelProps {
3
- discount: string;
4
- uiData: UiData;
5
- onClose: () => void;
6
- }
7
- export declare const DiscountPanel: ({ discount, uiData, onClose, }: DiscountPanelProps) => import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,5 +0,0 @@
1
- export default function DownArrow({ fill, width, height, }: {
2
- fill?: string;
3
- width?: number;
4
- height?: number;
5
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { default as React } from 'react';
2
- import { UiData } from '../../types';
3
- interface AnimatedSuggestionProps {
4
- messages: {
5
- question: string;
6
- isHighlighted: boolean;
7
- }[];
8
- botId?: string;
9
- uiData?: UiData;
10
- isHighlighted?: boolean;
11
- onClick?: (message: string) => void;
12
- onClose?: () => void;
13
- }
14
- declare const AnimatedSuggestion: React.FC<AnimatedSuggestionProps>;
15
- export default AnimatedSuggestion;
@@ -1,17 +0,0 @@
1
- import { default as React } from 'react';
2
- import { UiData } from '../../types';
3
- interface AnimatedSuggestionProps {
4
- messages: {
5
- question: string;
6
- isHighlighted: boolean;
7
- show_for: number;
8
- hide_timing: number;
9
- }[];
10
- botId?: string;
11
- uiData?: UiData;
12
- isHighlighted?: boolean;
13
- onClick?: (message: string) => void;
14
- onClose?: () => void;
15
- }
16
- declare const AnimatedSuggestion: React.FC<AnimatedSuggestionProps>;
17
- export default AnimatedSuggestion;
@@ -1,15 +0,0 @@
1
- import { default as React } from 'react';
2
- import { UiData } from '../../types';
3
- interface AnimatedSuggestionProps {
4
- messages: {
5
- question: string;
6
- isHighlighted: boolean;
7
- }[];
8
- botId?: string;
9
- uiData?: UiData;
10
- isHighlighted?: boolean;
11
- onClick?: (message: string) => void;
12
- onClose?: () => void;
13
- }
14
- declare const AnimatedSuggestion: React.FC<AnimatedSuggestionProps>;
15
- export default AnimatedSuggestion;
@@ -1,15 +0,0 @@
1
- import { default as React } from 'react';
2
- import { UiData } from '../../types';
3
- interface AnimatedSuggestionProps {
4
- messages: {
5
- question: string;
6
- isHighlighted: boolean;
7
- }[];
8
- botId?: string;
9
- uiData?: UiData;
10
- isHighlighted?: boolean;
11
- onClick?: (message: string) => void;
12
- onClose?: () => void;
13
- }
14
- declare const AnimatedSuggestion: React.FC<AnimatedSuggestionProps>;
15
- export default AnimatedSuggestion;
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
- interface ExitModalProps {
3
- setShowExitModal: (show: boolean) => void;
4
- handleCloseChatbot: (userRating: number | null) => void;
5
- chatId: string;
6
- }
7
- declare const ExitModal: React.FC<ExitModalProps>;
8
- export default ExitModal;
@@ -1,11 +0,0 @@
1
- import { default as React, InputHTMLAttributes } from 'react';
2
- export interface FormError {
3
- field: "name" | "email" | "phone";
4
- message: string;
5
- }
6
- interface FormFieldProps extends InputHTMLAttributes<HTMLInputElement> {
7
- label: string;
8
- FieldError: FormError | null;
9
- }
10
- declare const FormField: React.FC<FormFieldProps>;
11
- export default FormField;
@@ -1,11 +0,0 @@
1
- import { default as React, InputHTMLAttributes } from 'react';
2
- export interface FormError {
3
- field: "name" | "email" | "phone";
4
- message: string;
5
- }
6
- interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
7
- label: string;
8
- FieldError: FormError | null;
9
- }
10
- declare const Input: React.FC<InputProps>;
11
- export default Input;
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- interface LoadingAnimationProps {
3
- loading: boolean;
4
- loadingPhrases?: string[];
5
- }
6
- declare const LoadingAnimation: React.FC<LoadingAnimationProps>;
7
- export default LoadingAnimation;
@@ -1,13 +0,0 @@
1
- import { ShopifyStoreMeta } from '../../types';
2
- /**
3
- * Normalizes a price string based on whether it's running in a Shopify context
4
- * @param price - The price string to normalize
5
- * @param storeMetaData - The store meta data
6
- * @returns Formatted price string in the appropriate currency format
7
- */
8
- export declare const normalizePrice: (price: string, storeMetaData: ShopifyStoreMeta | null) => string;
9
- export declare function formatSizeAndCurrency(sizeString: string, storeMetaData: ShopifyStoreMeta | null): string;
10
- export declare const extractNumericPrice: (price: string) => number;
11
- export declare const getMetaUrl: (storeUrl: string) => string;
12
- export declare const getShopifyStoreMeta: (storeUrl: string) => Promise<ShopifyStoreMeta>;
13
- export declare const formatPrice: (price: number, currency: string) => string;
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- import { FormError } from './Input';
3
- interface PhoneInputProps {
4
- label: string;
5
- name: string;
6
- FieldError: FormError | null;
7
- onChange?: (value: string) => void;
8
- "data-cy"?: string;
9
- countryCode?: string;
10
- }
11
- declare const PhoneInput: React.FC<PhoneInputProps>;
12
- export default PhoneInput;
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- import { EcommercePlatform, Message, Product, ShopifyStoreMeta, UiData } from '../../types';
3
- interface ProductSliderProps {
4
- message: Message;
5
- botId: string;
6
- uidata: UiData;
7
- onSendMessage: (message: string) => Promise<void>;
8
- loading: boolean;
9
- storeMetaData: ShopifyStoreMeta | null;
10
- platform: EcommercePlatform;
11
- setShowVariantModel: (show: boolean) => void;
12
- setSelectedProduct: (product: Product) => void;
13
- setCartVersion: React.Dispatch<React.SetStateAction<number>>;
14
- }
15
- declare const ProductSlider: React.FC<ProductSliderProps>;
16
- export default ProductSlider;
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- interface Props {
3
- selectedLanguage: string;
4
- setSelectedLanguage: React.Dispatch<React.SetStateAction<string>>;
5
- }
6
- declare const LanguageSelector: ({ selectedLanguage, setSelectedLanguage }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default LanguageSelector;
@@ -1,19 +0,0 @@
1
- import { default as React } from 'react';
2
- import { UiData } from '../../types';
3
- declare const SuggestionCard: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
- isHighlighted: boolean;
5
- $botId: string;
6
- }>> & string;
7
- declare const CloseSuggestion: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
8
- interface Props {
9
- value: string;
10
- onClick: React.MouseEventHandler<HTMLDivElement>;
11
- index: number;
12
- isHighlighted: boolean;
13
- uiData: UiData;
14
- botId: string;
15
- onClose?: () => void;
16
- }
17
- declare function Suggestion({ value, onClick, index, isHighlighted, uiData, botId, onClose, }: Props): import("react/jsx-runtime").JSX.Element;
18
- export default Suggestion;
19
- export { CloseSuggestion, SuggestionCard };
@@ -1,14 +0,0 @@
1
- import { default as React } from 'react';
2
- declare global {
3
- interface Window {
4
- klaviyo: any;
5
- _klOnsite: any;
6
- }
7
- }
8
- interface Props {
9
- setShowModel: React.Dispatch<React.SetStateAction<boolean>>;
10
- inChat?: boolean;
11
- showFormInstructions?: boolean;
12
- }
13
- export declare const UserInfoModel: ({ inChat, showFormInstructions, setShowModel, }: Props) => import("react/jsx-runtime").JSX.Element | null;
14
- export {};
@@ -1,18 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Product, UiData } from '../../types';
3
- interface Variant {
4
- id: string;
5
- title: string;
6
- options: string[];
7
- available: boolean;
8
- price: string;
9
- }
10
- interface Props {
11
- uidata: UiData;
12
- product: Product | null;
13
- showModel: boolean;
14
- setShowModel: React.Dispatch<React.SetStateAction<boolean>>;
15
- onVariantSelect: (variant: Variant) => void;
16
- }
17
- export declare const VariantSelectionModel: ({ uidata, product, showModel, setShowModel, onVariantSelect, }: Props) => import("react/jsx-runtime").JSX.Element | null;
18
- export {};
@@ -1,4 +0,0 @@
1
- declare const LoadingDots: ({ color }: {
2
- color: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export default LoadingDots;
@@ -1,2 +0,0 @@
1
- declare function Popup(): import("react/jsx-runtime").JSX.Element | null;
2
- export default Popup;
@@ -1,10 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ShadowDOMRef } from '../../types';
3
- interface ShadowDOMWrapperProps {
4
- children: React.ReactNode;
5
- globalStyles?: string;
6
- containerStyles?: React.CSSProperties;
7
- onReady?: (shadowRoot: ShadowRoot, container: HTMLElement) => void;
8
- }
9
- export declare const ShadowDOMWrapper: React.ForwardRefExoticComponent<ShadowDOMWrapperProps & React.RefAttributes<ShadowDOMRef>>;
10
- export {};
@@ -1,4 +0,0 @@
1
- export default function ChatInputBox({ disabled, inputState, }: {
2
- disabled: boolean;
3
- inputState: boolean;
4
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- import { default as React } from 'react';
2
- import { UiData } from '../../types';
3
- export declare const LeftArrow: (props: React.SVGProps<SVGSVGElement> & {
4
- uiData: UiData;
5
- }) => import("react/jsx-runtime").JSX.Element;
6
- export declare const RightArrow: (props: React.SVGProps<SVGSVGElement> & {
7
- uiData: UiData;
8
- }) => import("react/jsx-runtime").JSX.Element;
9
- export declare const CartIcon: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
10
- export declare const LinkIcon: () => import("react/jsx-runtime").JSX.Element;
11
- export declare const ActiveIcon: () => import("react/jsx-runtime").JSX.Element;
12
- export declare const SmileyIcon: () => import("react/jsx-runtime").JSX.Element;
13
- export declare const InfoIcon: () => import("react/jsx-runtime").JSX.Element;
14
- export declare const SupportIcon: (props: React.SVGProps<SVGSVGElement> & {
15
- color?: string | undefined;
16
- }) => import("react/jsx-runtime").JSX.Element;
17
- export declare const CloseIcon: (props: React.SVGProps<SVGSVGElement> & {
18
- botNameColor?: string | undefined;
19
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export declare const SHADOW_ROOT_HOST_ID = "debales-ai-assistant";
2
- export declare const SHADOW_ROOT_CONTAINER_ID = "debales-chatbot-container";
@@ -1,30 +0,0 @@
1
- export declare const DEBALES_TRACKING_EVENTS: {
2
- readonly OPEN_STATE_CHANGE: "open_state_change";
3
- readonly CHAT_BUTTON_CLICKED: "Chat button clicked";
4
- readonly USER_FORM_FILLED: "User form filled";
5
- readonly ADD_BULK_ITEM: "Add bulk item";
6
- readonly USER_FORM_CLOSE: "user_form_close";
7
- readonly CHECKOUT_CLICKED: "Checkout Clicked";
8
- readonly ADD_TO_CART_CLICKED: "add to cart clicked";
9
- readonly SUGGESTED_QUESTION_CLICKED: "Suggested Question Clicked";
10
- readonly INITIAL_LEADING_QUERY_SUGGESTED_QUESTION_CLICKED: "Initial Leading Query Suggested Question Clicked";
11
- readonly LEADING_QUERY_CLICKED: "Leading Query Clicked";
12
- readonly COLLECTION_VIDEO_CLICKED: "Collection Video Clicked";
13
- readonly COLLECTION_IMAGE_CLICKED: "Collection Image Clicked";
14
- readonly VIEW_PRODUCT_CLICKED: "view product clicked";
15
- readonly PRODUCT_VIDEO_CLICKED: "Product Video Clicked";
16
- readonly PRODUCT_IMAGE_CLICKED: "Product Image Clicked";
17
- readonly SHOW_SIMILAR_CLICKED: "show similar clicked";
18
- readonly CHAT_MESSAGE_SENT: "chat_message_sent";
19
- readonly CHAT_MESSAGE_TYPED: "chat_message_typed";
20
- readonly CHAT_MESSAGE_ERROR: "chat_message_error";
21
- readonly CHAT_MESSAGE_TYPING_STARTED: "chat_message_typing_started";
22
- readonly CHAT_MESSAGE_TYPING_ENDED: "chat_message_typing_ended";
23
- readonly DISCOUNT_VIEWED: "discount_viewed";
24
- readonly SHOPIFY_LINK_CLICKED: "shopify_link_clicked";
25
- };
26
- export declare const DEBALES_CUSTOM_EVENTS: {
27
- readonly USER_FORM_SUBMITTED: "user_form_submitted";
28
- readonly OPEN_STATE_CHANGE: "open_state_change";
29
- readonly USER_FORM_CLOSE: "user_form_close";
30
- };
@@ -1,7 +0,0 @@
1
- export declare const isProduction: boolean;
2
- declare const API_BASE_URL: string;
3
- export declare const WEBSOCKET_BASE_URL: string;
4
- declare const ENABLE_MIXPANEL = true;
5
- declare const MIXPANEL_TOKENS: Record<string, string>;
6
- declare const POSTHOG_KEY: string;
7
- export { API_BASE_URL, ENABLE_MIXPANEL, MIXPANEL_TOKENS, POSTHOG_KEY };
@@ -1,12 +0,0 @@
1
- export declare const STORAGE_KEY_PURPOSE: {
2
- CHAT_HISTORY: string;
3
- CLICKED_QUESTIONS: string;
4
- PENDING_BULK_ITEMS: string;
5
- LAST_SHOWN_MESSAGE_ID: string;
6
- HIDDEN_DYNAMIC_SUGGESTED_QUESTIONS: string;
7
- CHAT_RATING: string;
8
- SHOPIFY_META_DATA: string;
9
- SESSION_ID: string;
10
- USER_INFO: string;
11
- IS_FORM_CLOSED_BY_USER: string;
12
- };
@@ -1,3 +0,0 @@
1
- import { CartContextValue } from '../types/cart';
2
- export declare const CartContext: import('react').Context<CartContextValue | null>;
3
- export declare const useCart: () => CartContextValue;
@@ -1,3 +0,0 @@
1
- import { ShadowDOMRef } from '../types';
2
- export declare const ShadowDOMContext: import('react').Context<ShadowDOMRef>;
3
- export declare const useShadowDOM: () => ShadowDOMRef;
@@ -1,3 +0,0 @@
1
- import { DebalesContextType } from '../types/debales';
2
- export declare const DebalesContext: import('react').Context<DebalesContextType | undefined>;
3
- export declare const useDebales: () => DebalesContextType;
@@ -1,3 +0,0 @@
1
- import { ChatBoxProps } from './types';
2
- declare function Chatbot(props: ChatBoxProps): import("react/jsx-runtime").JSX.Element;
3
- export default Chatbot;
@@ -1,37 +0,0 @@
1
- interface AnalyticsConfig {
2
- projectName: string;
3
- localStorageKey?: string;
4
- debug?: boolean;
5
- testing?: () => boolean;
6
- }
7
- type TrackPayload = {
8
- distinctId: string;
9
- anonId: string;
10
- projectName: string;
11
- eventName: string;
12
- operatingSystem?: string;
13
- browser?: string;
14
- browserVersion?: string;
15
- osVersion?: string;
16
- currentUrl: string;
17
- chatId: string;
18
- properties?: Record<string, any> | undefined;
19
- };
20
- type IdentifyPayload = {
21
- distinctId: string;
22
- anonId: string[];
23
- projectName: string;
24
- email: string;
25
- name?: string;
26
- phone?: string;
27
- properties?: Record<string, any> | undefined;
28
- };
29
- interface DebalesAnalyticsPublicAPI {
30
- init(config: AnalyticsConfig): void;
31
- identify(uniqueId: string, userProperties?: IdentifyPayload["properties"]): Promise<void>;
32
- track(eventName: string, eventProperties?: TrackPayload["properties"]): void;
33
- getDistinctId(): string;
34
- getAnonId(): string;
35
- }
36
- declare const debalesAnalytic: DebalesAnalyticsPublicAPI;
37
- export default debalesAnalytic;