Re: [Jmap] [JMAP] CalendarEvent/parse proposition for the JMAP Calendar draft

Neil Jenkins <neilj@fastmailteam.com> Fri, 14 April 2023 04:01 UTC

Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 60881C15C2BF for <jmap@ietfa.amsl.com>; Thu, 13 Apr 2023 21:01:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmailteam.com header.b="TZ/n4Imt"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="T2B3CA9N"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m7FWKll4Jng4 for <jmap@ietfa.amsl.com>; Thu, 13 Apr 2023 21:01:37 -0700 (PDT)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 02B3CC15C2A7 for <jmap@ietf.org>; Thu, 13 Apr 2023 21:01:36 -0700 (PDT)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 915515C0117 for <jmap@ietf.org>; Fri, 14 Apr 2023 00:01:35 -0400 (EDT)
Received: from imap43 ([10.202.2.93]) by compute3.internal (MEProxy); Fri, 14 Apr 2023 00:01:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1681444895; x= 1681531295; bh=4CkpEL1CjG4OuAWPKPAL13GZ2cTHaplUQaoZWg8dN2M=; b=T Z/n4Imtq/NpMjSxyR4AjOlRoaMa5JPtAhJzazWw3ZSUZSJc+ITMRCgYseiVmFnUf wAE1iT43jgW4nhOHTeQ5m3dJBxzhOpFWqfFbtIDZlQCVnAcinvKnvk0+SfWoMKSY PEGueN0YoYZwBPrDSxxM/ys1xUDhNwgmp4xeltOGVurBFMSS+PgrOFiYoJb3xnQV gwH+yNklDzBu4HX01v43DJClOcJcVDGPY3KXuqCl0+vTef425K8HAPIIvaiKAm6w uznRdDQA/6YVkgn1/EagKw/AfyTSTKjiwoQv/+FDFlvsPrwRgpii08PTVh11uBMY Xgj7dv/eVLYwMjfPsz6Gw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1681444895; x=1681531295; bh=4CkpEL1CjG4Ou AWPKPAL13GZ2cTHaplUQaoZWg8dN2M=; b=T2B3CA9NvD8Xx1FILq4G8B/AVwqFV PFb4N5/BUJKPXyyh9+FSOO+iQ1oqZgQ2XCKQTtsIorpikZfEQcEqeV9i1rd86GH3 5w7FRSPIQ9JrFyZgeXsfCnJ3VuA37mcq/oSPs4XgsZrvPhfUKv1jlC5Ftdnj1W1i lHHSyMFe6Os1M/CQZq+WqMIkDCbhFuqDZvryASUBvwMllAUrLVXNS/wgHwbQLvxb ISKv+YkFKer8FCRH41oefBcm6gxlaCSfeyoIBqpgma1+2V7FAJKnSJm5DERJXIYX UmYa96lsAvzFvz5I+ZTO6OdPOZNROXf31RJ7HEj19mT/sjzd7LDAYaUpQ==
X-ME-Sender: <xms:H9A4ZLYJnm3VenBHhkFG-6aXmx7qkBjofxTTfnn2BHruefbfk1H6ag> <xme:H9A4ZKbCwbgj9Eytc6CrhWwhZUMvklgUOQjCWaGZ-0vvxMoV_mRWrw7rL62LNs9M4 vyhZEU2SgAbuA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekledgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesrgdtreerreertdenucfhrhhomhepfdfpvghi lhculfgvnhhkihhnshdfuceonhgvihhljhesfhgrshhtmhgrihhlthgvrghmrdgtohhmqe enucggtffrrghtthgvrhhnpeevvdetvdduleekhfeghfetfeettdelhfehfeevffevleek uddtudffieevjeevhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehnvghilhhjsehfrghsthhmrghilhhtvggrmhdrtghomh
X-ME-Proxy: <xmx:H9A4ZN9cyRvdr2pOui7M0eU74oxpUAqGrQvlOH4fTtrqnvgFgRBJJA> <xmx:H9A4ZBpRpALg7I_2bpp9JBKI8qZAf04TjxXbDVAnI9xDLUvJCRGpUg> <xmx:H9A4ZGqoD02fXMJD7OCTguqm9IABClLpkrzqlLrhgSj428v1_mMZig> <xmx:H9A4ZD21BUcJecmm7bz03IrxmGKMtoW5uIU8zGwK4UAlUdSyRF4sMg>
Feedback-ID: ibc614277:Fastmail
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 4F0382D40074; Fri, 14 Apr 2023 00:01:35 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.9.0-alpha0-372-g43825cb665-fm-20230411.003-g43825cb6
Mime-Version: 1.0
Message-Id: <3037e601-38b1-41a9-acbf-301248cf0bc2@dogfoodapp.fastmail.com>
In-Reply-To: <15f76e7b-fd5a-4864-a1de-27779e9aed7c@app.fastmail.com>
References: <Mime4j.6.e7ae1c1fa90e3ca2.187745bb130@linagora.com> <ab348779-6122-495a-b3c8-66f5ff280b32@app.fastmail.com> <15f76e7b-fd5a-4864-a1de-27779e9aed7c@app.fastmail.com>
Date: Fri, 14 Apr 2023 14:01:15 +1000
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="23a08a8954d6483280c23ad5201200fd"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/yNB58RqkUxLjMOjDAN2bqZjTM2A>
Subject: Re: [Jmap] [JMAP] CalendarEvent/parse proposition for the JMAP Calendar draft
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Apr 2023 04:01:42 -0000

This is definitely a useful method. I think the result type should be pure `JSCalendar` rather than a JMAP `CalendarEvent`, because it's not saved in the store anywhere so doesn't have an id etc.

Regarding an iCalendar file with multiple events (with different UIDs), I'm happy with either returning an array of JSCalendar *event* objects or a single JSCalendar *group* object. I think I agree with Robert that the former is probably slightly better though, just because otherwise it's easy to only implement something that handles an event response and then get surprised when someone passes in a multi-event file, whereas if it's always an array you know you need to handle the possibility of multiple.

Cheers,
Neil.