@remit/api-openapi-spec 0.0.21 → 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 +196 -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": [
@@ -4170,6 +4262,16 @@
4170
4262
  },
4171
4263
  "description": "Complete message description including all related data. Body content is delivered via the per-part `BodyPartResponse.contentUrl` (CloudFront, JWT-authorized at the edge); the legacy `bodyText`/`bodyHtml` fields were removed once content delivery cut over end-to-end (#224)."
4172
4264
  },
4265
+ "RemitImap.DisplayNameCorrespondence": {
4266
+ "type": "string",
4267
+ "enum": [
4268
+ "Corresponds",
4269
+ "Lookalike",
4270
+ "Unrelated",
4271
+ "NoClaim"
4272
+ ],
4273
+ "description": "How the From display name relates to the From domain. `Corresponds` — the name is contained in the domain. `Lookalike` — the name is one or two characters away from a domain label. `Unrelated` — no relation. `NoClaim` — the name is empty or is the address itself, so it claims no identity."
4274
+ },
4173
4275
  "RemitImap.EmptyTrashResponse": {
4174
4276
  "type": "object",
4175
4277
  "required": [
@@ -4892,6 +4994,21 @@
4892
4994
  "dkimMismatch": {
4893
4995
  "type": "boolean",
4894
4996
  "description": "True when DKIM signing domain(s) are present and none aligns with the From domain"
4997
+ },
4998
+ "displayNameCorrespondence": {
4999
+ "allOf": [
5000
+ {
5001
+ "$ref": "#/components/schemas/RemitImap.DisplayNameCorrespondence"
5002
+ }
5003
+ ],
5004
+ "description": "How the From display name relates to the From domain. Present only for a message the provider's own filter already classified as spam, and only when the sender is not bulk-shaped (no List-Unsubscribe) — absence means the comparison was never made, never that it found nothing."
5005
+ },
5006
+ "offDomainLinkDomains": {
5007
+ "type": "array",
5008
+ "items": {
5009
+ "type": "string"
5010
+ },
5011
+ "description": "Registrable domains (eTLD+1) the body's links point at, excluding the From address's own registrable domain. Present only for a message the provider's own filter already classified as spam; an empty array means every link stayed on the sender's domain, absence means the comparison was never made."
4895
5012
  }
4896
5013
  },
4897
5014
  "description": "Structured sender-authenticity signal, derived from headers at classification time. Absent for messages classified before this field was introduced — clients should treat absence as no-signal."
@@ -4961,6 +5078,20 @@
4961
5078
  },
4962
5079
  "description": "Message reference response for In-Reply-To and References headers"
4963
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
+ },
4964
5095
  "RemitImap.MessageSummaryResponse": {
4965
5096
  "type": "object",
4966
5097
  "required": [
@@ -5037,6 +5168,14 @@
5037
5168
  "$ref": "#/components/schemas/RemitImap.LabelSummaryResponse"
5038
5169
  },
5039
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."
5040
5179
  }
5041
5180
  },
5042
5181
  "description": "Core message metadata for API responses"
@@ -5899,6 +6038,55 @@
5899
6038
  ],
5900
6039
  "description": "Sort order for list operations"
5901
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
+ },
5902
6090
  "RemitImap.StarColor": {
5903
6091
  "type": "string",
5904
6092
  "enum": [
@@ -6425,6 +6613,14 @@
6425
6613
  "$ref": "#/components/schemas/RemitImap.LabelSummaryResponse"
6426
6614
  },
6427
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."
6428
6624
  }
6429
6625
  },
6430
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.21",
3
+ "version": "0.0.23",
4
4
  "description": "Remit API OpenAPI 3 document, generated from TypeSpec.",
5
5
  "exports": {
6
6
  ".": "./openapi.json",