@getlupa/vue 0.3.1 → 0.3.2
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/lupaSearch.js +1100 -571
- package/dist/lupaSearch.mjs +1101 -572
- package/dist/src/chat/ChatService.d.ts +33 -0
- package/dist/src/components/chat/ChatContainer.vue.d.ts +14 -0
- package/dist/src/components/chat/ChatContentEntry.vue.d.ts +34 -0
- package/dist/src/components/chat/ChatContentEntryPhrase.vue.d.ts +24 -0
- package/dist/src/components/chat/ChatContentList.vue.d.ts +34 -0
- package/dist/src/components/chat/ChatInput.vue.d.ts +15 -0
- package/dist/src/components/chat/ChatPhraseProductsList.vue.d.ts +23 -0
- package/dist/src/components/chat/ChatSpinner.vue.d.ts +21 -0
- package/dist/src/index.d.ts +4 -2
- package/dist/src/types/chat/ChatLog.d.ts +9 -0
- package/dist/src/types/chat/ChatOptions.d.ts +6 -0
- package/dist/src/types/chat/SearchChatRequest.d.ts +9 -0
- package/dist/src/types/chat/SearchChatResponse.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SdkOptions } from '..';
|
|
2
|
+
import { ChatMessage, SearchChatRequest } from '../types/chat/SearchChatRequest';
|
|
3
|
+
import { SearchChatResponse } from '../types/chat/SearchChatResponse';
|
|
4
|
+
import { ChatContent } from '../types/chat/ChatLog';
|
|
5
|
+
declare const _default: {
|
|
6
|
+
suggestSearchChatPhrases: (options: SdkOptions, request: SearchChatRequest) => Promise<Partial<SearchChatResponse> & {
|
|
7
|
+
success: boolean;
|
|
8
|
+
errors: any;
|
|
9
|
+
}>;
|
|
10
|
+
suggestPhraseAlternatives: (options: SdkOptions, { phrases }: {
|
|
11
|
+
phrases: string[];
|
|
12
|
+
}) => Promise<Partial<SearchChatResponse> & {
|
|
13
|
+
success: boolean;
|
|
14
|
+
errors: any;
|
|
15
|
+
}>;
|
|
16
|
+
suggestSimplifiedPhrases: (options: SdkOptions, { phrases }: {
|
|
17
|
+
phrases: string[];
|
|
18
|
+
}) => Promise<Partial<SearchChatResponse> & {
|
|
19
|
+
success: boolean;
|
|
20
|
+
errors: any;
|
|
21
|
+
}>;
|
|
22
|
+
suggestBestProductMatches: (options: SdkOptions, { initialQuery, productStrings, messageHistory }: {
|
|
23
|
+
initialQuery: string;
|
|
24
|
+
productStrings: string[];
|
|
25
|
+
messageHistory: ChatMessage[];
|
|
26
|
+
}) => Promise<{
|
|
27
|
+
products?: string[];
|
|
28
|
+
success: boolean;
|
|
29
|
+
errors: any;
|
|
30
|
+
}>;
|
|
31
|
+
prepareChatHistory: (chatLog: ChatContent[]) => ChatMessage[];
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { ChatOptions } from '../../types/chat/ChatOptions';
|
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
options: {
|
|
5
|
+
type: __PropType<ChatOptions>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
options: {
|
|
10
|
+
type: __PropType<ChatOptions>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}>>, {}, {}>;
|
|
14
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { ChatContent } from '../../types/chat/ChatLog';
|
|
3
|
+
import { ChatOptions } from '../../types/chat/ChatOptions';
|
|
4
|
+
import { ChatMessage } from '../../types/chat/SearchChatRequest';
|
|
5
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
6
|
+
entry: {
|
|
7
|
+
type: __PropType<ChatContent>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
options: {
|
|
11
|
+
type: __PropType<ChatOptions>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
history: {
|
|
15
|
+
type: __PropType<ChatMessage[]>;
|
|
16
|
+
required: false;
|
|
17
|
+
};
|
|
18
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "loaded"[], "loaded", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
entry: {
|
|
20
|
+
type: __PropType<ChatContent>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
options: {
|
|
24
|
+
type: __PropType<ChatOptions>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
history: {
|
|
28
|
+
type: __PropType<ChatMessage[]>;
|
|
29
|
+
required: false;
|
|
30
|
+
};
|
|
31
|
+
}>> & {
|
|
32
|
+
onLoaded?: (...args: any[]) => any;
|
|
33
|
+
}, {}, {}>;
|
|
34
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { ChatOptions } from '../../types/chat/ChatOptions';
|
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
options: {
|
|
5
|
+
type: __PropType<ChatOptions>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
phrase: {
|
|
9
|
+
type: __PropType<string>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "loaded"[], "loaded", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
options: {
|
|
14
|
+
type: __PropType<ChatOptions>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
phrase: {
|
|
18
|
+
type: __PropType<string>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>> & {
|
|
22
|
+
onLoaded?: (...args: any[]) => any;
|
|
23
|
+
}, {}, {}>;
|
|
24
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { ChatContent } from '../../types/chat/ChatLog';
|
|
3
|
+
import { ChatOptions } from '../../types/chat/ChatOptions';
|
|
4
|
+
import { ChatMessage } from '../../types/chat/SearchChatRequest';
|
|
5
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
6
|
+
content: {
|
|
7
|
+
type: __PropType<ChatContent[]>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
options: {
|
|
11
|
+
type: __PropType<ChatOptions>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
history: {
|
|
15
|
+
type: __PropType<ChatMessage[]>;
|
|
16
|
+
required: false;
|
|
17
|
+
};
|
|
18
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "loaded"[], "loaded", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
content: {
|
|
20
|
+
type: __PropType<ChatContent[]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
options: {
|
|
24
|
+
type: __PropType<ChatOptions>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
history: {
|
|
28
|
+
type: __PropType<ChatMessage[]>;
|
|
29
|
+
required: false;
|
|
30
|
+
};
|
|
31
|
+
}>> & {
|
|
32
|
+
onLoaded?: (...args: any[]) => any;
|
|
33
|
+
}, {}, {}>;
|
|
34
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
3
|
+
disabled: {
|
|
4
|
+
type: __PropType<boolean>;
|
|
5
|
+
required: false;
|
|
6
|
+
};
|
|
7
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], "submit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
disabled: {
|
|
9
|
+
type: __PropType<boolean>;
|
|
10
|
+
required: false;
|
|
11
|
+
};
|
|
12
|
+
}>> & {
|
|
13
|
+
onSubmit?: (...args: any[]) => any;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
import { SearchResultsProductOptions } from '../../types/search-results/SearchResultsOptions';
|
|
3
|
+
import { Document } from '@getlupa/client-sdk/Types';
|
|
4
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
5
|
+
options: {
|
|
6
|
+
type: __PropType<SearchResultsProductOptions>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
searchResults: {
|
|
10
|
+
type: __PropType<Document[]>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
|
+
options: {
|
|
15
|
+
type: __PropType<SearchResultsProductOptions>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
searchResults: {
|
|
19
|
+
type: __PropType<Document[]>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
}>>, {}, {}>;
|
|
23
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PropType as __PropType } from 'vue';
|
|
2
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
3
|
+
small: {
|
|
4
|
+
type: __PropType<boolean>;
|
|
5
|
+
required: false;
|
|
6
|
+
};
|
|
7
|
+
message: {
|
|
8
|
+
type: __PropType<string>;
|
|
9
|
+
required: false;
|
|
10
|
+
};
|
|
11
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
small: {
|
|
13
|
+
type: __PropType<boolean>;
|
|
14
|
+
required: false;
|
|
15
|
+
};
|
|
16
|
+
message: {
|
|
17
|
+
type: __PropType<string>;
|
|
18
|
+
required: false;
|
|
19
|
+
};
|
|
20
|
+
}>>, {}, {}>;
|
|
21
|
+
export default _sfc_main;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -18,11 +18,13 @@ import SearchResults from './components/search-results/SearchResults.vue';
|
|
|
18
18
|
import ProductList from './components/product-list/ProductList.vue';
|
|
19
19
|
import SearchContainer from './components/search-container/SearchContainer.vue';
|
|
20
20
|
import Recommendations from './components/recommendations/Recommendations.vue';
|
|
21
|
+
import ChatContainer from './components/chat/ChatContainer.vue';
|
|
21
22
|
import { getInitialSearchResults } from './utils/ssr.utils';
|
|
23
|
+
import { ChatOptions } from './types/chat/ChatOptions';
|
|
22
24
|
declare const initPinia: () => Pinia;
|
|
23
25
|
declare const setupTracking: (options: TrackingOptions) => void;
|
|
24
26
|
declare const LupaSearch: {
|
|
25
27
|
install: (app: any, options: any) => void;
|
|
26
28
|
};
|
|
27
|
-
export { SearchBox, SearchResults, ProductList, Recommendations, SearchContainer, DocumentElementType, SearchBoxPanelType, BadgeType, setupTracking, LupaSearch, initPinia, getInitialSearchResults };
|
|
28
|
-
export type { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, FacetStyle, Environment, RoutingBehavior, AnchorPosition, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, SortOptions, SearchResultsSortOptions, SearchResultEventCallbacks, CallbackContext, SortCallbackContext, FacetFilterQuery, CategoryFilterOptions, SearchResultsFilterOptions, SearchResultBadgeType, SearchResultBadgeElement, ResultFacetOptions, BadgeGenerateSeed, BadgeGenerateOptions, BadgeOptions, SearchContainerOptions, SearchContainerConfigOptions, SingleStarRatingElement, DynamicData, ProductRecommendationOptions, RecommendationABTestingOptions, SsrOptions };
|
|
29
|
+
export { SearchBox, SearchResults, ProductList, Recommendations, SearchContainer, ChatContainer, DocumentElementType, SearchBoxPanelType, BadgeType, setupTracking, LupaSearch, initPinia, getInitialSearchResults };
|
|
30
|
+
export type { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, FacetStyle, Environment, RoutingBehavior, AnchorPosition, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, SortOptions, SearchResultsSortOptions, SearchResultEventCallbacks, CallbackContext, SortCallbackContext, FacetFilterQuery, CategoryFilterOptions, SearchResultsFilterOptions, SearchResultBadgeType, SearchResultBadgeElement, ResultFacetOptions, BadgeGenerateSeed, BadgeGenerateOptions, BadgeOptions, SearchContainerOptions, SearchContainerConfigOptions, SingleStarRatingElement, DynamicData, ProductRecommendationOptions, RecommendationABTestingOptions, SsrOptions, ChatOptions };
|