@remit/api-openapi-types 0.0.26 → 0.0.28

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/package.json +1 -1
  2. package/types.d.ts +330 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -157,6 +157,22 @@ current enum emitter anyway, so the wire contract uses the bare form.
157
157
  * Status of an outbox message in the send queue
158
158
  */
159
159
  export type OutboxMessageStatus = "draft" | "queued" | "sending" | "sent" | "failed" | "blocked";
160
+ /**
161
+ * Where an attachment is between being promised and being sendable.
162
+
163
+ There is no third state and no absence: a row exists from the moment room is
164
+ claimed, so the cap can be enforced against rows in one transaction rather
165
+ than against bytes that may or may not have landed yet.
166
+ */
167
+ export type OutboxAttachmentState = "Pending" | "Stored";
168
+ /**
169
+ * Why the server refused to reserve, or to accept, a file for a draft.
170
+
171
+ Closed rather than free text: the composer renders its own copy for each
172
+ member (naming the file, the size and the cap), so a refusal must be
173
+ distinguishable from a network failure without parsing prose.
174
+ */
175
+ export type OutboxAttachmentRejectionReason = "EmptyFile" | "UnusableFilename" | "FileTooLarge" | "MessageTooLarge" | "TooManyAttachments" | "ReservationExpired" | "UploadMissing" | "SizeMismatch";
160
176
  /**
161
177
  * Message lifecycle status for move/delete operations
162
178
  */
@@ -165,6 +181,10 @@ current enum emitter anyway, so the wire contract uses the bare form.
165
181
  * Sync status for message move/delete operations
166
182
  */
167
183
  export type MessageSyncStatus = "synced" | "pending" | "failed";
184
+ /**
185
+ * Sender-authenticity tier for a message, resolved at body-sync from the trusted Authentication-Results header and the sender's pair-keyed standing. First match wins, in tier order: `Impersonation`, `Aligned`, `Authenticated`, `Routine`, `NotChecked`, `Caution`. `NotEvaluated` is the sentinel for a message the derivation has never run on — it is the default and what every message written before this field existed carries, and it is distinct from `NotChecked`, which is a result.
186
+ */
187
+ export type AuthenticityVerdict = "NotEvaluated" | "NotChecked" | "Aligned" | "Authenticated" | "Routine" | "Caution" | "Impersonation";
168
188
  /**
169
189
  * Authentication verdict for a single auth mechanism, as reported in the Authentication-Results header.
170
190
  */
@@ -244,6 +264,7 @@ current enum emitter anyway, so the wire contract uses the bare form.
244
264
  export type String800 = string;
245
265
  export type String32 = string;
246
266
  export type String256 = string;
267
+ export type String2048 = string;
247
268
  /**
248
269
  * A semantic version string (e.g. "1.10.0"). See https://semver.org.
249
270
 
@@ -257,7 +278,6 @@ zero-pad width `@semanticVersion` encodes with — a segment beyond that is
257
278
  a compile-time error rather than a value that silently sorts incorrectly.
258
279
  */
259
280
  export type SemanticVersion = string;
260
- export type String2048 = string;
261
281
  export type String200 = string;
262
282
  export interface CognitoAuthorizer {
263
283
  /**
@@ -2492,6 +2512,22 @@ standing to persist.
2492
2512
  * 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.
2493
2513
  */
2494
2514
  offDomainLinkDomains?: string[];
2515
+ /**
2516
+ * Registrable domain of the first verified DKIM `header.d` in trusted Authentication-Results order, or the reserved literal `unverified` when no identity could be established. Unlike `dkimDomain`, which is the unverified `d=` claim the sender wrote, this is only set from a signature the trusted Authentication-Results reported as passing. Absent for messages classified before the field existed.
2517
+ */
2518
+ signerDomain?: string;
2519
+ /**
2520
+ * SPF-checked envelope-from domain (`smtp.mailfrom`, falling back to `smtp.helo`) from the trusted Authentication-Results. Absent when the trusted header carried no SPF clause, or for messages classified before the field existed.
2521
+ */
2522
+ envelopeDomain?: string;
2523
+ /**
2524
+ * Messages this account had already seen for the sender's standing key when this message arrived. A snapshot frozen at derivation time, deliberately not a live read — a message classified when the key stood at 340 always reads 340. Absent for messages classified before the field existed.
2525
+ */
2526
+ signerMessageCount?: number;
2527
+ /**
2528
+ * Epoch milliseconds this account first saw the sender's standing key, snapshotted at derivation time alongside `signerMessageCount`. Absent for messages classified before the field existed.
2529
+ */
2530
+ signerFirstSeenAt?: number;
2495
2531
  }
