alexa / alexa-apis-for-nodejs

The Alexa APIs for NodeJS consists of JS and Typescript definitions that represent the request and response JSON of Alexa services. These models act as core dependency for the Alexa Skills Kit NodeJS SDK (https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs).
Apache License 2.0
60 stars 34 forks source link

Incorrect object definition in envelope: interfaces.alexa.experimentation.ExperimentAssignment #20

Closed planadecu closed 2 years ago

planadecu commented 2 years ago

The following definition is incorrect.

export namespace interfaces.alexa.experimentation {
    /**
     * Represents the state of an active experiment's assignment
     * @interface
     */
    export interface ExperimentAssignment {
        'id'?: string;
        'treatmentId'?: interfaces.alexa.experimentation.Treatment;
    }
}

What the skill receives looks like:

 "context": {
      "Experimentation": {
        "activeExperiments": [
          {
            "id": "10361395-667c-34f4-b253-4660a29993ae",
            "assignedVariant": {
                "name": "TREATMENT_1"
            }
          }
        ]
      }
    }

Can you please adapt the TS types?

rahulawl commented 2 years ago

Hi @planadecu . Are you still facing this issue? Can you give an example of how to recreate this for us to take a closer look.

rahulawl commented 2 years ago

We are closing the issue due to lack of activity. Please re-open if the issue is still prevalent.