@remit/api-openapi-spec 0.0.22 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/openapi.json +171 -0
  2. package/package.json +1 -1
package/openapi.json CHANGED
@@ -1968,6 +1968,80 @@
1968
1968
  }
1969
1969
  }
1970
1970
  },
1971
+ "/messages/not-spam": {
1972
+ "post": {
1973
+ "operationId": "MessageBulkOperations_notSpam",
1974
+ "description": "Undo a spam report: clear the sender's `blocked` flag (never promotes to trusted/wellknown) and move each message back to `Message.originalMailboxId`. Idempotent under a repeated call. Each message is processed independently and concurrently, so the request's total wait is bounded by one message's settle timeout rather than accumulating across the batch.",
1975
+ "parameters": [],
1976
+ "responses": {
1977
+ "200": {
1978
+ "description": "The request has succeeded.",
1979
+ "content": {
1980
+ "application/json": {
1981
+ "schema": {
1982
+ "$ref": "#/components/schemas/RemitImap.SpamReportBulkResult"
1983
+ }
1984
+ }
1985
+ }
1986
+ }
1987
+ },
1988
+ "requestBody": {
1989
+ "required": true,
1990
+ "content": {
1991
+ "application/json": {
1992
+ "schema": {
1993
+ "$ref": "#/components/schemas/RemitImap.BulkMessageInput"
1994
+ }
1995
+ }
1996
+ }
1997
+ },
1998
+ "x-amazon-apigateway-integration": {
1999
+ "type": "aws_proxy",
2000
+ "httpMethod": "POST",
2001
+ "passthroughBehavior": "when_no_match",
2002
+ "uri": {
2003
+ "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations"
2004
+ }
2005
+ }
2006
+ }
2007
+ },
2008
+ "/messages/report-spam": {
2009
+ "post": {
2010
+ "operationId": "MessageBulkOperations_reportSpam",
2011
+ "description": "Report messages as spam: block the sender (Address.flags.blocked) and move each message to the account's Junk folder. Skips the block (but still moves the message) when the sender is the account's own address. One call replaces composing the old separate `Block` and `Mark spam` actions — a single user intent, a single failure story. The sender block is written first and does not wait on the move; a failed move never rolls it back. Idempotent under a repeated call.",
2012
+ "parameters": [],
2013
+ "responses": {
2014
+ "200": {
2015
+ "description": "The request has succeeded.",
2016
+ "content": {
2017
+ "application/json": {
2018
+ "schema": {
2019
+ "$ref": "#/components/schemas/RemitImap.SpamReportBulkResult"
2020
+ }
2021
+ }
2022
+ }
2023
+ }
2024
+ },
2025
+ "requestBody": {
2026
+ "required": true,
2027
+ "content": {
2028
+ "application/json": {
2029
+ "schema": {
2030
+ "$ref": "#/components/schemas/RemitImap.BulkMessageInput"
2031
+ }
2032
+ }
2033
+ }
2034
+ },
2035
+ "x-amazon-apigateway-integration": {
2036
+ "type": "aws_proxy",
2037
+ "httpMethod": "POST",
2038
+ "passthroughBehavior": "when_no_match",
2039
+ "uri": {
2040
+ "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations"
2041
+ }
2042
+ }
2043
+ }
2044
+ },
1971
2045
  "/messages/{messageId}": {
1972
2046
  "get": {
1973
2047
  "operationId": "MessageOperations_describeMessage",
@@ -3577,6 +3651,24 @@
3577
3651
  },
3578
3652
  "description": "Body part information"
3579
3653
  },
3654
+ "RemitImap.BulkMessageInput": {
3655
+ "type": "object",
3656
+ "required": [
3657
+ "messageIds"
3658
+ ],
3659
+ "properties": {
3660
+ "messageIds": {
3661
+ "type": "array",
3662
+ "items": {
3663
+ "$ref": "#/components/schemas/UUID"
3664
+ },
3665
+ "minItems": 1,
3666
+ "maxItems": 100,
3667
+ "description": "List of message IDs to operate on"
3668
+ }
3669
+ },
3670
+ "description": "Input for bulk message operations"
3671
+ },
3580
3672
  "RemitImap.BulkUpdateFlagsInput": {
3581
3673
  "type": "object",
3582
3674
  "required": [
@@ -4986,6 +5078,20 @@
4986
5078
  },
4987
5079
  "description": "Message reference response for In-Reply-To and References headers"
4988
5080
  },
