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

Bug: IntentResolution.data property not supported by addIntentListener callback #127

Closed
rikoe opened this issue Oct 29, 2019 · 3 comments
Closed
Labels
api FDC3 API Working Group bug Something isn't working help wanted Extra attention is needed

Comments

@rikoe
Copy link
Contributor

rikoe commented Oct 29, 2019

The IntentResolution type returned by raiseIntent is defined as follows:

interface IntentResolution {
  source: string;
  data?: object;
  version: string;
}

but the addIntentListener callback is defined as follows:

addIntentListener(intent: string, handler: (context: Context) => void): Listener;

which includes no way to return data back to the caller. It is therefore impossible to populate the data property with the 1.0 API, causing an API inconsistency.

There are three options:

  1. Document and leave the inconsistency as is.
  2. Remove the data property from the IntentResolution interface until it can be provided.
  3. Amend the addIntentListener interface to include a way to pass data back to the caller.
@rikoe rikoe changed the title IntentResolution.data property not supported by addIntentListener callback IntentResolution.data property not supported by addIntentListener callback Oct 29, 2019
@rikoe rikoe added api FDC3 API Working Group help wanted Extra attention is needed labels Oct 29, 2019
@rikoe rikoe changed the title IntentResolution.data property not supported by addIntentListener callback Bug: IntentResolution.data property not supported by addIntentListener callback Oct 29, 2019
@nkolba
Copy link
Contributor

nkolba commented Oct 30, 2019

my vote would be for #3 - Amend the addIntentListener interface to include a way to pass data back to the caller.

@rikoe
Copy link
Contributor Author

rikoe commented Jan 21, 2020

I would like to propose that we leave the discrepancy with the data property, and the concept of returning results from intents alone for the 1.2 release.

There is a lot going into the 1.2 release already, and I feel like we need to tackle this topic properly subsequent to the 1.2 release.

Things to consider are:

@rikoe rikoe added the bug Something isn't working label Jan 22, 2020
@rikoe rikoe removed this from the 1.1 milestone Jan 28, 2020
@rikoe rikoe removed the 1.1 label Jan 28, 2020
@rikoe
Copy link
Contributor Author

rikoe commented Jun 12, 2020

Close in favour of #201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api FDC3 API Working Group bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants