linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

[PublicAsset] PublicAsset/set destroy JMAP method #5197

Closed Arsnael closed 1 month ago

Arsnael commented 1 month ago

A classic /set destroy method for PublicAsset

Request:

{
  "using": ["urn:ietf:params:jmap:core", "com:linagora:params:public:assets"],
  "methodCalls": [
    [
      "PublicAsset/set", {
        "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
        "destroy": ["1234"]
      }, "0"
    ]
  ]
}

Response:

{
  "sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
  "methodResponses": [
    ["PublicAsset/set", {
      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
      "newState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
      "destroyed": ["1234"]
    }, "0"]
  ]
}

DoD: integration tests