~rockorager/go-jmap

870abf0cc972e44830e5c71e515254cb9af14860 — Tim Culverhouse 1 year, 3 months ago 43e0f0f v0.2.0
mail/emailsubmission: use mail uri in all calls

Some emailsubmission calls require the mail capability themselves. Add
this URI to all calls for best compatibility

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
M mail/emailsubmission/changes.go => mail/emailsubmission/changes.go +2 -1
@@ 2,6 2,7 @@ package emailsubmission

import (
	"git.sr.ht/~rockorager/go-jmap"
	"git.sr.ht/~rockorager/go-jmap/mail"
)

// This is a standard “/changes” method as described in [@!RFC8620], Section 5.2.


@@ 25,7 26,7 @@ type Changes struct {

func (m *Changes) Name() string { return "EmailSubmission/changes" }

func (m *Changes) Requires() []jmap.URI { return []jmap.URI{URI} }
func (m *Changes) Requires() []jmap.URI { return []jmap.URI{URI, mail.URI} }

// This is a standard “/changes” method as described in [@!RFC8620], Section 5.2.
type ChangesResponse struct {

M mail/emailsubmission/get.go => mail/emailsubmission/get.go +2 -1
@@ 2,6 2,7 @@ package emailsubmission

import (
	"git.sr.ht/~rockorager/go-jmap"
	"git.sr.ht/~rockorager/go-jmap/mail"
)

// This is a standard “/get” method as described in [@!RFC8620], Section 5.1.


@@ 30,7 31,7 @@ type Get struct {

func (m *Get) Name() string { return "EmailSubmission/get" }

func (m *Get) Requires() []jmap.URI { return []jmap.URI{URI} }
func (m *Get) Requires() []jmap.URI { return []jmap.URI{URI, mail.URI} }

// This is a standard “/get” method as described in [@!RFC8620], Section 5.1.
type GetResponse struct {

M mail/emailsubmission/query.go => mail/emailsubmission/query.go +2 -1
@@ 2,6 2,7 @@ package emailsubmission

import (
	"git.sr.ht/~rockorager/go-jmap"
	"git.sr.ht/~rockorager/go-jmap/mail"
)

// This is a standard “/query” method as described in [@!RFC8620], Section 5.5,


@@ 85,7 86,7 @@ type Query struct {

func (m *Query) Name() string { return "EmailSubmission/query" }

func (m *Query) Requires() []jmap.URI { return []jmap.URI{URI} }
func (m *Query) Requires() []jmap.URI { return []jmap.URI{URI, mail.URI} }

type QueryResponse struct {
	// The id of the account used for the call.

M mail/emailsubmission/querychanges.go => mail/emailsubmission/querychanges.go +2 -1
@@ 2,6 2,7 @@ package emailsubmission

import (
	"git.sr.ht/~rockorager/go-jmap"
	"git.sr.ht/~rockorager/go-jmap/mail"
)

type QueryChanges struct {


@@ 46,7 47,7 @@ type QueryChanges struct {

func (m *QueryChanges) Name() string { return "EmailSubmission/queryChanges" }

func (m *QueryChanges) Requires() []jmap.URI { return []jmap.URI{URI} }
func (m *QueryChanges) Requires() []jmap.URI { return []jmap.URI{URI, mail.URI} }

type QueryChangesResponse struct {
	// The id of the account used for the call.

M mail/emailsubmission/set.go => mail/emailsubmission/set.go +3 -2
@@ 2,6 2,7 @@ package emailsubmission

import (
	"git.sr.ht/~rockorager/go-jmap"
	"git.sr.ht/~rockorager/go-jmap/mail"
)

// This is a standard “/set” method as described in [@!RFC8620], Section 5.3,


@@ 77,7 78,7 @@ type Set struct {
	// created in the same “/set” invocation, this is equivalent to a
	// creation-reference, so the id will be the creation id prefixed with
	// a #.)
	OnSuccessUpdateEmail map[jmap.ID]*jmap.Patch `json:"onSuccessUpdateEmail,omitempty"`
	OnSuccessUpdateEmail map[jmap.ID]jmap.Patch `json:"onSuccessUpdateEmail,omitempty"`

	// A list of EmailSubmission ids for which the Email with the
	// corresponding emailId should be destroyed if the


@@ 89,7 90,7 @@ type Set struct {

func (m *Set) Name() string { return "EmailSubmission/set" }

func (m *Set) Requires() []jmap.URI { return []jmap.URI{URI} }
func (m *Set) Requires() []jmap.URI { return []jmap.URI{URI, mail.URI} }

type SetResponse struct {
	// The id of the account used for the call.