5081
+ "RemitImap.MessageSpamReport": {
5082
+ "type": "object",
5083
+ "required": [
5084
+ "reportedAt"
5085
+ ],
5086
+ "properties": {
5087
+ "reportedAt": {
5088
+ "type": "integer",
5089
+ "format": "int64",
5090
+ "description": "Timestamp (epoch millis) the report was made."
5091
+ }
5092
+ },
5093
+ "description": "Recorded when the user reported this message as spam via `POST /messages/report-spam`. Present means the report stands; absent means never reported, or reported and then undone via `POST /messages/not-spam` (which clears it). Backs the \"Reported as spam · Undo\" affordance independent of the message's current folder — the underlying move can settle, fail, or no-op (already in Junk) without changing whether the report itself is shown."
5094
+ },
4989
5095
  "RemitImap.MessageSummaryResponse": {
4990
5096
  "type": "object",
4991
5097
  "required": [
@@ -5062,6 +5168,14 @@
5062
5168
  "$ref": "#/components/schemas/RemitImap.LabelSummaryResponse"
5063
5169
  },
5064
5170
  "description": "Labels applied to this message — filter-, organize-, and manually-applied alike (issue #26). Absent/empty means no label is applied."
5171
+ },
5172
+ "spamReport": {
5173
+ "allOf": [
5174
+ {
5175
+ "$ref": "#/components/schemas/RemitImap.MessageSpamReport"
5176
+ }
5177
+ ],
5178
+ "description": "Present when the user reported this message as spam and the report has not been undone. Backs the \"Reported as spam · Undo\" affordance."
5065
5179
  }
5066
5180
  },
5067
5181
  "description": "Core message metadata for API responses"
@@ -5924,6 +6038,55 @@
5924
6038
  ],
5925
6039
  "description": "Sort order for list operations"
5926
6040
  },
6041
+ "RemitImap.SpamReportBulkResult": {
6042
+ "type": "object",
6043
+ "required": [
6044
+ "successCount",
6045
+ "failureCount"
6046
+ ],
6047
+ "properties": {
6048
+ "successCount": {
6049
+ "type": "integer",
6050
+ "format": "int32",
6051
+ "description": "Number of items accepted for processing"
6052
+ },
6053
+ "failureCount": {
6054
+ "type": "integer",
6055
+ "format": "int32",
6056
+ "description": "Number of items rejected before processing"
6057
+ },
6058
+ "failures": {
6059
+ "type": "array",
6060
+ "items": {
6061
+ "$ref": "#/components/schemas/RemitImap.SpamReportFailure"
6062
+ },
6063
+ "description": "One entry per message that failed, naming why. Absent or empty when every message succeeded."
6064
+ }
6065
+ },
6066
+ "description": "Result of a report-spam or not-spam bulk call. Extends the standard counts with a reason per failed message: a partial failure here is an expected, routine outcome (a move from a prior press still settling) the client should be able to explain, not just count."
6067
+ },
6068
+ "RemitImap.SpamReportFailure": {
6069
+ "type": "object",
6070
+ "required": [
6071
+ "messageId",
6072
+ "reason"
6073
+ ],
6074
+ "properties": {
6075
+ "messageId": {
6076
+ "allOf": [
6077
+ {
6078
+ "$ref": "#/components/schemas/UUID"
6079
+ }
6080
+ ],
6081
+ "description": "The message that failed"
6082
+ },
6083
+ "reason": {
6084
+ "type": "string",
6085
+ "description": "Why it failed, safe to show the user as-is. One of a small allowlisted set of user-facing messages (e.g. \"has not settled yet\" while a prior move is still in flight) — never a raw internal error, which is logged server-side instead and never returned here. Not intended to be parsed programmatically."
6086
+ }
6087
+ },
6088
+ "description": "One message's failure reason within a report-spam or not-spam bulk call."
6089
+ },
5927
6090
  "RemitImap.StarColor": {
5928
6091
  "type": "string",
5929
6092
  "enum": [
@@ -6450,6 +6613,14 @@
6450
6613
  "$ref": "#/components/schemas/RemitImap.LabelSummaryResponse"
6451
6614
  },
6452
6615
  "description": "Labels applied to this message — filter-, organize-, and manually-applied alike (issue #26). Absent/empty means no label is applied."
6616
+ },
6617
+ "spamReport": {
6618
+ "allOf": [
6619
+ {
6620
+ "$ref": "#/components/schemas/RemitImap.MessageSpamReport"
6621
+ }
6622
+ ],
6623
+ "description": "Present when the user reported this message as spam and the report has not been undone, projected from the underlying Message row. Backs the \"Reported as spam · Undo\" affordance in list views."
6453
6624
  }
6454
6625
  },
6455
6626
  "description": "Thread message item returned by list/search operations. `senderTrust` is attached at read time via batch-fetch so the inbox row can render its badge without a per-row round trip. `category` is served from the ThreadMessage row itself, which is also the row the category filter matches, so the badge and the filter cannot disagree."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-spec",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "Remit API OpenAPI 3 document, generated from TypeSpec.",
5
5
  "exports": {
6
6
  ".": "./openapi.json",