Socket
Socket
Sign inDemoInstall

@salutejs/scenario

Package Overview
Dependencies
1
Maintainers
3
Versions
239
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.14.0 to 0.15.0-canary.213.f47442145fe115acc0495f85b6e238408607acc6.0

6

dist/lib/createSaluteRequest.js

@@ -25,2 +25,8 @@ "use strict";

},
get profile() {
if (request.messageName === 'TAKE_PROFILE_DATA') {
return request.payload.profile_data;
}
return undefined;
},
get inference() {

@@ -27,0 +33,0 @@ return inference;

@@ -43,2 +43,14 @@ "use strict";

};
var getProfileData = function () {
message = {
messageId: messageId,
sessionId: sessionId,
uuid: uuid,
messageName: 'GET_PROFILE_DATA',
payload: {
projectName: payload.projectName,
device: payload.device,
},
};
};
return {

@@ -122,2 +134,3 @@ appendBubble: function (bubble, options) {

runApp: runApp,
getProfileData: getProfileData,
setIntent: function (intent) {

@@ -124,0 +137,0 @@ if (message.messageName !== 'ANSWER_TO_USER') {

51

dist/lib/types/request.d.ts
import { SystemMessage, SystemMessageName, SystemMessagePayload } from './systemMessage';
export declare type NLPRequestType = Extract<SystemMessageName, 'MESSAGE_TO_SKILL' | 'SERVER_ACTION' | 'RUN_APP' | 'CLOSE_APP'>;
export declare type NLPRequestType = Extract<SystemMessageName, 'MESSAGE_TO_SKILL' | 'SERVER_ACTION' | 'RUN_APP' | 'CLOSE_APP'> | 'TAKE_PROFILE_DATA';
export interface NLPRequestBody<T, P> extends Pick<SystemMessage, 'sessionId' | 'messageId' | 'uuid'> {

@@ -45,3 +45,50 @@ /** Тип запроса */

export declare type NLPRequestСA = NLPRequestBody<Extract<NLPRequestType, 'CLOSE_APP'>, MTSPayload>;
export declare type NLPRequest = NLPRequestRA | NLPRequestСA | NLPRequestMTS | NLPRequestSA;
declare type TakeProfileDataStatuses = {
code: 1;
description: string;
} | {
code: 100;
description: string;
} | {
code: 101;
description: string;
} | {
code: 102;
description: string;
} | {
code: 103;
description: string;
} | {
code: 104;
description: string;
};
export declare type NLPRequestTPD = NLPRequestBody<Extract<NLPRequestType, 'TAKE_PROFILE_DATA'>, SharedRequestPayload & {
profile_data: {
customer_name?: string;
address?: {
address_string: string;
address_type: string;
alias: string;
comment: string;
confirmed: boolean;
country: string;
district: string;
location: {
latitude: number;
longitude: number;
};
last_used: boolean;
apartment: string;
entrance: string;
floor: string;
region: string;
street: string;
house: string;
};
phone_number?: string;
};
status_code: TakeProfileDataStatuses;
}>;
export declare type NLPRequest = NLPRequestRA | NLPRequestСA | NLPRequestMTS | NLPRequestSA | NLPRequestTPD;
export {};
//# sourceMappingURL=request.d.ts.map

5

dist/lib/types/response.d.ts
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'>;
export declare type NLPResponseType = Extract<SystemMessageName, 'ANSWER_TO_USER' | 'POLICY_RUN_APP' | 'NOTHING_FOUND' | 'ERROR'> | 'GET_PROFILE_DATA' | 'CHOOSE_PROFILE_DATA' | 'DETAILED_PROFILE_DATA';
export interface NLPResponseBody<T, P> extends Pick<SystemMessage, 'sessionId' | 'messageId' | 'uuid'> {

@@ -51,3 +51,4 @@ /** Тип ответа. Определяет логику обработки. */

export declare type NLPResponseE = NLPResponseBody<Extract<NLPResponseType, 'ERROR'>, EPayload>;
export declare type NLPResponse = NLPResponseATU | NLPResponseE | NLPResponseNF | NLPResponsePRA;
export declare type NLPResponseGPD = NLPResponseBody<Extract<NLPResponseType, 'GET_PROFILE_DATA'>, SharedResponsePayload>;
export declare type NLPResponse = NLPResponseATU | NLPResponseE | NLPResponseNF | NLPResponsePRA | NLPResponseGPD;
//# sourceMappingURL=response.d.ts.map
import { AppInfo, CharacterId, AppState, Message, SmartAppErrorCommand, EmotionId, Card, Bubble, Button, ASRHints, PolicyRunAppComand } from './systemMessage';
import { NLPRequest } from './request';
import { NLPRequest, NLPRequestTPD } from './request';
import { NLPResponse } from './response';

@@ -54,2 +54,3 @@ import { KeysetDictionary, I18nOptions } from './i18n';

readonly variables: V;
readonly profile?: NLPRequestTPD['payload']['profile_data'];
setInference: (value: Inference) => void;

@@ -85,2 +86,3 @@ setVariable: (name: string, value: unknown) => void;

setEmotion: (emotion: EmotionId) => void;
getProfileData: () => void;
readonly message: NLPResponse;

@@ -87,0 +89,0 @@ }

{
"name": "@salutejs/scenario",
"version": "0.14.0",
"version": "0.15.0-canary.213.f47442145fe115acc0495f85b6e238408607acc6.0",
"description": "Tiny helpers to make scenario for Salute family",

@@ -39,3 +39,3 @@ "author": "SberDevices Frontend Team <sberdevices.frontend@gmail.com>",

},
"gitHead": "b1c572dcc86228f35a19bf8b1bcc15d31d4cb2e7"
"gitHead": "f47442145fe115acc0495f85b6e238408607acc6"
}

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc