Socket
Socket
Sign inDemoInstall

@oracle/bots-node-sdk

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oracle/bots-node-sdk - npm Package Compare versions

Comparing version 2.6.0 to 2.6.1

1

bin/commands/init.js

@@ -130,2 +130,3 @@ 'use strict';

expressTypesVersion: SDK.devDependencies['@types/express'],
nodeFetchTypesVersion: SDK.devDependencies['@types/node-fetch'],
typescriptVersion: SDK.devDependencies.typescript

@@ -132,0 +133,0 @@ });

@@ -21,2 +21,3 @@ {

"@types/express": "{{expressTypesVersion}}",
"@types/node-fetch": "{{nodeFetchTypesVersion}}",
"express": "{{expressVersion}}",

@@ -23,0 +24,0 @@ "typescript": "{{typescriptVersion}}"

9

bin/templates/components/custom/template.js

@@ -16,3 +16,9 @@ 'use strict';

}),
invoke: (context, done) => {
/**
* invoke methods gets called when the custom component state is executed in the dialog flow
* @param {CustomComponentContext} context
*/
invoke: async (context) => {
// Retrieve the value of the 'human' component property.

@@ -28,4 +34,3 @@ const { human } = context.properties();

.transition(isWeekend ? 'weekend' : 'weekday');
done();
}
};

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

import {CustomComponent, CustomComponentMetadata, CustomComponentContext, InvocationCallback } from '@oracle/bots-node-sdk/lib';
import {CustomComponent, CustomComponentMetadata, CustomComponentContext} from '@oracle/bots-node-sdk/lib';

@@ -6,3 +6,3 @@ // You can use your favorite http client package to make REST calls, however, the node fetch API is pre-installed with the bots-node-sdk.

// Un-comment the next line if you want to make REST calls using node-fetch.
// import * as fetch from 'node-fetch';
// import fetch from 'node-fetch';

