@salutejs/scenario
Advanced tools
Comparing version 0.21.0-canary.258.5ceffd1924ffaea18e6da56dd1489bfb92d5e96c.0 to 0.21.0
@@ -0,1 +1,13 @@ | ||
# v0.21.0 (Mon Dec 20 2021) | ||
#### 🚀 Enhancement | ||
- feat: Добавлен экшн StartSmartSearchAction [#257](https://github.com/sberdevices/salutejs/pull/257) ([@evgeniysemin](https://github.com/evgeniysemin)) | ||
#### Authors: 1 | ||
- [@evgeniysemin](https://github.com/evgeniysemin) | ||
--- | ||
# v0.20.0 (Mon Dec 06 2021) | ||
@@ -2,0 +14,0 @@ |
@@ -205,8 +205,2 @@ "use strict"; | ||
}, | ||
overrideFrontendEndpoint: function (frontendEndpoint) { | ||
if (message.messageName !== 'ANSWER_TO_USER') { | ||
throw new Error('Wrong message type'); | ||
} | ||
message.payload.app_info = __assign(__assign({}, payload.app_info), { frontendEndpoint: frontendEndpoint }); | ||
}, | ||
get message() { | ||
@@ -213,0 +207,0 @@ return message; |
@@ -1,2 +0,2 @@ | ||
import { SystemMessage, SystemMessageName, SystemMessagePayload, AssistantCommand, BubbleCommand, CardCommand, PolicyRunAppComand, AppInfo } from './systemMessage'; | ||
import { SystemMessage, SystemMessageName, SystemMessagePayload, AssistantCommand, BubbleCommand, CardCommand, PolicyRunAppComand } from './systemMessage'; | ||
export declare type NLPResponseType = Extract<SystemMessageName, 'ANSWER_TO_USER' | 'POLICY_RUN_APP' | 'NOTHING_FOUND' | 'ERROR'> | 'GET_PROFILE_DATA' | 'CHOOSE_PROFILE_DATA' | 'DETAILED_PROFILE_DATA'; | ||
@@ -22,3 +22,2 @@ export interface NLPResponseBody<T, P> extends Pick<SystemMessage, 'sessionId' | 'messageId' | 'uuid'> { | ||
finished: boolean; | ||
app_info?: AppInfo; | ||
} | ||
@@ -25,0 +24,0 @@ /** ANSWER_TO_USER Response */ |
@@ -89,3 +89,2 @@ import { AppInfo, CharacterId, AppState, Message, SmartAppErrorCommand, EmotionId, Card, Bubble, Button, ASRHints, PolicyRunAppComand } from './systemMessage'; | ||
openDeepLink: (deepLink: string) => void; | ||
overrideFrontendEndpoint: (frontendEndpoint: string) => void; | ||
readonly message: NLPResponse; | ||
@@ -92,0 +91,0 @@ } |
@@ -52,3 +52,3 @@ /** | ||
export declare type EmotionId = 'igrivost' | 'udovolstvie' | 'podavleniye_gneva' | 'smushchennaya_ulibka' | 'simpatiya' | 'oups' | 'laugh' | 'ok_prinyato' | 'bespokoistvo' | 'predvkusheniye' | 'vinovatiy' | 'zhdu_otvet' | 'zadumalsa' | 'neznayu' | 'nedoumenie' | 'nedovolstvo' | 'nesoglasie' | 'pechal' | 'radost' | 'sochuvstvie' | 'strakh' | 'zainteresovannost'; | ||
export declare type Action = TextAction | DeepLinkAction | SendContactPhone | ServerAction | CopyTextAction; | ||
export declare type Action = TextAction | DeepLinkAction | SendContactPhone | ServerAction | StartSmartSearchAction | CopyTextAction; | ||
export declare type Card = ListCard | GalleryCard | GridCard | DiscoveryCard | QRCodeCard | WidgetTitleCard | WidgetGallery | WidgetGalleryWithCategories | WidgetSingleCard | WidgetTwoColumns; | ||
@@ -828,2 +828,25 @@ /** | ||
/** | ||
* Запрос поиска от сценария. | ||
*/ | ||
export interface StartSmartSearchAction { | ||
/** | ||
* Тип действия. | ||
*/ | ||
type: 'start_smart_search'; | ||
/** | ||
* Данные запроса. | ||
*/ | ||
start_smart_search: { | ||
/** | ||
* Текст запроса, который прислал сценарий. | ||
*/ | ||
query: string; | ||
/** | ||
* Время за которое поиск должен ответить. | ||
*/ | ||
timeoutMS?: string; | ||
}; | ||
[k: string]: unknown; | ||
} | ||
/** | ||
* Закрытие смартапа. | ||
@@ -830,0 +853,0 @@ */ |
{ | ||
"name": "@salutejs/scenario", | ||
"version": "0.21.0-canary.258.5ceffd1924ffaea18e6da56dd1489bfb92d5e96c.0", | ||
"version": "0.21.0", | ||
"description": "Tiny helpers to make scenario for Salute family", | ||
@@ -39,3 +39,3 @@ "author": "SberDevices Frontend Team <sberdevices.frontend@gmail.com>", | ||
}, | ||
"gitHead": "5ceffd1924ffaea18e6da56dd1489bfb92d5e96c" | ||
"gitHead": "3e2004565afe1f44059744d486b8446534a6f0a0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
327239
4059