@debales/ai 1.1.52-canary.0 → 1.1.53-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.
- package/dist/browser/ai-browser.js +633 -633
- package/dist/module/adapter/DefaultCartAdapter.d.ts +1 -2
- package/dist/module/adapter/MagentoCartAdapter.d.ts +1 -2
- package/dist/module/adapter/ShopifyCartAdapter.d.ts +1 -2
- package/dist/module/adapter/TheCollectiveCartAdapter.d.ts +2 -2
- package/dist/module/ai.js +25762 -25373
- package/dist/module/ai.umd.js +620 -620
- package/dist/module/components/common/ProductSlider.d.ts +2 -2
- package/dist/module/lib/platformDetection.d.ts +2 -2
- package/dist/module/types/debales.d.ts +3 -3
- package/dist/module/types/index.d.ts +10 -9
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DebalesContextType } from '../../types/debales';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { ECOMMERCE_PLATFORM, Message, Product, ShopifyStoreMeta, UiData } from '../../types';
|
|
4
4
|
interface ProductSliderProps {
|
|
5
5
|
message: Message;
|
|
6
6
|
botId: string;
|
|
@@ -8,7 +8,7 @@ interface ProductSliderProps {
|
|
|
8
8
|
onSendMessage: DebalesContextType["onSendMessage"];
|
|
9
9
|
loading: boolean;
|
|
10
10
|
storeMetaData: ShopifyStoreMeta | null;
|
|
11
|
-
platform:
|
|
11
|
+
platform: (typeof ECOMMERCE_PLATFORM)[keyof typeof ECOMMERCE_PLATFORM];
|
|
12
12
|
setShowVariantModel: (show: boolean) => void;
|
|
13
13
|
setSelectedProduct: (product: Product) => void;
|
|
14
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ECOMMERCE_PLATFORM } from '../types/index';
|
|
2
2
|
export declare class PlatformDetector {
|
|
3
|
-
static detect():
|
|
3
|
+
static detect(): (typeof ECOMMERCE_PLATFORM)[keyof typeof ECOMMERCE_PLATFORM];
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CartState,
|
|
1
|
+
import { CartState, EVENT_TYPE, LeadingQueries, MESSAGE_ROLE, MessageEvent, UserInfo } from '@debales/shared';
|
|
2
2
|
import { DisplayMode, Product, ShopifyStoreMeta, SuggestedQuestionAnswer, UiData, VariantQuantity, Message } from '.';
|
|
3
3
|
export interface OnSendMessageOptions {
|
|
4
4
|
message: string;
|
|
@@ -46,8 +46,8 @@ export interface DebalesContextType {
|
|
|
46
46
|
setIsFormClosedByUser: React.Dispatch<React.SetStateAction<boolean>>;
|
|
47
47
|
}
|
|
48
48
|
export interface WebsocketMessageEvent extends MessageEvent {
|
|
49
|
-
type: typeof
|
|
50
|
-
role: (typeof
|
|
49
|
+
type: typeof EVENT_TYPE.MESSAGE | typeof EVENT_TYPE.USER_ACTION;
|
|
50
|
+
role: (typeof MESSAGE_ROLE)[keyof typeof MESSAGE_ROLE];
|
|
51
51
|
query: string;
|
|
52
52
|
nameSpace: string;
|
|
53
53
|
conversationId?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IProductOption, IProductVariant } from '@debales/shared';
|
|
1
|
+
import { IProductOption, IProductVariant, ObjectValues } from '@debales/shared';
|
|
2
2
|
interface ChatBoxProps {
|
|
3
3
|
botId: string;
|
|
4
4
|
botName?: string;
|
|
@@ -145,14 +145,15 @@ export interface VariantQuantity {
|
|
|
145
145
|
price?: string;
|
|
146
146
|
productLink?: string;
|
|
147
147
|
}
|
|
148
|
-
export declare
|
|
149
|
-
DEFAULT
|
|
150
|
-
SHOPIFY
|
|
151
|
-
WOOCOMMERCE
|
|
152
|
-
MAGENTO
|
|
153
|
-
UNKNOWN
|
|
154
|
-
THE_COLLECTIVE
|
|
155
|
-
}
|
|
148
|
+
export declare const ECOMMERCE_PLATFORM: {
|
|
149
|
+
readonly DEFAULT: "DEFAULT";
|
|
150
|
+
readonly SHOPIFY: "SHOPIFY";
|
|
151
|
+
readonly WOOCOMMERCE: "WOOCOMMERCE";
|
|
152
|
+
readonly MAGENTO: "MAGENTO";
|
|
153
|
+
readonly UNKNOWN: "UNKNOWN";
|
|
154
|
+
readonly THE_COLLECTIVE: "THE_COLLECTIVE";
|
|
155
|
+
};
|
|
156
|
+
export type EcommercePlatform = ObjectValues<typeof ECOMMERCE_PLATFORM>;
|
|
156
157
|
export interface ShadowDOMRef {
|
|
157
158
|
shadowRoot: ShadowRoot;
|
|
158
159
|
container: HTMLElement;
|