2496
2532
  /**
2497
2533
  * Present only when Remit auto-moved this message on body-sync. Two shapes share this model: a classifier placement move carries `action` + `fromPlacement` (Inbox/Junk direction); a standing-filter move carries `fromMailboxId` + `destinationMailboxId` + `filterId` (an arbitrary destination folder). Absent means the message was not auto-moved by Remit — clients treat absence as no indicator.
@@ -2795,11 +2831,100 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
2795
2831
  sentAt?: number;
2796
2832
  createdAt: number;
2797
2833
  updatedAt: number;
2834
+ /**
2835
+ * Files on this message. Empty when it carries none.
2836
+ */
2837
+ attachments: OutboxAttachmentResponse[];
2838
+ }
2839
+ /**
2840
+ * A file on a draft, from the moment room is claimed for it.
2841
+
2842
+ The row is the record: it is what the per-message cap is counted over, what
2843
+ says an object in storage belongs to a message, and what goes when the draft
2844
+ goes. Storage holds bytes and nothing else — an object no row names is
2845
+ garbage, which is the only thing the sweep needs to know.
2846
+ */
2847
+ export interface OutboxAttachment {
2848
+ /**
2849
+ * Primary identifier
2850
+ */
2851
+ outboxAttachmentId: UUID;
2852
+ /**
2853
+ * Draft this file belongs to
2854
+ */
2855
+ outboxMessageId: UUID;
2856
+ /**
2857
+ * Sending account, so the storage key can be rebuilt without a join
2858
+ */
2859
+ accountId: UUID;
2860
+ /**
2861
+ * Tenant scope, so every read can be scoped without a join
2862
+ */
2863
+ accountConfigId: UUID;
2864
+ /**
2865
+ * Filename as it will appear on the sent message, sanitized server-side
2866
+ */
2867
+ filename: String256;
2868
+ /**
2869
+ * Media type recorded at upload. Never trusted for rendering.
2870
+ */
2871
+ contentType: String256;
2872
+ /**
2873
+ * Bytes claimed at reservation, confirmed against storage once stored
2874
+ */
2875
+ sizeBytes: number;
2876
+ /**
2877
+ * Whether the bytes have arrived
2878
+ */
2879
+ state: OutboxAttachmentState;
2880
+ /**
2881
+ * Where the bytes live. Written at reservation so nothing has to derive it.
2882
+ */
2883
+ storageKey: String2048;
2884
+ /**
2885
+ * When a Pending reservation stops holding room. Zero once Stored.
2886
+ */
2887
+ reservationExpiresAt: number;
2888
+ createdAt: number;
2889
+ updatedAt: number;
2890
+ }
2891
+ /**
2892
+ * A file on a draft, as the composer sees it
2893
+ */
2894
+ export interface OutboxAttachmentResponse {
2895
+ /**
2896
+ * Primary identifier
2897
+ */
2898
+ outboxAttachmentId: UUID;
2899
+ /**
2900
+ * Draft this file belongs to
2901
+ */
2902
+ outboxMessageId: UUID;
2903
+ /**
2904
+ * Filename as it will appear on the sent message, sanitized server-side
2905
+ */
2906
+ filename: String256;
2907
+ /**
2908
+ * Media type recorded at upload. Never trusted for rendering.
2909
+ */
2910
+ contentType: String256;
2911
+ /**
2912
+ * Bytes claimed at reservation, confirmed against storage once stored
2913
+ */
2914
+ sizeBytes: number;
2915
+ /**
2916
+ * Whether the bytes have arrived
2917
+ */
2918
+ state: OutboxAttachmentState;
2798
2919
  }
