@remit/api-openapi-types 0.0.25 → 0.0.27
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.
- package/package.json +1 -1
- package/types.d.ts +263 -3
package/package.json
CHANGED
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
|
*/
|
|
@@ -224,7 +240,7 @@ current enum emitter anyway, so the wire contract uses the bare form.
|
|
|
224
240
|
/**
|
|
225
241
|
* Known user-setting keys. Each maps, in the registry, to a required value kind and a zod schema. New keys are added deliberately by extending this enum and the registry — never as an ad-hoc column.
|
|
226
242
|
*/
|
|
227
|
-
export type AccountSettingName = "Theme" | "Density" | "DefaultComposerFormat" | "PinnedFolders" | "AccountSignaturePlainText" | "AccountSignatureHtml" | "AccountDisplayName" | "AccountMuted" | "MailboxDisplayName" | "MailboxMuted" | "FolderRoleAppointment" | "MailboxRole";
|
|
243
|
+
export type AccountSettingName = "Theme" | "Density" | "DefaultComposerFormat" | "PinnedFolders" | "AccountSignaturePlainText" | "AccountSignatureHtml" | "AccountDisplayName" | "AccountMuted" | "AccountComposeLanguages" | "MailboxDisplayName" | "MailboxMuted" | "FolderRoleAppointment" | "MailboxRole";
|
|
228
244
|
/**
|
|
229
245
|
* Explicit state engine for a pending placement-move marker (issue #1271, epic #1281). Recovery keys off this field, not control-flow inference: a redelivered/retried call drives a marker forward from whichever state it is actually in, rather than re-deriving intent by comparing the message's current location.
|
|
230
246
|
*/
|
|
@@ -244,6 +260,7 @@ current enum emitter anyway, so the wire contract uses the bare form.
|
|
|
244
260
|
export type String800 = string;
|
|
245
261
|
export type String32 = string;
|
|
246
262
|
export type String256 = string;
|
|
263
|
+
export type String2048 = string;
|
|
247
264
|
/**
|
|
248
265
|
* A semantic version string (e.g. "1.10.0"). See https://semver.org.
|
|
249
266
|
|
|
@@ -257,7 +274,6 @@ zero-pad width `@semanticVersion` encodes with — a segment beyond that is
|
|
|
257
274
|
a compile-time error rather than a value that silently sorts incorrectly.
|
|
258
275
|
*/
|
|
259
276
|
export type SemanticVersion = string;
|
|
260
|
-
export type String2048 = string;
|
|
261
277
|
export type String200 = string;
|
|
262
278
|
export interface CognitoAuthorizer {
|
|
263
279
|
/**
|
|
@@ -1048,6 +1064,10 @@ never from a raw content-type line — parameters carry `name=` and
|
|
|
1048
1064
|
* HTML email signature for this account
|
|
1049
1065
|
*/
|
|
1050
1066
|
signatureHtml?: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* BCP 47 language tags this account writes mail in, most-used first (issue #686). The first entry is what a new message opens on; the whole list is the candidate set language detection chooses inside. Absent when the user has not configured one, and the client falls back to the browser's own languages. Sourced from a per-account AccountSetting row (RFC 032).
|
|
1069
|
+
*/
|
|
1070
|
+
composeLanguages?: string[];
|
|
1051
1071
|
/**
|
|
1052
1072
|
* Per-account appointment of each canonical role (Inbox, Drafts, Sent, Archive, Junk, Trash, All, Flagged) to at most one mailbox (RFC 032 exclusive-folder-appointment, issue #976). Always carries one entry per CanonicalMailboxRole member; an entry's `mailboxId` is a persisted user choice when set, or a server-proposed detection result when the user hasn't appointed that role yet. Write with PUT /accounts/{accountId}/folder-roles/{role}.
|
|
1053
1073
|
*/
|
|
@@ -2244,6 +2264,10 @@ standing to persist.
|
|
|
2244
2264
|
* HTML email signature
|
|
2245
2265
|
*/
|
|
2246
2266
|
signatureHtml?: string;
|
|
2267
|
+
/**
|
|
2268
|
+
* BCP 47 language tags this account writes mail in, most-used first (issue #686). Replaces the stored list outright; an empty array clears it.
|
|
2269
|
+
*/
|
|
2270
|
+
composeLanguages?: string[];
|
|
2247
2271
|
/**
|
|
2248
2272
|
* Account-level mute flag. Pass a MutedFlag object to mute; pass `null` to clear the mute.
|
|
2249
2273
|
*/
|
|
@@ -2787,11 +2811,100 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
2787
2811
|
sentAt?: number;
|
|
2788
2812
|
createdAt: number;
|
|
2789
2813
|
updatedAt: number;
|
|
2814
|
+
/**
|
|
2815
|
+
* Files on this message. Empty when it carries none.
|
|
2816
|
+
*/
|
|
2817
|
+
attachments: OutboxAttachmentResponse[];
|
|
2818
|
+
}
|
|
2819
|
+
/**
|
|
2820
|
+
* A file on a draft, from the moment room is claimed for it.
|
|
2821
|
+
|
|
2822
|
+
The row is the record: it is what the per-message cap is counted over, what
|
|
2823
|
+
says an object in storage belongs to a message, and what goes when the draft
|
|
2824
|
+
goes. Storage holds bytes and nothing else — an object no row names is
|
|
2825
|
+
garbage, which is the only thing the sweep needs to know.
|
|
2826
|
+
*/
|
|
2827
|
+
export interface OutboxAttachment {
|
|
2828
|
+
/**
|
|
2829
|
+
* Primary identifier
|
|
2830
|
+
*/
|
|
2831
|
+
outboxAttachmentId: UUID;
|
|
2832
|
+
/**
|
|
2833
|
+
* Draft this file belongs to
|
|
2834
|
+
*/
|
|
2835
|
+
outboxMessageId: UUID;
|
|
2836
|
+
/**
|
|
2837
|
+
* Sending account, so the storage key can be rebuilt without a join
|
|
2838
|
+
*/
|
|
2839
|
+
accountId: UUID;
|
|
2840
|
+
/**
|
|
2841
|
+
* Tenant scope, so every read can be scoped without a join
|
|
2842
|
+
*/
|
|
2843
|
+
accountConfigId: UUID;
|
|
2844
|
+
/**
|
|
2845
|
+
* Filename as it will appear on the sent message, sanitized server-side
|
|
2846
|
+
*/
|
|
2847
|
+
filename: String256;
|
|
2848
|
+
/**
|
|
2849
|
+
* Media type recorded at upload. Never trusted for rendering.
|
|
2850
|
+
*/
|
|
2851
|
+
contentType: String256;
|
|
2852
|
+
/**
|
|
2853
|
+
* Bytes claimed at reservation, confirmed against storage once stored
|
|
2854
|
+
*/
|
|
2855
|
+
sizeBytes: number;
|
|
2856
|
+
/**
|
|
2857
|
+
* Whether the bytes have arrived
|
|
2858
|
+
*/
|
|
2859
|
+
state: OutboxAttachmentState;
|
|
2860
|
+
/**
|
|
2861
|
+
* Where the bytes live. Written at reservation so nothing has to derive it.
|
|
2862
|
+
*/
|
|
2863
|
+
storageKey: String2048;
|
|
2864
|
+
/**
|
|
2865
|
+
* When a Pending reservation stops holding room. Zero once Stored.
|
|
2866
|
+
*/
|
|
2867
|
+
reservationExpiresAt: number;
|
|
2868
|
+
createdAt: number;
|
|
2869
|
+
updatedAt: number;
|
|
2870
|
+
}
|
|
2871
|
+
/**
|
|
2872
|
+
* A file on a draft, as the composer sees it
|
|
2873
|
+
*/
|
|
2874
|
+
export interface OutboxAttachmentResponse {
|
|
2875
|
+
/**
|
|
2876
|
+
* Primary identifier
|
|
2877
|
+
*/
|
|
2878
|
+
outboxAttachmentId: UUID;
|
|
2879
|
+
/**
|
|
2880
|
+
* Draft this file belongs to
|
|
2881
|
+
*/
|
|
2882
|
+
outboxMessageId: UUID;
|
|
2883
|
+
/**
|
|
2884
|
+
* Filename as it will appear on the sent message, sanitized server-side
|
|
2885
|
+
*/
|
|
2886
|
+
filename: String256;
|
|
2887
|
+
/**
|
|
2888
|
+
* Media type recorded at upload. Never trusted for rendering.
|
|
2889
|
+
*/
|
|
2890
|
+
contentType: String256;
|
|
2891
|
+
/**
|
|
2892
|
+
* Bytes claimed at reservation, confirmed against storage once stored
|
|
2893
|
+
*/
|
|
2894
|
+
sizeBytes: number;
|
|
2895
|
+
/**
|
|
2896
|
+
* Whether the bytes have arrived
|
|
2897
|
+
*/
|
|
2898
|
+
state: OutboxAttachmentState;
|
|
2790
2899
|
}
|
|
2791
2900
|
/**
|
|
2792
2901
|
* Input for updating a draft outbox message
|
|
2793
2902
|
*/
|
|
2794
2903
|
export interface UpdateOutboxMessageInput {
|
|
2904
|
+
/**
|
|
2905
|
+
* The files this draft keeps. Anything left out is removed with its bytes.
|
|
2906
|
+
*/
|
|
2907
|
+
attachmentIds?: UUID[];
|
|
2795
2908
|
/**
|
|
2796
2909
|
* Recipient addresses (To)
|
|
2797
2910
|
*/
|
|
@@ -2825,6 +2938,89 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
2825
2938
|
*/
|
|
2826
2939
|
references?: string[];
|
|
2827
2940
|
}
|
|
2941
|
+
/**
|
|
2942
|
+
* What the client intends to attach, before any bytes move
|
|
2943
|
+
*/
|
|
2944
|
+
export interface MintOutboxAttachmentInput {
|
|
2945
|
+
/**
|
|
2946
|
+
* Filename as the sender picked it. Sanitized server-side.
|
|
2947
|
+
*/
|
|
2948
|
+
filename: String256;
|
|
2949
|
+
/**
|
|
2950
|
+
* Media type the browser reported. Recorded, never trusted for rendering.
|
|
2951
|
+
*/
|
|
2952
|
+
contentType: String256;
|
|
2953
|
+
/**
|
|
2954
|
+
* Exact size of the file. The upload is bound to this number.
|
|
2955
|
+
*/
|
|
2956
|
+
sizeBytes: number;
|
|
2957
|
+
}
|
|
2958
|
+
/**
|
|
2959
|
+
* A reservation and somewhere to put the bytes.
|
|
2960
|
+
|
|
2961
|
+
`uploadUrl` is opaque: on a hosted deployment it addresses block storage
|
|
2962
|
+
directly and the bytes never traverse this API, on a self-hosted one it
|
|
2963
|
+
addresses this deployment's own upload route. A client PUTs the file to it
|
|
2964
|
+
either way and cannot tell which it received.
|
|
2965
|
+
*/
|
|
2966
|
+
export interface MintOutboxAttachmentResponse {
|
|
2967
|
+
/**
|
|
2968
|
+
* Primary identifier, and the name the completion call uses
|
|
2969
|
+
*/
|
|
2970
|
+
outboxAttachmentId: UUID;
|
|
2971
|
+
/**
|
|
2972
|
+
* Draft the file is reserved against
|
|
2973
|
+
*/
|
|
2974
|
+
outboxMessageId: UUID;
|
|
2975
|
+
/**
|
|
2976
|
+
* Sanitized filename that will appear on the sent message
|
|
2977
|
+
*/
|
|
2978
|
+
filename: String256;
|
|
2979
|
+
/**
|
|
2980
|
+
* Normalized media type
|
|
2981
|
+
*/
|
|
2982
|
+
contentType: String256;
|
|
2983
|
+
/**
|
|
2984
|
+
* Reserved size. The upload must carry exactly this many bytes.
|
|
2985
|
+
*/
|
|
2986
|
+
sizeBytes: number;
|
|
2987
|
+
/**
|
|
2988
|
+
* Where to PUT the raw bytes. Single use, one attachment, expires.
|
|
2989
|
+
*/
|
|
2990
|
+
uploadUrl: String2048;
|
|
2991
|
+
/**
|
|
2992
|
+
* When the reservation and the upload URL both lapse
|
|
2993
|
+
*/
|
|
2994
|
+
uploadExpiresAt: number;
|
|
2995
|
+
}
|
|
2996
|
+
/**
|
|
2997
|
+
* Refusal response for an attachment
|
|
2998
|
+
*/
|
|
2999
|
+
export interface OutboxAttachmentRejected {
|
|
3000
|
+
statusCode: 400 | 413;
|
|
3001
|
+
error: OutboxAttachmentRejection;
|
|
3002
|
+
}
|
|
3003
|
+
/**
|
|
3004
|
+
* A file the server refused, with everything the composer needs to say why
|
|
3005
|
+
*/
|
|
3006
|
+
export interface OutboxAttachmentRejection {
|
|
3007
|
+
/**
|
|
3008
|
+
* Machine-readable reason
|
|
3009
|
+
*/
|
|
3010
|
+
reason: OutboxAttachmentRejectionReason;
|
|
3011
|
+
/**
|
|
3012
|
+
* Sentence naming the file, its size and the cap
|
|
3013
|
+
*/
|
|
3014
|
+
message: String512;
|
|
3015
|
+
/**
|
|
3016
|
+
* Total bytes one message may carry
|
|
3017
|
+
*/
|
|
3018
|
+
limitBytes: number;
|
|
3019
|
+
/**
|
|
3020
|
+
* Bytes already spoken for on this draft, uploaded or merely reserved
|
|
3021
|
+
*/
|
|
3022
|
+
usedBytes: number;
|
|
3023
|
+
}
|
|
2828
3024
|
/**
|
|
2829
3025
|
* Normalized email address per RFC 2822 Section 3.4.1. Addresses are deduplicated across messages within an account config.
|
|
2830
3026
|
*/
|
|
@@ -4790,6 +4986,26 @@ declare namespace Paths {
|
|
|
4790
4986
|
export type $200 = void;
|
|
4791
4987
|
}
|
|
4792
4988
|
}
|
|
4989
|
+
namespace MintOutboxAttachment {
|
|
4990
|
+
export interface PathParameters {
|
|
4991
|
+
outboxMessageId: Components.Schemas.UUID;
|
|
4992
|
+
}
|
|
4993
|
+
export type RequestBody = Components.Schemas.MintOutboxAttachmentInput;
|
|
4994
|
+
namespace Responses {
|
|
4995
|
+
export type $200 = void;
|
|
4996
|
+
export type $200 = void;
|
|
4997
|
+
}
|
|
4998
|
+
}
|
|
4999
|
+
namespace CompleteOutboxAttachment {
|
|
5000
|
+
export interface PathParameters {
|
|
5001
|
+
outboxMessageId: Components.Schemas.UUID;
|
|
5002
|
+
outboxAttachmentId: Components.Schemas.UUID;
|
|
5003
|
+
}
|
|
5004
|
+
namespace Responses {
|
|
5005
|
+
export type $200 = void;
|
|
5006
|
+
export type $200 = void;
|
|
5007
|
+
}
|
|
5008
|
+
}
|
|
4793
5009
|
namespace SearchAddresses {
|
|
4794
5010
|
export interface QueryParameters {
|
|
4795
5011
|
q: string;
|
|
@@ -5278,6 +5494,22 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
|
|
|
5278
5494
|
data?: any,
|
|
5279
5495
|
config?: AxiosRequestConfig
|
|
5280
5496
|
): OperationResponse<Paths.SendOutboxMessage.Responses.$200>;
|
|
5497
|
+
/**
|
|
5498
|
+
* mintOutboxAttachment - Reserve room on a draft for a file, and get somewhere to put it
|
|
5499
|
+
*/
|
|
5500
|
+
'mintOutboxAttachment'(
|
|
5501
|
+
parameters?: Parameters<Paths.MintOutboxAttachment.PathParameters> | null,
|
|
5502
|
+
data?: Paths.MintOutboxAttachment.RequestBody,
|
|
5503
|
+
config?: AxiosRequestConfig
|
|
5504
|
+
): OperationResponse<Paths.MintOutboxAttachment.Responses.$200 | Paths.MintOutboxAttachment.Responses.$200>;
|
|
5505
|
+
/**
|
|
5506
|
+
* completeOutboxAttachment - Confirm an uploaded file against the object storage now holds
|
|
5507
|
+
*/
|
|
5508
|
+
'completeOutboxAttachment'(
|
|
5509
|
+
parameters?: Parameters<Paths.CompleteOutboxAttachment.PathParameters> | null,
|
|
5510
|
+
data?: any,
|
|
5511
|
+
config?: AxiosRequestConfig
|
|
5512
|
+
): OperationResponse<Paths.CompleteOutboxAttachment.Responses.$200 | Paths.CompleteOutboxAttachment.Responses.$200>;
|
|
5281
5513
|
/**
|
|
5282
5514
|
* searchAddresses - Search addresses for autocomplete
|
|
5283
5515
|
*/
|
|
@@ -5843,6 +6075,26 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
|
|
|
5843
6075
|
config?: AxiosRequestConfig
|
|
5844
6076
|
): OperationResponse<Paths.SendOutboxMessage.Responses.$200>;
|
|
5845
6077
|
};
|
|
6078
|
+
['/outbox/{outboxMessageId}/attachments']: {
|
|
6079
|
+
/**
|
|
6080
|
+
* mintOutboxAttachment - Reserve room on a draft for a file, and get somewhere to put it
|
|
6081
|
+
*/
|
|
6082
|
+
'post'(
|
|
6083
|
+
parameters?: Parameters<Paths.MintOutboxAttachment.PathParameters> | null,
|
|
6084
|
+
data?: Paths.MintOutboxAttachment.RequestBody,
|
|
6085
|
+
config?: AxiosRequestConfig
|
|
6086
|
+
): OperationResponse<Paths.MintOutboxAttachment.Responses.$200 | Paths.MintOutboxAttachment.Responses.$200>;
|
|
6087
|
+
};
|
|
6088
|
+
['/outbox/{outboxMessageId}/attachments/{outboxAttachmentId}/complete']: {
|
|
6089
|
+
/**
|
|
6090
|
+
* completeOutboxAttachment - Confirm an uploaded file against the object storage now holds
|
|
6091
|
+
*/
|
|
6092
|
+
'post'(
|
|
6093
|
+
parameters?: Parameters<Paths.CompleteOutboxAttachment.PathParameters> | null,
|
|
6094
|
+
data?: any,
|
|
6095
|
+
config?: AxiosRequestConfig
|
|
6096
|
+
): OperationResponse<Paths.CompleteOutboxAttachment.Responses.$200 | Paths.CompleteOutboxAttachment.Responses.$200>;
|
|
6097
|
+
};
|
|
5846
6098
|
['/addresses/search']: {
|
|
5847
6099
|
/**
|
|
5848
6100
|
* searchAddresses - Search addresses for autocomplete
|
|
@@ -6039,7 +6291,13 @@ export type SemanticSearchResult = Components.Schemas.SemanticSearchResult;
|
|
|
6039
6291
|
export type CreateOutboxMessageInput = Components.Schemas.CreateOutboxMessageInput;
|
|
6040
6292
|
export type OutboxMessage = Components.Schemas.OutboxMessage;
|
|
6041
6293
|
export type OutboxMessageResponse = Components.Schemas.OutboxMessageResponse;
|
|
6294
|
+
export type OutboxAttachment = Components.Schemas.OutboxAttachment;
|
|
6295
|
+
export type OutboxAttachmentResponse = Components.Schemas.OutboxAttachmentResponse;
|
|
6042
6296
|
export type UpdateOutboxMessageInput = Components.Schemas.UpdateOutboxMessageInput;
|
|
6297
|
+
export type MintOutboxAttachmentInput = Components.Schemas.MintOutboxAttachmentInput;
|
|
6298
|
+
export type MintOutboxAttachmentResponse = Components.Schemas.MintOutboxAttachmentResponse;
|
|
6299
|
+
export type OutboxAttachmentRejected = Components.Schemas.OutboxAttachmentRejected;
|
|
6300
|
+
export type OutboxAttachmentRejection = Components.Schemas.OutboxAttachmentRejection;
|
|
6043
6301
|
export type Address = Components.Schemas.Address;
|
|
6044
6302
|
export type AddressFlags = Components.Schemas.AddressFlags;
|
|
6045
6303
|
export type TrustedFlag = Components.Schemas.TrustedFlag;
|
|
@@ -6131,6 +6389,8 @@ export type DisplayNameCorrespondence = Components.Schemas.DisplayNameCorrespond
|
|
|
6131
6389
|
export type PlacementAction = Components.Schemas.PlacementAction;
|
|
6132
6390
|
export type SemanticSearchChunkType = Components.Schemas.SemanticSearchChunkType;
|
|
6133
6391
|
export type OutboxMessageStatus = Components.Schemas.OutboxMessageStatus;
|
|
6392
|
+
export type OutboxAttachmentState = Components.Schemas.OutboxAttachmentState;
|
|
6393
|
+
export type OutboxAttachmentRejectionReason = Components.Schemas.OutboxAttachmentRejectionReason;
|
|
6134
6394
|
export type MessageStatus = Components.Schemas.MessageStatus;
|
|
6135
6395
|
export type MessageSyncStatus = Components.Schemas.MessageSyncStatus;
|
|
6136
6396
|
export type AuthResultVerdict = Components.Schemas.AuthResultVerdict;
|
|
@@ -6158,6 +6418,6 @@ export type String64 = Components.Schemas.String64;
|
|
|
6158
6418
|
export type String800 = Components.Schemas.String800;
|
|
6159
6419
|
export type String32 = Components.Schemas.String32;
|
|
6160
6420
|
export type String256 = Components.Schemas.String256;
|
|
6161
|
-
export type SemanticVersion = Components.Schemas.SemanticVersion;
|
|
6162
6421
|
export type String2048 = Components.Schemas.String2048;
|
|
6422
|
+
export type SemanticVersion = Components.Schemas.SemanticVersion;
|
|
6163
6423
|
export type String200 = Components.Schemas.String200;
|