You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the sentAt parameter for an Event in the personalize-events client accepts only Date type. It used to accept multiple types in version 2 of the sdk. Is this correct? The API docs state the type is a timestamp, so customers would expect to be able to pass a timestamp in addition to a Date type. If they use Date, they have to convert the timestamp. Customers upgrading to v3 might be frustrated with the "Error TypeError: input.sentAt.getTime is not a function" error they receive when they pass a timestamp instead of a Date.
I think extra validation can be added to line 356 in aws-sdk-js-v3/clients/client-personalize-events/src/protocols/Aws_restJson1.ts. to accept a unix timestamp (ie convert the timestamp to a Date here rather than making customers do it).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I noticed the sentAt parameter for an Event in the personalize-events client accepts only Date type. It used to accept multiple types in version 2 of the sdk. Is this correct? The API docs state the type is a timestamp, so customers would expect to be able to pass a timestamp in addition to a Date type. If they use Date, they have to convert the timestamp. Customers upgrading to v3 might be frustrated with the "Error TypeError: input.sentAt.getTime is not a function" error they receive when they pass a timestamp instead of a Date.
I think extra validation can be added to line 356 in aws-sdk-js-v3/clients/client-personalize-events/src/protocols/Aws_restJson1.ts. to accept a unix timestamp (ie convert the timestamp to a Date here rather than making customers do it).
client: personalize-events
sentAt is defined on line 60 in aws-sdk-js-v3/clients/client-personalize-events/src/models/models_0.ts
Validation is done on line 356 in aws-sdk-js-v3/clients/client-personalize-events/src/protocols/Aws_restJson1.ts.
sentAt param in V3 docs: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-personalize-events/modules/event.html.
sentAt param in V2 docs: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/PersonalizeEvents.html#putEvents-property
Amazon Personalize API: States it is a timestamp at https://docs.aws.amazon.com/personalize/latest/dg/API_UBS_Event.html
Beta Was this translation helpful? Give feedback.
All reactions