2799
2920
  /**
2800
2921
  * Input for updating a draft outbox message
2801
2922
  */
2802
2923
  export interface UpdateOutboxMessageInput {
2924
+ /**
2925
+ * The files this draft keeps. Anything left out is removed with its bytes.
2926
+ */
2927
+ attachmentIds?: UUID[];
2803
2928
  /**
2804
2929
  * Recipient addresses (To)
2805
2930
  */
@@ -2833,6 +2958,89 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
2833
2958
  */
2834
2959
  references?: string[];
2835
2960
  }
2961
+ /**
2962
+ * What the client intends to attach, before any bytes move
2963
+ */
2964
+ export interface MintOutboxAttachmentInput {
2965
+ /**
2966
+ * Filename as the sender picked it. Sanitized server-side.
2967
+ */
2968
+ filename: String256;
2969
+ /**
2970
+ * Media type the browser reported. Recorded, never trusted for rendering.
2971
+ */
2972
+ contentType: String256;
2973
+ /**
2974
+ * Exact size of the file. The upload is bound to this number.
2975
+ */
2976
+ sizeBytes: number;
2977
+ }
2978
+ /**
2979
+ * A reservation and somewhere to put the bytes.
2980
+
2981
+ `uploadUrl` is opaque: on a hosted deployment it addresses block storage
2982
+ directly and the bytes never traverse this API, on a self-hosted one it
2983
+ addresses this deployment's own upload route. A client PUTs the file to it
2984
+ either way and cannot tell which it received.
2985
+ */
2986
+ export interface MintOutboxAttachmentResponse {
2987
+ /**
2988
+ * Primary identifier, and the name the completion call uses
2989
+ */
2990
+ outboxAttachmentId: UUID;
2991
+ /**
2992
+ * Draft the file is reserved against
2993
+ */
2994
+ outboxMessageId: UUID;
2995
+ /**
2996
+ * Sanitized filename that will appear on the sent message
2997
+ */
2998
+ filename: String256;
2999
+ /**
3000
+ * Normalized media type
3001
+ */
3002
+ contentType: String256;
3003
+ /**
3004
+ * Reserved size. The upload must carry exactly this many bytes.
3005
+ */
3006
+ sizeBytes: number;
3007
+ /**
3008
+ * Where to PUT the raw bytes. Single use, one attachment, expires.
3009
+ */
3010
+ uploadUrl: String2048;
3011
+ /**
3012
+ * When the reservation and the upload URL both lapse
3013
+ */
3014
+ uploadExpiresAt: number;
3015
+ }
3016
+ /**
3017
+ * Refusal response for an attachment
3018
+ */
3019
+ export interface OutboxAttachmentRejected {
3020
+ statusCode: 400 | 413;
3021
+ error: OutboxAttachmentRejection;
3022
+ }
3023
+ /**
3024
+ * A file the server refused, with everything the composer needs to say why
3025
+ */
3026
+ export interface OutboxAttachmentRejection {
3027
+ /**
3028
+ * Machine-readable reason
3029
+ */
3030
+ reason: OutboxAttachmentRejectionReason;
3031
+ /**
3032
+ * Sentence naming the file, its size and the cap
3033
+ */
3034
+ message: String512;
3035
+ /**
3036
+ * Total bytes one message may carry
3037
+ */
3038
+ limitBytes: number;
3039
+ /**
3040
+ * Bytes already spoken for on this draft, uploaded or merely reserved
3041
+ */
3042
+ usedBytes: number;
3043
+ }
2836
3044
  /**
2837
3045
  * Normalized email address per RFC 2822 Section 3.4.1. Addresses are deduplicated across messages within an account config.
2838
3046
  */
