Socket
Socket
Sign inDemoInstall

@salutejs/scenario

Package Overview
Dependencies
8
Maintainers
4
Versions
239
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0-canary.138.8797670945.0

1

dist/lib/createSaluteResponse.js

@@ -127,2 +127,3 @@ "use strict";

}
// @ts-ignore
message.payload.items.push({ command: { type: 'smart_app_data', smart_app_data: __assign({}, command) } });

@@ -129,0 +130,0 @@ },

20

dist/lib/matchers.d.ts

@@ -13,20 +13,4 @@ import { IntentsDict, SaluteRequest } from './types/salute';

state: (expected: Partial<R['state']>) => (req: R) => any;
selectItem: (expected: AppState) => (req: R) => {
[k: string]: unknown;
number?: number | undefined;
id?: string | undefined;
title?: string | undefined;
aliases?: string[] | undefined;
server_action?: unknown;
action?: unknown;
} | undefined;
selectItems: (expected: AppState) => (req: R) => {
[k: string]: unknown;
number?: number | undefined;
id?: string | undefined;
title?: string | undefined;
aliases?: string[] | undefined;
server_action?: unknown;
action?: unknown;
}[] | undefined;
selectItem: (expected: AppState) => (req: R) => any;
selectItems: (expected: AppState) => (req: R) => any;
action: (expected: string) => (req: R) => boolean;

@@ -33,0 +17,0 @@ regexp: (re: RegExp, { normalized }?: {

@@ -56,3 +56,5 @@ "use strict";

}; };
var selectItems = function (expected) { return function (req) { var _a, _b, _c; return (_c = (_b = (_a = req.state) === null || _a === void 0 ? void 0 : _a.item_selector) === null || _b === void 0 ? void 0 : _b.items) === null || _c === void 0 ? void 0 : _c.filter(function (i) { return exports.compare(expected, i); }); }; };
var selectItems = function (expected) { return function (req) { var _a, _b, _c; return (_c = (_b = (_a =
// @ts-ignore
req.state) === null || _a === void 0 ? void 0 : _a.item_selector) === null || _b === void 0 ? void 0 : _b.items) === null || _c === void 0 ? void 0 : _c.filter(function (i) { return exports.compare(expected, i); }); }; };
var selectItem = function (expected) { return function (req) {

@@ -68,3 +70,3 @@ var items = selectItems(expected)(req);

var testText = normalized ? (_a = req.message) === null || _a === void 0 ? void 0 : _a.human_normalized_text : (_b = req.message) === null || _b === void 0 ? void 0 : _b.original_text;
var result = re.exec(testText);
var result = typeof testText === 'string' ? re.exec(testText) : null;
if (result === null) {

@@ -71,0 +73,0 @@ return false;

@@ -67,3 +67,2 @@ "use strict";

var uuid_1 = require("uuid");
var systemMessage_1 = require("./types/systemMessage");
var URL = 'https://salute.online.sberbank.ru:9443/api/v2/smartpush/apprequest';

@@ -87,2 +86,15 @@ var TOKEN_URL = 'https://salute.online.sberbank.ru:9443/api/v2/oauth';

};
var DefaultChannels = {
SBERBOX: 'B2C',
SBERBOOM: 'B2C',
SBERBOOM_MINI: 'B2C',
SBERBOOM_R2: 'B2C',
STARGATE: 'B2C',
SATELLITE: 'B2C',
TIME: 'B2C',
TV: 'B2C',
TV_HUAWEI: 'B2C',
COMPANION: 'COMPANION_B2C',
SBOL: 'SBOL',
};
var sendPush = function (accessToken, requestId, messageId, _a) {

@@ -112,3 +124,3 @@ var projectId = _a.projectId, clientIdSub = _a.clientIdSub, deliveryConfig = _a.deliveryConfig;

var surface = _a.surface, destination = __rest(_a, ["surface"]);
return (__assign(__assign({}, destination), { surface: surface, channel: systemMessage_1.DefaultChannels[surface] }));
return (__assign(__assign({}, destination), { surface: surface, channel: DefaultChannels[surface] }));
}) }),

@@ -115,0 +127,0 @@ },

@@ -1,2 +0,2 @@

import { Surface, UserChannel } from './systemMessage';
import { Surface } from './systemMessage';
export declare type ProtocolVersion = 'V1';

@@ -67,3 +67,3 @@ export interface Sender {

/** Канал получателя. Пример: B2C */
channel: UserChannel;
channel: string;
/** Поверхность получателя. Пример: SBERBOX */

@@ -70,0 +70,0 @@ surface: Surface;

"use strict";
/* eslint-disable max-len */
/* eslint-disable no-use-before-define */
/* tslint:disable */
/**
* This file was automatically generated by json-schema-to-typescript. DO NOT MODIFY IT BY HAND. Instead, modify the
* source JSONSchema file, and run json-schema-to-typescript to regenerate this file.
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefaultChannels = void 0;
// Extension
/**
* Дефолтные каналы для поверхностей
*/
exports.DefaultChannels = {
SBERBOX: 'B2C',
SBERBOOM: 'B2C',
SBERBOOM_MINI: 'B2C',
SBERBOOM_R2: 'B2C',
STARGATE: 'B2C',
SATELLITE: 'B2C',
TIME: 'B2C',
TV: 'B2C',
TV_HUAWEI: 'B2C',
COMPANION: 'COMPANION_B2C',
SBOL: 'SBOL',
};
{
"name": "@salutejs/scenario",
"version": "1.1.0",
"version": "1.2.0-canary.138.8797670945.0",
"description": "Tiny helpers to make scenario for Salute family",

@@ -40,3 +40,3 @@ "author": "Salute Frontend Team <salute.developers@gmail.com>",

},
"gitHead": "e98eaff885026409e723cb1774b43872c1b14d17"
"gitHead": "d7e95b478857c2fd85d58bdc475b96918850024b"
}

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 too big to display

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