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
We're excited to announce that Encore.ts now supports using Date types in API schemas, Pub/Sub topic messages, streaming APIs, and more! As always, update with encore version update!
That means you can now do things like this:
exportinterfaceCreateBlogPostParams{body: string;publishAt?: Date;// set to schedule the publish in the future}exportconstcreateBlogPost=api({expose: true,method: "POST",path: "/blogpost"},async(params: CreateBlogPostParams): Promise<BlogPost>{// ...})
Encore.ts will automatically validate the incoming request, ensuring the provided data is a valid RFC3339 timestamp,
and pass the data to the API handler as a fully constructed Date object. No need to manually parse dates ever again. Additionally, Encore.ts's built-in API Explorer and Service Catalogs have also been updated to fully support dates.
Hiding internal messages in public errors
Encore.ts's errors can contain additional information in the internal_message field. This field is now stripped when calling from the outside, ensuring private information about the error isn't leaked to external users. (This functionality is disabled when developing locally, to aid development.)
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
-
We're excited to announce that Encore.ts now supports using Date types in API schemas, Pub/Sub topic messages, streaming APIs, and more! As always, update with
encore version update
!That means you can now do things like this:
Encore.ts will automatically validate the incoming request, ensuring the provided data is a valid RFC3339 timestamp,
and pass the data to the API handler as a fully constructed
Date
object. No need to manually parse dates ever again. Additionally, Encore.ts's built-in API Explorer and Service Catalogs have also been updated to fully support dates.Hiding internal messages in public errors
Encore.ts's errors can contain additional information in the
internal_message
field. This field is now stripped when calling from the outside, ensuring private information about the error isn't leaked to external users. (This functionality is disabled when developing locally, to aid development.)All changes
Full Changelog: v1.42.3...v1.43.3
This discussion was created from the release v1.43 - Date support in Encore.ts.
Beta Was this translation helpful? Give feedback.
All reactions