@@ -3233,6 +3441,10 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
3233
3441
  * Structured sender-authenticity signal derived from DKIM headers at classification time. Absent for messages classified before this field was introduced — absence means no signal.
3234
3442
  */
3235
3443
  authenticity?: MessageAuthenticity;
3444
+ /**
3445
+ * Sender-authenticity tier resolved at body-sync. Defaults to `NotEvaluated`, the named pending state every message written before the derivation existed carries. Top-level rather than a member of `authenticity` on purpose: that blob is absent for all unsigned mail, so a guard keyed on its absence cannot tell "never derived" from "nothing to derive" and would re-derive unsigned mail forever.
3446
+ */
3447
+ authenticityVerdict: AuthenticityVerdict;
3236
3448
  /**
3237
3449
  * Provider authentication-results signal parsed from Authentication-Results header. Absent for messages synced before this field was introduced.
3238
3450
  */
@@ -4139,6 +4351,56 @@ locally".
4139
4351
  createdAt: number;
4140
4352
  updatedAt: number;
4141
4353
  }
4354
+ /**
4355
+ * How often this account has seen mail from one sender arrive under one DKIM
4356
+ signing identity. A third-party signer is not suspicious in itself — an ESP
4357
+ signing for its own domain on behalf of a customer is the ordinary shape of
4358
+ bulk mail — so what the authenticity derivation asks is whether this sender
4359
+ has been seen arriving this way before.
4360
+
4361
+ `senderKey` carries two scopes, disambiguated by `signerDomain`: the From
4362
+ domain when the signer is a real verified identity, and the full From address
4363
+ when `signerDomain` is the reserved literal `unverified`. Address granularity
4364
+ on the unverified pseudo-pair is a security boundary — a domain-wide key would
4365
+ let one unverifiable message from any address at a domain earn quiet treatment
4366
+ for every forged sender at it.
4367
+
4368
+ Standing is a noise filter, not an anti-spoofing control. It narrows the
4369
+ attack from "rent any established relay" to "rent the relay this specific From
4370
+ domain already uses"; it does not close it.
4371
+ */
4372
+ export interface SenderSignerStanding {
4373
+ /**
4374
+ * Owning account configuration. Standing is never shared between accounts.
4375
+ */
4376
+ accountConfigId: UUID;
4377
+ /**
4378
+ * Lowercased From domain when `signerDomain` names a real verified signer; the full lowercased From address when `signerDomain` is the reserved literal `unverified`.
4379
+ */
4380
+ senderKey: String256;
4381
+ /**
4382
+ * Registrable domain of the first verified DKIM `header.d` in trusted Authentication-Results order, or the reserved literal `unverified` when no identity could be established. `unverified` is rejected as a real signer domain on write.
4383
+ */
4384
+ signerDomain: String256;
4385
+ /**
4386
+ * Messages observed for this key. One increment per message.
4387
+ */
4388
+ messageCount: number;
4389
+ /**
4390
+ * Epoch milliseconds of the first observation. Immutable after creation — the conflict path of the upsert deliberately omits it, so a later message can never reset the key's age.
4391
+ */
4392
+ firstSeenAt: number;
4393
+ /**
4394
+ * Epoch milliseconds of the most recent observation.
4395
+ */
4396
+ lastSeenAt: number;
4397
+ /**
4398
+ * Epoch milliseconds the user affirmed knowing this sender, promoting `Caution` to `Routine` for the pair. `0` means never affirmed, which is the state of every row until a user acts.
4399
+ */
4400
+ userAffirmedAt: number;
4401
+ createdAt: number;
4402
+ updatedAt: number;
4403
+ }
4142
4404
  /**
4143
4405
  * Content-Type and other MIME parameters (CHARSET, BOUNDARY, NAME, etc.)
4144
4406
  */
@@ -4798,6 +5060,26 @@ declare namespace Paths {
4798
5060
  export type $200 = void;
4799
5061
  }