@@ -21,3 +21,3 @@ export class {{className}} implements CustomComponent {

public invoke(context: CustomComponentContext, done: InvocationCallback): void {
public async invoke(context: CustomComponentContext): Promise<void> {
// Retrieve the value of the 'human' component property.

@@ -33,5 +33,4 @@ const { human } = context.properties();

.transition(isWeekend ? 'weekend' : 'weekday');
done();
}
}

@@ -19,2 +19,4 @@ 'use strict';

* or a bag item value is provided while the user was prompted for another item
* @param {EntityPublishMessageEvent} event
* @param {EntityResolutionContext} context
*/

@@ -28,2 +30,4 @@ publishMessage: async (event, context) => {

* This handler is called when the composite bag entity is resolved
* @param {EntityBaseEvent} event
* @param {EntityResolutionContext} context
*/

@@ -49,2 +53,3 @@ resolved: async (event, context) => { // eslint-disable-line no-unused-vars

* Helper function to show acknowledgement message when a bag item value is updated.
* @param {EntityResolutionContext} context
*/

@@ -60,2 +65,3 @@ function updatedItemsMessage(context) {

* Helper function to show acknowledgement message when a bag item value is provided when user was prompted for anther bag item.
* @param {EntityResolutionContext} context
*/

@@ -62,0 +68,0 @@ function outOfOrderItemsMessage(context) {

@@ -5,3 +5,3 @@ import { EntityResolutionContext

, EntityEventHandlerMetadata
, EntityEvent
, EntityBaseEvent
, EntityPublishMessageEvent

@@ -13,3 +13,3 @@ } from '@oracle/bots-node-sdk/lib';

// Un-comment the next line if you want to make REST calls using node-fetch.
// import * as fetch from 'node-fetch';
// import fetch from 'node-fetch';

@@ -43,3 +43,3 @@ export class {{className}} implements EntityEventHandler {

*/
resolved: async (event: EntityEvent, context: EntityResolutionContext) => { // eslint-disable-line no-unused-vars
resolved: async (event: EntityBaseEvent, context: EntityResolutionContext) => { // eslint-disable-line no-unused-vars
// add your back-end REST API call here

@@ -46,0 +46,0 @@ }

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

/* eslint-disable no-prototype-builtins */
'use strict';

@@ -2,0 +3,0 @@

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

/* eslint-disable no-prototype-builtins */
'use strict';

@@ -2,0 +3,0 @@

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

/* eslint-disable no-prototype-builtins */
'use strict';

@@ -2,0 +3,0 @@

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

/* eslint-disable no-prototype-builtins */
'use strict';

@@ -2,0 +3,0 @@

{
"name": "@oracle/bots-node-sdk",
"version": "2.6.0",
"version": "2.6.1",
"description": "Oracle Bots SDK for custom component development and webhook integrations",

@@ -48,4 +48,5 @@ "main": "index.js",

"body-parser": "^1.19.0",
"encoding": "^0.1.13",
"leven": "^2.1.0",
"node-fetch": "^2.6.1"
"node-fetch": "^2.6.7"
},

@@ -57,3 +58,3 @@ "devDependencies": {

"docdash": "^0.4.0",
"eslint": "^5.16.0",
"eslint": "^8.11.0",
"eslint-plugin-jasmine": "^2.10.1",

@@ -64,4 +65,4 @@ "express": "^4.17.1",

"jasmine-spec-reporter": "^4.2.1",
"jsdoc": "^3.6.6",
"nyc": "^14.1.1",
"jsdoc": "^3.6.10",
"nyc": "^15.1.0",
"shx": "^0.3.3",

@@ -68,0 +69,0 @@ "supertest": "^3.4.2",

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

/* eslint-disable no-prototype-builtins */
'use strict';

@@ -2,0 +3,0 @@

@@ -27,2 +27,3 @@ import * as lib from './lib/';

type EntityEvent = lib.EntityEvent;
type EntityBaseEvent = lib.EntityBaseEvent;
type EntityItemEvents = lib.EntityItemEvents;

@@ -29,0 +30,0 @@ type EntityValidateEvent = lib.EntityValidateEvent;

@@ -44,7 +44,7 @@ import { InvocationCallback } from '../../common/definitions';

export interface EntityEvent {
init?(event: EntityEvent, context: EntityResolutionContext): void;
init?(event: EntityBaseEvent, context: EntityResolutionContext): void;
validate?(event: EntityValidateEvent, context: EntityResolutionContext): void;
publishMessage?(event: EntityPublishMessageEvent, context: EntityResolutionContext): void;
maxPromptsReached?(event: EntityMaxPromptsReachedEvent, context: EntityResolutionContext): void;
resolved?(event: EntityEvent, context: EntityResolutionContext): void;
resolved?(event: EntityBaseEvent, context: EntityResolutionContext): void;
attachmentReceived?(event: EntityAttachmentReceivedEvent, context: EntityResolutionContext): void;

@@ -60,5 +60,5 @@ locationReceived?(event: EntityLocationReceivedEvent, context: EntityResolutionContext): void;

}
export interface EntityEvent {
export interface EntityBaseEvent {
}
export interface EntityValidateEvent extends EntityEvent {
export interface EntityValidateEvent extends EntityBaseEvent {
currentItem: string;

@@ -68,3 +68,3 @@ oldValues: [string: object];

}
export interface EntityPublishMessageEvent extends EntityEvent {
export interface EntityPublishMessageEvent extends EntityBaseEvent {
currentItem: string;

@@ -74,24 +74,24 @@ promptCount?: number;

}
export interface EntityMaxPromptsReachedEvent extends EntityEvent {
export interface EntityMaxPromptsReachedEvent extends EntityBaseEvent {
currentItem: string;
promptCount: number;
}
export interface EntityAttachmentReceivedEvent extends EntityEvent {
export interface EntityAttachmentReceivedEvent extends EntityBaseEvent {
value: Attachment;
}
export interface EntityLocationReceivedEvent extends EntityEvent {
export interface EntityLocationReceivedEvent extends EntityBaseEvent {
value: Location;
}
export interface EntityItemValidateEvent extends EntityEvent {
export interface EntityItemValidateEvent extends EntityBaseEvent {
oldValue: object;
newValue: object;
}
export interface EntityItemPublishPromptMessageEvent extends EntityEvent {
export interface EntityItemPublishPromptMessageEvent extends EntityBaseEvent {
promptCount: number;
}
export interface EntityItemPublishDisambiguationMessageEvent extends EntityEvent {
export interface EntityItemPublishDisambiguationMessageEvent extends EntityBaseEvent {
disambiguationValues: object[];
}
export interface EntityItemMaxPromptsReachedEvent extends EntityEvent {
export interface EntityItemMaxPromptsReachedEvent extends EntityBaseEvent {
promptCount: number;
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc