Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Loader functionality for Viber adapter #34

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ebenos/monorepo",
"version": "3.1.0",
"version": "3.1.1",
"main": "index.js",
"license": "MIT",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/framework/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ebenos/framework",
"version": "4.0.0-alpha.29",
"name": "@ebonydevcopy/framework",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't these references be changed here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this pull request is just to keep track of the changes in the copy package. I'll make a new one with the correct changes for review and merging OTD

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

"version": "4.0.0-alpha.30",
"description": "A module-based NodeJS chatbot framework.",
"main": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down
9 changes: 7 additions & 2 deletions packages/viber-adapter/lib/adapter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { EbonyHandlers, GenericAdapter, GenericAttachment, IRouters } from '@ebenos/framework';
import {
EbonyHandlers,
GenericAdapter,
GenericAttachment,
IRouters
} from '@ebonydevcopy/framework';
import express, { Request, Response } from 'express';
import { json as bodyParser } from 'body-parser';
import senderFactory from './sender';
Expand All @@ -18,7 +23,7 @@ import {
IViberTextMessage
} from './interfaces/message_types';
import { isPostbackTrackingData } from './interfaces/tracking_data';
import { ITrackingData, IUser } from '@ebenos/framework';
import { ITrackingData, IUser } from '@ebonydevcopy/framework';

export interface IViberOptions<U> {
route?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/viber-adapter/lib/sender.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IInteraction } from '@ebenos/framework';
import { IInteraction } from '@ebonydevcopy/framework';
import { sendMessage } from './api/requests';

export default function senderFactory(viberToken: string) {
Expand Down
6 changes: 3 additions & 3 deletions packages/viber-adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ebenos/viber-adapter",
"version": "4.0.0-alpha.29",
"name": "@ebonydevcopy/viber-adapter",
"version": "4.0.0-alpha.31",
"description": "Viber adapter for the Ebony framework.",
"main": "./build/index.js",
"publishConfig": {
Expand Down Expand Up @@ -33,7 +33,7 @@
"node-fetch": "^2.6.6"
},
"devDependencies": {
"@ebenos/framework": "^4.0.0-alpha.29",
"@ebonydevcopy/framework": "^4.0.0-alpha.29",
"@types/body-parser": "^1.19.2",
"@types/express": "^4.17.13",
"@types/node-fetch": "^2.5.12"
Expand Down
2 changes: 1 addition & 1 deletion packages/viber-elements/lib/viberAPI/attachments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
OpenURLMediaType,
ISerializedButton
} from './interfaces';
import { ISerializable } from '@ebenos/framework';
import { ISerializable } from '@ebonydevcopy/framework';

/**Viber RichMedia Button */
export class Button implements ISerializable {
Expand Down
2 changes: 1 addition & 1 deletion packages/viber-elements/lib/viberAPI/carousel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, RichMedia } from './attachments';
import { IFrame, IRichMediaOptions } from './interfaces';
import { ISerializable } from '@ebenos/framework';
import { ISerializable } from '@ebonydevcopy/framework';

export interface ICarouselElement {
title?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/viber-elements/lib/viberAPI/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RichMedia, Picture, Button } from './attachments';
import { Carousel } from './carousel';
import { Keyboard } from './keyboard';
import { ITrackingData } from '@ebenos/framework';
import { ITrackingData } from '@ebonydevcopy/framework';

export type ScaleType = 'crop' | 'fill' | 'fit';
export type ActionType = 'reply' | 'open-url' | 'location-picker' | 'share-phone' | 'none';
Expand Down
2 changes: 1 addition & 1 deletion packages/viber-elements/lib/viberAPI/keyboard.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ISerializable } from '@ebenos/framework';
import { ISerializable } from '@ebonydevcopy/framework';
import { Button } from './attachments';
import { IKeyboardOptions, InputFieldState, ISerializedKeyboard } from './interfaces';

