I hereby claim:
- I am eduardomoroni on github.
- I am eduardomoroni (https://keybase.io/eduardomoroni) on keybase.
- I have a public key ASAD52tazSOWggocG4WNHYNLJwSJf-qCQt85KeAtNlFOqwo
To claim this, I am signing this object:
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| mQINBF/SDmQBEADPmE9wfkIAWFJj07VTqMN/Od4F0OblSVDD+4LZtEEz9/Och6vV | |
| OKrDqfFwreUTclOSaeXsSf+R+WDwCYsKn34FMpPku372OfaJzMZ9jU+SNeNVB2Tv | |
| dljYVesus88TlZnezaLNSnnhkIRQVz5vcfOKH5QDkXo2ZuQaEp9snljD49m6qHRB | |
| WRobAH9tuJUXvaRhqlmAsznrugdE35pvjarjuks++yis75TrP9cJv5hjipogeU99 | |
| u2FRCyLUz0FGv7sM2IyJu7W5VIb6j5fF9kbfclLMX1hJovBTd3hf4l5C4ud2t99e | |
| e7ENa1bTlsUzx8kFXH0ATJHN0J1455YIQs0KrGmAaraocNOc2TLnXeIgw9oXqQ/u | |
| q9Ai/NXgA/vsaQDfKRsej3VPGcBLk2BIcqoPwdq9+OmTSV8stUGSL1iLVfGS7na3 | |
| Bao/2jyIvXHYiO8usb2qaq4FppUrJH97cGiBfp0cShyxeZsiBsMfedLfUi/ij1ak |
| function findRoutes(routes) { | |
| const { sourcesMap, destinationsMap } = createRoutesMaps(routes); | |
| const startingPoint = findStartingPoint(sourcesMap, routes); | |
| const agentRoute = simulateRouteFrom(startingPoint, destinationsMap); | |
| return agentRoute.join(', '); | |
| } | |
| function simulateRouteFrom(startingPoint, destinationsMap) { | |
| const routes = [startingPoint]; |
| interface GuideBotConfiguration { | |
| id?: string; // If you don't pass an id we're creating a new bot | |
| name: string; | |
| alias: string; | |
| enabled: boolean; | |
| type: "ROUTING"; | |
| // widgetPublicId: string; Taken from the path | |
| configuration: { | |
| offlineMessage: string; | |
| steps: Array<Step>; // non empty array |
I hereby claim:
To claim this, I am signing this object:
| { | |
| event: "message", | |
| data: { | |
| visitorNumber: 1, | |
| widgetPublicId: "fa38df51-e81c-4bda-9284-831331f6352b", | |
| widgetName: "Eduardo Moroni's 1st widget", | |
| agentTransferRestricted: false, | |
| knowledgebaseAvailable: true, | |
| visitorTypingMessageEnabled: true, | |
| visitorFileExchangeEnabled: true, |
| import { all, call, put, takeLatest } from "redux-saga/effects"; | |
| import { Credential, User } from "../../entities"; | |
| import { updateUserAction } from "./user"; | |
| import { SignInInteractor } from "../../useCases"; | |
| import { SampleService } from "../../services"; | |
| export const SIGN_IN = "user/saga/sign_in"; | |
| interface SignInActionType { | |
| type: string; |
| import { Credential, User } from "../entities"; | |
| export interface SignInService { | |
| signInWithCredential: (credential: Credential) => Promise<User>; | |
| } | |
| export class SignInInteractor { | |
| signInService: SignInService; | |
| constructor(signInService: SignInService) { |
| // Rest of the file omitted | |
| const incrementReducer = ( | |
| counter: StateSliceType, | |
| action: ActionType, | |
| ): StateSliceType => { | |
| const interactor = new CounterInteractor(counter); | |
| interactor.increment(action.qty); | |
| return new Counter(interactor.counter.count); | |
| }; |
| import { Counter } from "../entities"; | |
| export class CounterInteractor { | |
| higherBound: number = 10; | |
| counter: Counter; | |
| constructor( | |
| startNumber: number, | |
| higherBound: number = 10 | |
| ) { |
| export class Counter { | |
| count: number; | |
| constructor(startNumber: number) { | |
| this.count = startNumber; | |
| } | |
| increment(qty?: number) { | |
| this.count += qty ? qty : 1; | |
| } |