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

Some missing types at directline.d.ts #255

Open
bivas6 opened this issue Dec 19, 2019 · 10 comments
Open

Some missing types at directline.d.ts #255

bivas6 opened this issue Dec 19, 2019 · 10 comments
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report.

Comments

@bivas6
Copy link

bivas6 commented Dec 19, 2019

Hi,
I'm using directline in my app, and I noticed some missing types:

  1. This code:
  this._directLine = new DirectLine(options);
  this._directLine.activity$
    .subscribe((activity) => console.log(activity.replyToId))

Returns this error:

  Property 'replyToId' does not exist on type 'Message'.ts(2339)

But it is exist in the docs: https://docs.microsoft.com/en-us/dotnet/api/microsoft.bot.schema.activity.replytoid?view=botbuilder-dotnet-stable

  1. This code:
  this._directLine.postActivity({  type: 'endOfConversation', text: '...' , ...});

Returns this error:

Type '"endOfConversation"' is not assignable to type '"message" | "event" | "typing"'.ts(2322)
directLine.d.ts(271, 5): The expected type comes from property 'type' which is declared here on type 'Activity'

But it is exist in the docs: https://docs.microsoft.com/en-us/dotnet/api/microsoft.bot.schema.activitytypes.endofconversation?view=botbuilder-dotnet-stable

Thanks!

@CoHealer CoHealer added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-reported Required for internal Azure reporting. Do not delete. labels Dec 19, 2019
@mdrichardson
Copy link

@bivas6 botframework-directlinejs doesn't implement the full schema as the rest of DirectLine. You can see what is included here.

As a workaround, you can suppress the error and still send your activity with any type or replyToId; once the typescript code is converted to javascript, there isn't any type checking that goes on, so you can still send the activity with the "normal" schema

Something like this:

//@ts-ignore: Activity Schema is valid for DirectLine, but not the botframework-directline package
this._directLine.postActivity({ type: 'endOfConversation' })

@compulim Is there a reason this doesn't include all DL schema? If you like, I can submit a PR that covers this.

@mdrichardson mdrichardson added the customer-replied-to Required for internal reporting. Do not delete. label Dec 19, 2019
@mdrichardson mdrichardson removed their assignment Dec 30, 2019
@vishwacsena
Copy link

DirectLineJS is a browser client on DirectLine and will not support the full DirectLine schema. That said, we will evaluate the interface we expose to see if we should add or remove any existing types and will report back.

@cwhitten
Copy link
Member

Hi @bivas6, we'll take an item in our upcoming milestone to update the types exposed.

@cwhitten cwhitten added the R8 Release 8 - March 16th, 2020 label Jan 15, 2020
@bivas6
Copy link
Author

bivas6 commented Jan 16, 2020

Thanks @cwhitten

@cwhitten cwhitten added R9 Release 9 - May 15th, 2020 and removed R8 Release 8 - March 16th, 2020 labels Mar 4, 2020
@cwhitten cwhitten added R10 Release 10 - August 17th, 2020 and removed R9 Release 9 - May 15th, 2020 labels Apr 30, 2020
@cwhitten
Copy link
Member

@bivas6 we were unable to complete this in our current sprint. Moving to next sprint.

@cwhitten cwhitten added R11 Release 11 - November 15th, 2020 and removed R10 Release 10 - August 17th, 2020 labels Aug 5, 2020
@peterinnesmsft peterinnesmsft added the ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report. label Aug 19, 2020
@orgads
Copy link
Contributor

orgads commented Dec 23, 2020

@cwhitten ping

@cwhitten cwhitten added this to the R12 milestone Jan 4, 2021
@cwhitten cwhitten removed the R11 Release 11 - November 15th, 2020 label Jan 4, 2021
@cwhitten cwhitten removed their assignment Jan 4, 2021
@cwhitten
Copy link
Member

cwhitten commented Jan 4, 2021

Currently in our upcoming milestone (March 2021)

@carlosscastro
Copy link
Member

@compulim @cwhitten is this on track to release in R13?

@Kaiqb Kaiqb removed this from the R13 milestone Mar 26, 2021
@orgads
Copy link
Contributor

orgads commented Dec 5, 2022

ping?

@orgads
Copy link
Contributor

orgads commented Aug 31, 2023

This can be closed. type was changed to string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report.
Projects
None yet
Development

No branches or pull requests

10 participants