Git Product home page Git Product logo

circuit-sdk's People

Contributors

dependabot[bot] avatar rogeru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circuit-sdk's Issues

Automation of Circuit mobile app calls with Unify's OS4K

Hi
I'm a member of the Solution test team for Circuit from Brasov, Romania. We are performing the Circuit tests with os4k and SBC (web browsers, desktop application, mobile clients). I'm interested in automation of the mobile Circuit calls trough os4k on both iOS and Android platforms (these tests we are performing now manually, which is a big time-consuming activity, especially for regression tests).
On a quick read I found your work very interesting and I will study it more in details next weeks.
It might bring a great extra value to my work duties.
The guys from OSMO (Athens) integrated such kind of tests in an automated environment. Is there a way to perform also mobile tests with Circuit in automated environment - Jenkins, Appium, Android SDK or anything else?
Can you help me designing and implementing such a solution? I'm learning automation from scratch now :)

Regards,
Radu Hociung
[email protected]

Not able to use OAuth2 without redirect_uri

I have tried to use OAuth2 to login to Circuit and after granting access get told that no redirect is set.

I have used the following code like specified in the documentation:


const client = new Circuit.Client({
            domain: 'circuitsandbox.net',
            client_id: '78cafde2f6854ad5ad80a67c532687bc',
        });
client.logon()
            .then(user => console.log('Logged on as ' + user.displayName))

How to access the Display name of user using the bot?

I tried with this piece of code but it returns displayname of the bot itself.

  .then(function(user){
     console.log('Logged on as bot: ' );
     console.log(`Logged on as ${user.displayName}`, user)
  } )

But I need to get the details of the user (like their email, name) that this bot is integrated with. Is there any function in this SDK that allows me to do that?

Scaling NodeJS Script for Multiple Users

I have written a simple bot using Node JS sdk, it is working fine for single user interaction. But when multiple users try to chat with the bot [ 'itemAdded' Eventlistener is triggered ] at the same time this error raises.

Error:  Concurrent Client Requests: Encountered resource conflict while saving session data (see console for details) 

My bot is triggered when an item is added to the conversation, so when multiple users add an
item at the same time how can the bot handle it ? any suggestions?

