@remit/api-openapi-spec 0.0.5 → 0.0.7

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 +297 -0
  2. package/package.json +1 -1
package/openapi.json CHANGED
@@ -1476,6 +1476,33 @@
1476
1476
  }
1477
1477
  }
1478
1478
  },
1479
+ "/me/quarantine": {
1480
+ "get": {
1481
+ "operationId": "MeOperations_listQuarantine",
1482
+ "description": "List every message the sync path could not read, for the current user across all of their mail accounts (issue #72). Backs the quarantine section in settings. Unpaginated: the list is small by design, and an entry is a defect waiting to be reported rather than a page of mail.",
1483
+ "parameters": [],
1484
+ "responses": {
1485
+ "200": {
1486
+ "description": "The request has succeeded.",
1487
+ "content": {
1488
+ "application/json": {
1489
+ "schema": {
1490
+ "$ref": "#/components/schemas/RemitImap.QuarantineListResponse"
1491
+ }
1492
+ }
1493
+ }
1494
+ }
1495
+ },
1496
+ "x-amazon-apigateway-integration": {
1497
+ "type": "aws_proxy",
1498
+ "httpMethod": "POST",
1499
+ "passthroughBehavior": "when_no_match",
1500
+ "uri": {
1501
+ "Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations"
1502
+ }
1503
+ }
1504
+ }
1505
+ },
1479
1506
  "/me/vip-suggestions": {
1480
1507
  "get": {
1481
1508
  "operationId": "MeOperations_listVipSuggestions",
@@ -4891,6 +4918,268 @@
4891
4918
  ],
4892
4919
  "description": "Actionable placement verdict — the direction Remit decided to move a message. `leave` is not represented: a left-in-place verdict means the placement sub-model is absent."
4893
4920
  },
