@debales/ai 1.1.26-canary.0 → 1.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,11 @@
1
+ import { DebalesContextType } from '../../types/debales';
1
2
  import { default as React } from 'react';
2
3
  import { Message, UiData } from '../../types';
3
4
  interface CollectionSliderProps {
4
5
  message: Message;
5
6
  botId: string;
6
7
  uidata: UiData;
7
- onSendMessage: (message: string) => Promise<void>;
8
+ onSendMessage: DebalesContextType["onSendMessage"];
8
9
  loading: boolean;
9
10
  }
10
11
  declare const CollectionSlider: React.FC<CollectionSliderProps>;
@@ -5,7 +5,7 @@ interface PhoneInputProps {
5
5
  name: string;
6
6
  FieldError: FormError | null;
7
7
  onChange?: (value: string) => void;
8
- "data-cy"?: string;
8
+ "data-testid"?: string;
9
9
  countryCode?: string;
10
10
  }
11
11
  declare const PhoneInput: React.FC<PhoneInputProps>;
@@ -1,10 +1,11 @@
1
+ import { DebalesContextType } from '../../types/debales';
1
2
  import { default as React } from 'react';
2
3
  import { EcommercePlatform, Message, Product, ShopifyStoreMeta, UiData } from '../../types';
3
4
  interface ProductSliderProps {
4
5
  message: Message;
5
6
  botId: string;
6
7
  uidata: UiData;
7
- onSendMessage: (message: string) => Promise<void>;
8
+ onSendMessage: DebalesContextType["onSendMessage"];
8
9
  loading: boolean;
9
10
  storeMetaData: ShopifyStoreMeta | null;
10
11
  platform: EcommercePlatform;
@@ -1,5 +1,6 @@
1
1
  import { EventType, LeadingQueries, MessageEvent, MessageRole, UserInfo } from '@debales/shared';
2
2
  import { DisplayMode, Product, ShopifyStoreMeta, SuggestedQuestionAnswer, UiData, VariantQuantity, Message } from '.';
3
+ import { CartState } from './cart';
3
4
  export interface DebalesContextType {
4
5
  messages: Message[];
5
6
  isLoading: boolean;
@@ -17,7 +18,9 @@ export interface DebalesContextType {
17
18
  input: string;
18
19
  pendingQuestion: SuggestedQuestionAnswer | null;
19
20
  isFormClosedByUser: boolean;
20
- onSendMessage: (message: string, answer?: string, products?: Product[], fromKlaviyo?: boolean, leading_queries?: string[], followUpQuestion?: string, messType?: string) => Promise<void>;
21
+ onSendMessage: (message: string, answer?: string, products?: Product[], fromKlaviyo?: boolean, leading_queries?: string[], followUpQuestion?: string, messType?: string, options?: {
22
+ cart?: CartState | null;
23
+ }) => Promise<void>;
21
24
  setIsKlaviyoMessage: React.Dispatch<React.SetStateAction<boolean>>;
22
25
  setShowUserInfoModel: React.Dispatch<React.SetStateAction<boolean>>;
23
26
  setPendingBulkItems: React.Dispatch<React.SetStateAction<VariantQuantity[]>>;
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.26-canary.0",
5
+ "version": "1.1.26",
6
6
  "type": "module",
7
7
  "main": "./dist/module/ai.js",
8
8
  "types": "./dist/module/index.d.ts",