(I tried using the PM2 http://pm2.keymetrics.io/ to create multiple instances of the nodejs script, but when the users adds a item to the conversation all these multiple instances gets triggered, hence the user gets multiple replies)

You can find my code here: https://repl.it/@SaravananG2/CircuitBot

e2e tests frequently fail to login via login/OAuth dialog opened by Circuit SDK

Summary

The automated e2e-Tests of our app frequently fail during the login/OAuth dialog via Circuit SDK.
After entering email, clicking next, entering password, and clicking sign in, the dialog switches back to the email field, instead of showing the "Allow access" button.

Circuit login problems in e2e-Tests

Details

The behaviour was investigated by running the same e2e test spec in repeated runs, each running approx. 20 sec. and performing a Circuit login before test actions, and a Circuit logout afterwards.
After several successful tests (approx. 15 tests), there are a number of subsequent tests that fail to login. After that, succeeding and failing tests alternate, with fewer succeeding tests. In 100 repeated e2e runs, 55 runs fail during login.

Retrying email and password input is not a workaround, the login dialog will cycle between email and password prompts, then. Closing and re-opening the Circuit login dialog, starting login from scratch, is also not working around the problem.

So far, our best explanation is that we're struggling with some sort of DOS-prevention mechanism in the Circuit backend. At least, it seems reasonable for Circuit to have such a mechanism and it seems reasonable that our test setup triggers it.

We'd really appreciate if we could exchange ideas on what is causing the observed behaviour.

Android Client HTML tags

Hello. "Div" and "U" tags are supported at iOS, Web and Desktop clients but not supported at Android Client. Also, is there a manual for which HTML tags are supported for which client? Thanks.

Start recording from backend application

Hey,

I'm currently trying to start a recording for an ongoing conference call from within a Node.js application on behalf of a bot. I understand that for backend, WebRTC is not supported. However the Circuit API Node.js SDK page explicitly says "does support WebRTC related APIs in which the app does no act as WebRTC endpoint (..., recording)".

I basically tried the following code, ending in a "No active call found" error:

async function main() {
const user = await client.logon();
const call = await client.getStartedCalls();
const callID = call[0].callId;
await client.startRecording(callID, {audio: true, video: false});
}

So my question: Is there a valid way to start a recording for an ongoing call without answering the call and/or without being participant of the conversation?

Thanks in advance!

Add TypeScript definitions for usage with TypeScript

Hello,

I would like to build an application using TypeScript therefore it would be nice if the SDK would contain the definitions. I was starting once already but it would take me a while. So I thought it would be probably easier for you guys and I will just ask you (:

If you do not want to include them directly within the SDK you could contribute them to the community definitions at https://github.com/DefinitelyTyped/DefinitelyTyped

Let me know how you decided and how I may contribute, if I can.

Outgoing Webhook - USER.SUBMIT_FORM_DATA

Hey @rogeru

I'm not quite sure if it belongs here but i do have a feature request about the outgoing webhook USER.SUBMIT_FORM_DATA response.

Currently, whenever I submit a form, I get the following response (i.e. basically Trivia-example):

{ deliveryId: '45913582-2b2f-438c-8009-52ac9bbe70da',
  type: 'USER.SUBMIT_FORM_DATA',
  webhookId: '5b61389e-1f6e-43f9-83bf-af41217d5abc',
  submitFormData: 
   { itemId: 'ddfd5e9e-34cc-4c81-93c2-8097d7e6a4b5',
     formId: 'trivia',
     submitterId: 'f9d448f9-b887-4d2c-aff3-264b396c6da3',
     data: [ [Object], [Object] ] } }

Whenever I want to find out the conversation Id, I basically have to acquire the item information with itemId, which is an additional step.
Would it therefore be possible to add the corresponding convId in submitFormData response directly?

Thanks in advance.

Voice Plugin for circuit

I'm developing a bot in Circuit which currently is doing text to text messaging, but now I need to enhance it to support voice queries also. So I've got couple of questions, How to get voice message (like voice recordings) from the user? Is there any plugin in Circuit for that?

Newline when posting a form with multi-row INPUT

When posting an interactive form containing a multi-row INPUT element, an empty row will be introduces before the input-element (see selected/blue area in screenshot). This happens when using both the SDK and the REST API. When I post a single row input, this will not happen!

screenshot

const Circuit = require('circuit-sdk');
const client = new Circuit.Client({
  client_id: 'TBD',
  client_secret: 'TBD',
  autoRenewToken: true,
  domain: 'circuitsandbox.net',
});

// Add conversation Id
const convId = 'TBD';

// Form data
const form = {
  content: 'Fill out the form to register a complaint',
  form: {
    id: 'myform1234',
    title: 'Complaint Form',
    controls: [
      {
        type: 'LABEL',
        text: 'Single-row INPUT:'
      },
      {
        type: 'INPUT',
        name: 'single',
        text: 'Single-row.',
      },
      {
        type: 'LABEL',
        text: 'Multi-row INPUT:'
      },
      {
        type: 'INPUT',
        name: 'multi',
        text: 'Multi-row introduces space above.',
        rows: 3,
      },
      {
        type: 'BUTTON',
        text: 'Send'
      }
    ],
  }
}

async function postForm() {
  const user = await client.logon();
  await client.addTextItem(convId, form);
}

postForm().then(console.log).catch(console.error);

Error: Cannot find module './File'

Hey,

when I install the latest version of circuit-sdk (1.2.7003) and run:
const circuit = require('circuit-sdk');

Then I get the following error:

internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module './File'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (C:\Admin\Projekte\Tests\node_modules\circuit-sdk\circuit-node.js:44:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.