4921
+ "RemitImap.QuarantineFailureCode": {
4922
+ "type": "string",
4923
+ "enum": [
4924
+ "UnknownCharset",
4925
+ "UnreadableBody"
4926
+ ],
4927
+ "description": "The specific defect within a stage.\n\nClosed rather than free text: this is the one diagnostic that is interpolated\ninto the title of an issue filed under the user's own GitHub account, so its\npublishability has to be a property of the type instead of a claim about the\nwriter.\n\nThe vocabulary is total — every quarantine write picks a member, and a defect\nthe writer cannot name is `UnreadableBody` rather than an invented code. It\nis deliberately small: the body parser reports its refusals as free text with\nno stable type or code, so a member exists only where the writer can identify\nthe defect without reading parser prose. `UnterminatedMultipartBoundary` and\n`TruncatedBody` were provisional members carried by Phase 2 and are gone —\nnothing on the narrowed sync path could produce either, and a member no\nwriter can reach is a vocabulary that lies about what the field means.\n`MissingEnvelope` is absent for the same reason: see QuarantineFailureStage."
4928
+ },
4929
+ "RemitImap.QuarantineFailureStage": {
4930
+ "type": "string",
4931
+ "enum": [
4932
+ "BodyParse"
4933
+ ],
4934
+ "description": "The pipeline step that refused a quarantined message.\n\nOne member, and it is behind a real narrowing rather than a promise of one:\nthe body parse has its own try block around the parse call and nothing else,\nso an error out of it can only be the message. S3, queue and database\nfailures propagate and never become a record here — quarantining one would\nset a message aside for an outage, tell the user it was unreadable, and\ninvite a public GitHub issue about it.\n\nA message that arrives with no ENVELOPE is deliberately NOT a member. Nothing\ncan tell that apart from the FETCH row glitching (#408), and the IMAP client\nis far more often the cause than the message; the sync path holds its cursor\nand retries instead, so a transient glitch heals and a persistent one trips\nthe stalled-cursor alert."
4935
+ },
4936
+ "RemitImap.QuarantineListResponse": {
4937
+ "type": "object",
4938
+ "required": [
4939
+ "entries"
4940
+ ],
4941
+ "properties": {
4942
+ "entries": {
4943
+ "type": "array",
4944
+ "items": {
4945
+ "$ref": "#/components/schemas/RemitImap.QuarantineResponse"
4946
+ },
4947
+ "description": "Quarantined messages, newest first."
4948
+ }
4949
+ },
4950
+ "description": "Everything quarantined for the current user, newest first. The list is small by design — a mailbox with a growing quarantine list is a bug being reported, not a page to paginate."
4951
+ },
4952
+ "RemitImap.QuarantineMimeNode": {
4953
+ "type": "object",
4954
+ "required": [
4955
+ "depth",
4956
+ "contentType"
4957
+ ],
4958
+ "properties": {
4959
+ "depth": {
4960
+ "type": "integer",
4961
+ "format": "int32",
4962
+ "description": "Nesting level, 0 for the root part."
4963
+ },
4964
+ "contentType": {
4965
+ "allOf": [
4966
+ {
4967
+ "$ref": "#/components/schemas/String140"
4968
+ }
4969
+ ],
4970
+ "description": "Media type of this node, `type/subtype`, parameters stripped."
4971
+ }
4972
+ },
4973
+ "description": "One node of a quarantined message's MIME tree, in a pre-order walk.\n\nThe tree is carried flat with an explicit `depth` rather than as nested\nchildren: a self-referential model is not expressible here (the entity\nemitter recurses forever on one), and the tree is only ever rendered as an\nindented list, which a pre-order walk reproduces exactly. Nothing caps the\nwalk — it is as long as the message has parts.\n\n`contentType` is `type/subtype` only. BODYSTRUCTURE hands the type and its\nparameters over separately, so a node is built from `type`/`subtype` and\nnever from a raw content-type line — parameters carry `name=` and\n`filename=`, which name the user's attachments."
4974
+ },
4975
+ "RemitImap.QuarantineResponse": {
4976
+ "type": "object",
4977
+ "required": [
4978
+ "quarantineId",
4979
+ "accountConfigId",
4980
+ "accountId",
4981
+ "mailboxId",
4982
+ "uidValidity",
4983
+ "uid",
4984
+ "mailboxPath",
4985
+ "quarantinedAt",
4986
+ "attempts",
4987
+ "failureStage",
4988
+ "failureCode",
4989
+ "failureMessage",
4990
+ "workerVersion",
4991
+ "structure",
4992
+ "createdAt",
4993
+ "updatedAt"
4994
+ ],
4995
+ "properties": {
4996
+ "quarantineId": {
4997
+ "allOf": [
4998
+ {
4999
+ "$ref": "#/components/schemas/UUID"
5000
+ }
5001
+ ],
5002
+ "description": "Deterministic v5 identity derived from accountId, mailboxId, uidValidity and uid. Idempotent by construction: the same failing message keys the same row on every retry, so nothing has to check for an existing entry before writing one.",
5003
+ "readOnly": true
5004
+ },
5005
+ "accountConfigId": {
5006
+ "allOf": [
5007
+ {
5008
+ "$ref": "#/components/schemas/UUID"
5009
+ }
5010
+ ],
5011
+ "description": "Owning account configuration — the user. Scopes the settings list and the read endpoint.",
5012
+ "readOnly": true
5013
+ },
5014
+ "accountId": {
5015
+ "allOf": [
5016
+ {
5017
+ "$ref": "#/components/schemas/UUID"
5018
+ }
5019
+ ],
5020
+ "description": "Mail account the message arrived on. Part of the quarantineId derivation.",
5021
+ "readOnly": true
5022
+ },
5023
+ "mailboxId": {
5024
+ "allOf": [
5025
+ {
5026
+ "$ref": "#/components/schemas/UUID"
5027
+ }
5028
+ ],
5029
+ "description": "Mailbox the message arrived in. Part of the quarantineId derivation.",
5030
+ "readOnly": true
5031
+ },
5032
+ "uidValidity": {
5033
+ "type": "integer",
5034
+ "format": "int64",
5035
+ "description": "UIDVALIDITY of the mailbox when the message was set aside. A uid means nothing without it — only uidValidity + uid names a message forever (RFC 9051 2.3.1.1), and a mailbox keeps its mailboxId across a bump, so leaving this out would let a stale entry claim the identity of a later, unrelated message and suppress it from a sync round.",
5036
+ "readOnly": true
5037
+ },
5038
+ "uid": {
5039
+ "type": "integer",
5040
+ "format": "int64",
5041
+ "description": "The IMAP uid that was never written. Part of the quarantineId derivation.",
5042
+ "readOnly": true
5043
+ },
5044
+ "mailboxRole": {
5045
+ "allOf": [
5046
+ {
5047
+ "$ref": "#/components/schemas/RemitImap.CanonicalMailboxRole"
5048
+ }
5049
+ ],
5050
+ "description": "Canonical role of the folder the message arrived in — travels in the report. Absent when the user has appointed no role to that folder, which is the normal state for a plain folder. A sentinel would mean a new member on the shared canonical-role enum, which FolderAppointment would then have to mean something by.",
5051
+ "readOnly": true
5052
+ },
5053
+ "mailboxPath": {
5054
+ "allOf": [
5055
+ {
5056
+ "$ref": "#/components/schemas/String512"
5057
+ }
5058
+ ],
5059
+ "description": "The user's own folder name. Shown on screen, withheld from the report.",
5060
+ "readOnly": true
5061
+ },
5062
+ "quarantinedAt": {
5063
+ "type": "integer",
5064
+ "format": "int64",
5065
+ "description": "Epoch millis the message was set aside.",
5066
+ "readOnly": true
5067
+ },
5068
+ "attempts": {
5069
+ "type": "integer",
5070
+ "format": "int32",
5071
+ "description": "Rounds tried before the message was set aside.",
5072
+ "readOnly": true
5073
+ },
5074
+ "failureStage": {
5075
+ "allOf": [
5076
+ {
5077
+ "$ref": "#/components/schemas/RemitImap.QuarantineFailureStage"
5078
+ }
5079
+ ],
5080
+ "description": "Pipeline step that refused the message.",
5081
+ "readOnly": true
5082
+ },
5083
+ "failureCode": {
5084
+ "allOf": [
5085
+ {
5086
+ "$ref": "#/components/schemas/RemitImap.QuarantineFailureCode"
5087
+ }
5088
+ ],
5089
+ "description": "The specific defect. Closed vocabulary, because this is what a filed issue quotes.",
5090
+ "readOnly": true
5091
+ },
5092
+ "failureMessage": {
5093
+ "allOf": [
5094
+ {
5095
+ "$ref": "#/components/schemas/String512"
5096
+ }
5097
+ ],
5098
+ "description": "Parser error text. Shown on screen, never in the report.",
5099
+ "readOnly": true
5100
+ },
5101
+ "failurePartPath": {
5102
+ "allOf": [
5103
+ {
5104
+ "$ref": "#/components/schemas/String140"
5105
+ }
5106
+ ],
5107
+ "description": "Dot-numbered part path the failure is attributable to, off ROOT_PART_PATH. Absent when the failure belongs to no single node — every whole-body parse failure today.",
5108
+ "readOnly": true
5109
+ },
5110
+ "workerVersion": {
5111
+ "allOf": [
5112
+ {
5113
+ "$ref": "#/components/schemas/String64"
5114
+ }
5115
+ ],
5116
+ "description": "Build of the imap-worker that failed to read the message. Named for the worker, not the app: the record is written by the sync worker, and stamping the client build on a backend parse failure points a maintainer at the wrong commit.",
5117
+ "readOnly": true
5118
+ },
5119
+ "contentType": {
5120
+ "allOf": [
5121
+ {
5122
+ "$ref": "#/components/schemas/String140"
5123
+ }
5124
+ ],
5125
+ "description": "Top-level Content-Type, `type/subtype` only. Sender-controlled text — escape it wherever it is rendered. Absent together with the other BODYSTRUCTURE-derived fields when the message failed before its structure was read.",
5126
+ "readOnly": true
5127
+ },
5128
+ "transferEncoding": {
5129
+ "allOf": [
5130
+ {
5131
+ "$ref": "#/components/schemas/String64"
5132
+ }
5133
+ ],
5134
+ "description": "Content-Transfer-Encoding as declared. Sender-controlled text. Absent when there was no BODYSTRUCTURE to read it from.",
5135
+ "readOnly": true
5136
+ },
5137
+ "charset": {
5138
+ "allOf": [
5139
+ {
5140
+ "$ref": "#/components/schemas/String64"
5141
+ }
5142
+ ],
5143
+ "description": "Declared charset. Sender-controlled text. Absent is meaningful: an undeclared charset is a cause in its own right, distinct from a charset nobody recognises.",
5144
+ "readOnly": true
5145
+ },
5146
+ "sizeBytes": {
5147
+ "type": "integer",
5148
+ "format": "int64",
5149
+ "description": "RFC822.SIZE. Separates \"too large\" from \"malformed\". Absent when the FETCH that failed carried no size.",
5150
+ "readOnly": true
5151
+ },
5152
+ "structure": {
5153
+ "type": "array",
5154
+ "items": {
5155
+ "$ref": "#/components/schemas/RemitImap.QuarantineMimeNode"
5156
+ },
5157
+ "description": "The MIME tree, structure only, as a pre-order walk. The one field here that cannot be a column, because it is a tree; every other message-shape field is flat and stays typed. Empty when the message failed before its BODYSTRUCTURE was read.",
5158
+ "default": [],
5159
+ "readOnly": true
5160
+ },
5161
+ "messageIdHash": {
5162
+ "allOf": [
5163
+ {
5164
+ "$ref": "#/components/schemas/String140"
5165
+ }
5166
+ ],
5167
+ "description": "SHA-256 of the Message-ID, `sha256:` prefixed. Pinned to one algorithm: correlating two reports of the same message is the whole point of the field, and two builds hashing differently make it useless. Absent when the message declared no Message-ID — a hash of the empty string would make every such message correlate with every other, which is worse than no value at all.",
5168
+ "readOnly": true
5169
+ },
5170
+ "createdAt": {
5171
+ "type": "integer",
5172
+ "format": "int64",
5173
+ "readOnly": true
5174
+ },
5175
+ "updatedAt": {
5176
+ "type": "integer",
5177
+ "format": "int64",
5178
+ "readOnly": true
5179
+ }
5180
+ },
5181
+ "description": "One quarantined message as the settings surface sees it."
5182
+ },
4894
5183
  "RemitImap.RawMessageResponse": {
4895
5184
  "type": "object",
4896
5185
  "required": [
@@ -5887,6 +6176,10 @@
5887
6176
  ],
5888
6177
  "description": "Sender is wellknown: engagement counters crossed the promotion threshold"
5889
6178
  },
6179
+ "String140": {
6180
+ "type": "string",
6181
+ "maxLength": 140
6182
+ },
5890
6183
  "String256": {
5891
6184
  "type": "string",
5892
6185
  "maxLength": 256
@@ -5895,6 +6188,10 @@
5895
6188
  "type": "string",
5896
6189
  "maxLength": 512
5897
6190
  },
6191
+ "String64": {
6192
+ "type": "string",
6193
+ "maxLength": 64
6194
+ },
5898
6195
  "String800": {
5899
6196
  "type": "string",
5900
6197
  "maxLength": 800
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-spec",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Remit API OpenAPI 3 document, generated from TypeSpec.",
5
5
  "exports": {
6
6
  ".": "./openapi.json",