Giter Site home page Giter Site logo

alexa.net.management's People

Contributors

aadupirn avatar dennis-kuypers-gcx avatar shinya-terasaki avatar stoiveyp avatar yadavvineet avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

alexa.net.management's Issues

Safe (Interaction Model) Updates

I see that there is a potential problem with InteractionModel updates. The library will drop additional properties that it doesn't know about, right?

Scenario:

  • InteractionModel Get
  • during deserialization properties that don't have a matching property in the models are discarded
  • change InteractionModel object to include updated values
  • then I do InteractionModel Update

As a result all unknown properties are lost.


To keep additional properties the JsonExtensionDataAttribute (as i understand it) would solve this but that would require many changes and is probably prone to errors.

Currently I'm wrapping the ManagementApi so that I also have access to the authenticated http client to receive and send JToken to monkeypatch them manually.

(on a side note: I'm also using the ETag and If-Match to make sure that there are no race conditions)

404 on calls to update AccountLinking

It looks like the [EnumMember] attribute on the SkillStage enum is intended to serialize the values to lowercase as required by Alexa, but the string is getting cased like the declared value of the enum. (So for example the route includes /stages/Development rather than /stages/development) This is causing an incorrectly cased API route and leading to a 404.

More PublicationStatus Enums

When running with the Alexa.NET.Management.UWPApp sample utility (very useful) app I get an exception thrown on building the skills list due to some other/new status types in my skills list:

Skills/PublicationStatus.cs requires a couple of additional values in the Enum

    REMOVED,
    HIDDEN

Add reference-based InteractionModel.SlotType models

SlotType - instead of containing value literals - may contain a reference to a catalog when using reference-based catalogs.

Sample from the interaction model interactionModel.languageModel.types[]

{
  "name": "<name>",
  "valueSupplier": {
    "type": "CatalogValueSupplier",
    "valueCatalog": {
      "catalogId": "amzn1.ask.interactionModel.catalog.<catalog-id>",
      "version": "<version>"
    }
  }
}

This could be a problem when updating models via Get-Update

var model = await _management.InteractionModel.Get(...);
// <changes to model>
await _management.InteractionModel.Update(..., model);

sslCertificateType Required for All Endpoints

Within Region and Permissions there are endpoints for the URI

These both require sslCertificateType to pass certification in the Amazon Aleexa skills portal (took me ages to find a support link that gave clues to this)

Schema passes without but change EndPoint to EndPointWithSSL to allow manual editing and update of the model and "Publish Model" for example in the UWPApp example code project

Metrics API returns floating point values

Hello,

Thank you for implementing Metrics API.

I tested, but it generated following exception.

  Expected: No Exception to be thrown
  But was:  <Newtonsoft.Json.JsonReaderException: Input string '3.0' is not a valid integer. Path 'values[0]', line 1, position 608.
   at Newtonsoft.Json.JsonTextReader.ParseReadNumber(ReadType readType, Char firstChar, Int32 initialPosition)
   at Newtonsoft.Json.JsonTextReader.ReadNumberValue(ReadType readType)
   at Newtonsoft.Json.JsonTextReader.ReadAsInt32()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at Refit.JsonContentSerializer.DeserializeAsync[T](HttpContent content) in d:\a\1\s\Refit\JsonContentSerializer.cs:line 45
   at Refit.RequestBuilderImplementation.<>c__DisplayClass14_0`2.<<BuildCancellableTaskFuncForMethod>b__0>d.MoveNext()

Actually the response contains floating point values.

{"metric":"uniqueCustomers","timestamps":["2019-11-04T00:00:00Z","2019-11-04T01:00:00Z","2019-11-04T02:00:00Z","2019-11-04T03:00:00Z","2019-11-04T04:00:00Z","2019-11-04T05:00:00Z","2019-11-04T06:00:00Z","2019-11-04T07:00:00Z","2019-11-04T08:00:00Z","2019-11-04T09:00:00Z","2019-11-04T10:00:00Z","2019-11-04T11:00:00Z","2019-11-04T12:00:00Z","2019-11-04T13:00:00Z","2019-11-04T14:00:00Z","2019-11-04T15:00:00Z","2019-11-04T16:00:00Z","2019-11-04T17:00:00Z","2019-11-04T18:00:00Z","2019-11-04T19:00:00Z","2019-11-04T20:00:00Z","2019-11-04T21:00:00Z","2019-11-04T22:00:00Z","2019-11-04T23:00:00Z"],"values":[3.0,6.0,5.0,2.0,3.0,7.0,3.0,5.0,5.0,14.0,10.0,4.0,5.0,5.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,1.0]}

MetricsResponse expects integer for values, but it should be float/double.

BR,

ReferenceCatalog ListVersions returns 500 when using SortDirection

Using Reference Catalog ListVersions always returns 500 error codes when I try to use a SortDirection.

In the parameter documentation table they omitted a parameter that is present in the template url
GET /v1/skills/api/custom/interactionModel/catalogs/{catalogId}/versions?maxResults={maxResults}&nextToken={nextToken}&sortDirection={sortDirection}&sortField={sortField}

The 500 could be due to the missing sortField. However I have not been able to make this work using the ask-cli.
This issue is probably not actionable until we know how to use the API properly.

I'll update this ticket when I know more.

Then we can probably also choose proper overloads that match the api (for example it looks like the nextToken contains the count, so maxResults can maybe be omitted when using next tokens)

CatalogManagement.CreateUpload Error converting value \"INGESTION\" to type 'Alexa.NET.Management.CatalogManagement.IngestionStepName

On Createing new Upload for catalog error occurs:
{"Error converting value "INGESTION" to type 'Alexa.NET.Management.CatalogManagement.IngestionStepName'. Path 'ingestionSteps[0].name', line 1, position 242."}

Problem in object Alexa.NET.Management.CatalogManagement.IngestionStepName
public enum IngestionStepName
{
Upload = 0,
SchemaValidation = 1
}

in returned object it has also "name": "INGESTION",

Json returned:
{
"catalogId": "amzn1.ask-catalog.cat.078c8b00-ed69-4517-ab74-02cee5c17a15",
"createdDate": "2021-02-15T13:56:52.890Z",
"id": "amzn1.ask-catalog.upl.6a0e7ceb-c923-4619-bc6b-5de258853c0c",
"ingestionSteps": [
{
"errors": [],
"logUrl": "",
"name": "INGESTION",
"status": "PENDING"
},
{
"errors": [],
"logUrl": "",
"name": "UPLOAD",
"status": "PENDING"
},
{
"errors": [],
"logUrl": "",
"name": "SCHEMA_VALIDATION",
"status": "PENDING"
}
],
"lastUpdatedDate": "2021-02-15T13:56:52.890Z",
"presignedUploadParts": [
{
"partNumber": 1,
"url": "url"
}
],
"status": "PENDING"
}

Delete a Skill missing

Is it possible to add a method to Delete a skill to ISkillManagementApi, SkillManagementApi and IClientSkillManagementApi ?

Looks like it exists, ASK CLI uses something like https://api.amazonalexa.com/v1/skills/{skillID} sorry, can't find documentation to that delete method

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.