4800
5062
  }
5063
+ namespace MintOutboxAttachment {
5064
+ export interface PathParameters {
5065
+ outboxMessageId: Components.Schemas.UUID;
5066
+ }
5067
+ export type RequestBody = Components.Schemas.MintOutboxAttachmentInput;
5068
+ namespace Responses {
5069
+ export type $200 = void;
5070
+ export type $200 = void;
5071
+ }
5072
+ }
5073
+ namespace CompleteOutboxAttachment {
5074
+ export interface PathParameters {
5075
+ outboxMessageId: Components.Schemas.UUID;
5076
+ outboxAttachmentId: Components.Schemas.UUID;
5077
+ }
5078
+ namespace Responses {
5079
+ export type $200 = void;
5080
+ export type $200 = void;
5081
+ }
5082
+ }
4801
5083
  namespace SearchAddresses {
4802
5084
  export interface QueryParameters {
4803
5085
  q: string;
@@ -5286,6 +5568,22 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
5286
5568
  data?: any,
5287
5569
  config?: AxiosRequestConfig
5288
5570
  ): OperationResponse<Paths.SendOutboxMessage.Responses.$200>;
5571
+ /**
5572
+ * mintOutboxAttachment - Reserve room on a draft for a file, and get somewhere to put it
5573
+ */
5574
+ 'mintOutboxAttachment'(
5575
+ parameters?: Parameters<Paths.MintOutboxAttachment.PathParameters> | null,
5576
+ data?: Paths.MintOutboxAttachment.RequestBody,
5577
+ config?: AxiosRequestConfig
5578
+ ): OperationResponse<Paths.MintOutboxAttachment.Responses.$200 | Paths.MintOutboxAttachment.Responses.$200>;
5579
+ /**
5580
+ * completeOutboxAttachment - Confirm an uploaded file against the object storage now holds
5581
+ */
5582
+ 'completeOutboxAttachment'(
5583
+ parameters?: Parameters<Paths.CompleteOutboxAttachment.PathParameters> | null,
5584
+ data?: any,
5585
+ config?: AxiosRequestConfig
5586
+ ): OperationResponse<Paths.CompleteOutboxAttachment.Responses.$200 | Paths.CompleteOutboxAttachment.Responses.$200>;
5289
5587
  /**
5290
5588
  * searchAddresses - Search addresses for autocomplete
5291
5589
  */
@@ -5851,6 +6149,26 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
5851
6149
  config?: AxiosRequestConfig
5852
6150
  ): OperationResponse<Paths.SendOutboxMessage.Responses.$200>;
5853
6151
  };