Expand Down
4 changes: 2 additions & 2 deletions packages/viber-elements/lib/viberAPI/message.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ISerializable } from '@ebenos/framework';
import { ISerializable } from '@ebonydevcopy/framework';
import {
IMessageOptions,
ISender,
Expand All @@ -12,7 +12,7 @@ import {
import { Picture, RichMedia } from './attachments';
import { Keyboard } from './keyboard';
import { Carousel } from './carousel';
import { ITrackingData } from '@ebenos/framework';
import { ITrackingData } from '@ebonydevcopy/framework';

function isText(options: IMessageOptions): options is ITextOptions {
return (options as ITextOptions).text !== undefined;
Expand Down
8 changes: 4 additions & 4 deletions packages/viber-elements/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ebenos/viber-elements",
"version": "4.0.0-alpha.29",
"name": "@ebonydevcopy/viber-elements",
"version": "4.0.0-alpha.31",
"description": "Elements Library for the Ebony framework.",
"main": "./build/index.js",
"publishConfig": {
Expand Down Expand Up @@ -29,10 +29,10 @@
],
"license": "MIT",
"peerDependencies": {
"@ebenos/framework": "*"
"@ebonydevcopy/framework": "*"
},
"devDependencies": {
"@ebenos/framework": "^4.0.0-alpha.29"
"@ebonydevcopy/framework": "^4.0.0-alpha.29"
},
"engines": {
"node": ">=14.0.0"
Expand Down
59 changes: 58 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@ebenos/framework@^4.0.0-alpha.29":
version "4.0.0-alpha.29"
resolved "https://registry.yarnpkg.com/@ebenos/framework/-/framework-4.0.0-alpha.29.tgz#966f8535dd7d7abcdb2de5ea4bcad4bac371d6bc"
integrity sha512-P+9RDnP2AZNCGGY0QNY+WMEfTGOWSGuhnjJ0IKNdhGk+Pvp8bDRZ329BHuIYE5KjUajOZbY/pTvnys3smu7Zrw==
dependencies:
lodash "^4.17.21"
mongodb "^4.2.0"
mongoose "^6.0.13"

"@ebenos/viber-adapter@^4.0.0-alpha.29":
version "4.0.0-alpha.29"
resolved "https://registry.yarnpkg.com/@ebenos/viber-adapter/-/viber-adapter-4.0.0-alpha.29.tgz#b849d77f6604b2156156f12f5de2dc3ab4db9048"
integrity sha512-hhaf3c05kI7txUF5dbWFsN9Om0CobhAs82KFfo1Hsxvwk4QboOX6Bgklv2lzvWj2szV4HGUskeQPp0BINIx8bw==
dependencies:
body-parser "^1.19.0"
express "^4.17.1"
node-fetch "^2.6.6"

"@eslint/eslintrc@^1.0.4":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.4.tgz#dfe0ff7ba270848d10c5add0715e04964c034b31"
Expand Down Expand Up @@ -1414,7 +1432,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==

bson@^4.2.2, bson@^4.5.4:
bson@^4.2.2, bson@^4.5.4, bson@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/bson/-/bson-4.6.0.tgz#15c3b39ba3940c3d915a0c44d51459f4b4fbf1b2"
integrity sha512-8jw1NU1hglS+Da1jDOUYuNcBJ4cNHCFIqzlwoFNnsTOg2R/ox0aTYcTiBN4dzRa9q7Cvy6XErh3L8ReTEb9AQQ==
Expand Down Expand Up @@ -3328,6 +3346,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.2.tgz#78c4508894985b8d38a0dc15e1a8e11078f2ca93"
integrity sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==

[email protected]:
version "2.3.3"
resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.3.tgz#a4432d7965a5bb06fc2b4eeae71317344c9a756a"
integrity sha512-uESCXM2KdtOQ8LOvKyTUXEeg0MkYp4wGglTIpGcYHvjJcS5sn2Wkfrfit8m4xSbaNDAw2KdI9elgkOxZbrFYbg==

kind-of@^6.0.2, kind-of@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
Expand Down Expand Up @@ -3800,6 +3823,14 @@ mongodb-connection-string-url@^2.1.0, mongodb-connection-string-url@^2.2.0:
"@types/whatwg-url" "^8.2.1"
whatwg-url "^11.0.0"

mongodb-connection-string-url@^2.3.2:
version "2.4.1"
resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-2.4.1.tgz#6b3c6c40133a0ad059fe9a0abda64b2a1cb4e8b4"
integrity sha512-d5Kd2bVsKcSA7YI/yo57fSTtMwRQdFkvc5IZwod1RRxJtECeWPPSo7zqcUGJELifRA//Igs4spVtYAmvFCatug==
dependencies:
"@types/whatwg-url" "^8.2.1"
whatwg-url "^11.0.0"

[email protected]:
version "4.1.4"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.1.4.tgz#ba8062c7c67e7a22db5a059dbac1e3044b48453b"
Expand All @@ -3811,6 +3842,17 @@ [email protected]:
optionalDependencies:
saslprep "^1.0.3"

[email protected]:
version "4.2.2"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.2.2.tgz#cd70568bd96003877e35358ad17a0c5de35c6dfd"
integrity sha512-zt8rCTnTKyMQppyt63qMnrLM5dbADgUk18ORPF1XbtHLIYCyc9hattaYHi0pqMvNxDpgGgUofSVzS+UQErgTug==
dependencies:
bson "^4.6.0"
denque "^2.0.1"
mongodb-connection-string-url "^2.3.2"
optionalDependencies:
saslprep "^1.0.3"

mongodb@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.2.0.tgz#7ef94ab0613a2fd890763260fdac20cd099d0d7f"
Expand All @@ -3822,6 +3864,21 @@ mongodb@^4.2.0:
optionalDependencies:
saslprep "^1.0.3"

mongoose@^6.0.13:
version "6.1.4"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-6.1.4.tgz#a414e64c849fae3ced99348e9de73f986c9f0551"
integrity sha512-RsNiMpGWo7OXFmq5xt0ZWYt2rabHLxNYr0oAiR0xDv23lHKCkXDqyDl71+sXF9rcWEe8BTHG+1IRQykiNBvaKQ==
dependencies:
bson "^4.2.2"
kareem "2.3.3"
mongodb "4.2.2"
mpath "0.8.4"
mquery "4.0.0"
ms "2.1.2"
regexp-clone "1.0.0"
sift "13.5.2"
sliced "1.0.1"

mongoose@^6.0.14:
version "6.0.14"
resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-6.0.14.tgz#8f4d45318bb5de08814a8a9b040dd53521246608"
Expand Down