server-set properties should not be required in create method calls #15
Labels
No labels
bug
documentation
duplicate
enhancement
essential
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
htunnicliff/jmap-jam#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
preface: I'm new to working with JMAP so maybe I'm misunderstanding how things work. but assuming I'm not...
the JMAP spec indicates that "server-set" properties of objects should not be submitted by the client when creating these objects:
This seems to be contradicted by the current type annotations on this library. For example,
Emailobject propertiesidblobIdthreadIdand others marked as server-set (per JMAP Mail spec):However when trying to create an email using this library with the following code (with tsconfig strict enabled):
we get a type error saying properties

idblobIdthreadIdand others are missing:This seems incorrect, one because it seems to contradict the spec and two because how would I come up with the correct values for these properties when creating an email on the client side?
Also, notice that the email creation example in the JMAP Mail documentation also does not include these fields in the sample request submission.
Thanks for noting this! Likely an oversight on my part when assembling these types. I'll take a closer look!
This was a really good find. I did not appropriately account for server-set fields (likely because I use JMAP for reading emails rather than writing emails).
I'll focus on fixing this in the next release, but it may be some time until I pick it up to work on.
@kwshi I believe v0.8.0 should unblock you, though there is more I'd like to do to improve these types in the future.
Thank you again for raising this issue!