6152
+ ['/outbox/{outboxMessageId}/attachments']: {
6153
+ /**
6154
+ * mintOutboxAttachment - Reserve room on a draft for a file, and get somewhere to put it
6155
+ */
6156
+ 'post'(
6157
+ parameters?: Parameters<Paths.MintOutboxAttachment.PathParameters> | null,
6158
+ data?: Paths.MintOutboxAttachment.RequestBody,
6159
+ config?: AxiosRequestConfig
6160
+ ): OperationResponse<Paths.MintOutboxAttachment.Responses.$200 | Paths.MintOutboxAttachment.Responses.$200>;
6161
+ };
6162
+ ['/outbox/{outboxMessageId}/attachments/{outboxAttachmentId}/complete']: {
6163
+ /**
6164
+ * completeOutboxAttachment - Confirm an uploaded file against the object storage now holds
6165
+ */
6166
+ 'post'(
6167
+ parameters?: Parameters<Paths.CompleteOutboxAttachment.PathParameters> | null,
6168
+ data?: any,
6169
+ config?: AxiosRequestConfig
6170
+ ): OperationResponse<Paths.CompleteOutboxAttachment.Responses.$200 | Paths.CompleteOutboxAttachment.Responses.$200>;
6171
+ };
5854
6172
  ['/addresses/search']: {
5855
6173
  /**
5856
6174
  * searchAddresses - Search addresses for autocomplete
@@ -6047,7 +6365,13 @@ export type SemanticSearchResult = Components.Schemas.SemanticSearchResult;
6047
6365
  export type CreateOutboxMessageInput = Components.Schemas.CreateOutboxMessageInput;
6048
6366
  export type OutboxMessage = Components.Schemas.OutboxMessage;
6049
6367
  export type OutboxMessageResponse = Components.Schemas.OutboxMessageResponse;
6368
+ export type OutboxAttachment = Components.Schemas.OutboxAttachment;
6369
+ export type OutboxAttachmentResponse = Components.Schemas.OutboxAttachmentResponse;
6050
6370
  export type UpdateOutboxMessageInput = Components.Schemas.UpdateOutboxMessageInput;
6371
+ export type MintOutboxAttachmentInput = Components.Schemas.MintOutboxAttachmentInput;
6372
+ export type MintOutboxAttachmentResponse = Components.Schemas.MintOutboxAttachmentResponse;
6373
+ export type OutboxAttachmentRejected = Components.Schemas.OutboxAttachmentRejected;
6374
+ export type OutboxAttachmentRejection = Components.Schemas.OutboxAttachmentRejection;
6051
6375
  export type Address = Components.Schemas.Address;
6052
6376
  export type AddressFlags = Components.Schemas.AddressFlags;
6053
6377
  export type TrustedFlag = Components.Schemas.TrustedFlag;
@@ -6101,6 +6425,7 @@ export type MessageFlag = Components.Schemas.MessageFlag;
6101
6425
  export type MessagePlacementMove = Components.Schemas.MessagePlacementMove;
6102
6426
  export type MessageFlagPush = Components.Schemas.MessageFlagPush;
6103
6427
  export type Envelope = Components.Schemas.Envelope;
6428
+ export type SenderSignerStanding = Components.Schemas.SenderSignerStanding;
6104
6429
  export type BodyPartParameter = Components.Schemas.BodyPartParameter;
6105
6430
  export type RawMessageStorage = Components.Schemas.RawMessageStorage;
6106
6431
  export type BodyPartStorage = Components.Schemas.BodyPartStorage;
@@ -6139,8 +6464,11 @@ export type DisplayNameCorrespondence = Components.Schemas.DisplayNameCorrespond
6139
6464
  export type PlacementAction = Components.Schemas.PlacementAction;
6140
6465
  export type SemanticSearchChunkType = Components.Schemas.SemanticSearchChunkType;
6141
6466
  export type OutboxMessageStatus = Components.Schemas.OutboxMessageStatus;
6467
+ export type OutboxAttachmentState = Components.Schemas.OutboxAttachmentState;
6468
+ export type OutboxAttachmentRejectionReason = Components.Schemas.OutboxAttachmentRejectionReason;
6142
6469
  export type MessageStatus = Components.Schemas.MessageStatus;
6143
6470
  export type MessageSyncStatus = Components.Schemas.MessageSyncStatus;
6471
+ export type AuthenticityVerdict = Components.Schemas.AuthenticityVerdict;
6144
6472
  export type AuthResultVerdict = Components.Schemas.AuthResultVerdict;
6145
6473
  export type PlacementConfidence = Components.Schemas.PlacementConfidence;
6146
6474
  export type AddressRole = Components.Schemas.AddressRole;
@@ -6166,6 +6494,6 @@ export type String64 = Components.Schemas.String64;
6166
6494
  export type String800 = Components.Schemas.String800;
6167
6495
  export type String32 = Components.Schemas.String32;
6168
6496
  export type String256 = Components.Schemas.String256;
6169
- export type SemanticVersion = Components.Schemas.SemanticVersion;
6170
6497
  export type String2048 = Components.Schemas.String2048;
6498
+ export type SemanticVersion = Components.Schemas.SemanticVersion;
6171
6499
  export type String200 = Components.Schemas.String200;