@remit/api-openapi-types 0.0.26 → 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 +254 -2
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
|
*/
|
|
@@ -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
|
/**
|
|
@@ -2795,11 +2811,100 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
2795
2811
|
sentAt?: number;
|
|
2796
2812
|
createdAt: number;
|
|
2797
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;
|
|
2798
2899
|
}
|
|
2799
2900
|
/**
|
|
2800
2901
|
* Input for updating a draft outbox message
|
|
2801
2902
|
*/
|
|
2802
2903
|
export interface UpdateOutboxMessageInput {
|
|
2904
|
+
/**
|
|
2905
|
+
* The files this draft keeps. Anything left out is removed with its bytes.
|
|
2906
|
+
*/
|
|
2907
|
+
attachmentIds?: UUID[];
|
|
2803
2908
|
/**
|
|
2804
2909
|
* Recipient addresses (To)
|
|
2805
2910
|
*/
|
|
@@ -2833,6 +2938,89 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
2833
2938
|
*/
|
|
2834
2939
|
references?: string[];
|
|
2835
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
|
+
}
|
|
2836
3024
|
/**
|
|
2837
3025
|
* Normalized email address per RFC 2822 Section 3.4.1. Addresses are deduplicated across messages within an account config.
|
|
2838
3026
|
*/
|
|
@@ -4798,6 +4986,26 @@ declare namespace Paths {
|
|
|
4798
4986
|
export type $200 = void;
|
|
4799
4987
|
}
|
|
4800
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
|
+
}
|
|
4801
5009
|
namespace SearchAddresses {
|
|
4802
5010
|
export interface QueryParameters {
|
|
4803
5011
|
q: string;
|
|
@@ -5286,6 +5494,22 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
|
|
|
5286
5494
|
data?: any,
|
|
5287
5495
|
config?: AxiosRequestConfig
|
|
5288
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>;
|
|
5289
5513
|
/**
|
|
5290
5514
|
* searchAddresses - Search addresses for autocomplete
|
|
5291
5515
|
*/
|
|
@@ -5851,6 +6075,26 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
|
|
|
5851
6075
|
config?: AxiosRequestConfig
|
|
5852
6076
|
): OperationResponse<Paths.SendOutboxMessage.Responses.$200>;
|
|
5853
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
|
+
};
|
|
5854
6098
|
['/addresses/search']: {
|
|
5855
6099
|
/**
|
|
5856
6100
|
* searchAddresses - Search addresses for autocomplete
|
|
@@ -6047,7 +6291,13 @@ export type SemanticSearchResult = Components.Schemas.SemanticSearchResult;
|
|
|
6047
6291
|
export type CreateOutboxMessageInput = Components.Schemas.CreateOutboxMessageInput;
|
|
6048
6292
|
export type OutboxMessage = Components.Schemas.OutboxMessage;
|
|
6049
6293
|
export type OutboxMessageResponse = Components.Schemas.OutboxMessageResponse;
|
|
6294
|
+
export type OutboxAttachment = Components.Schemas.OutboxAttachment;
|
|
6295
|
+
export type OutboxAttachmentResponse = Components.Schemas.OutboxAttachmentResponse;
|
|
6050
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;
|
|
6051
6301
|
export type Address = Components.Schemas.Address;
|
|
6052
6302
|
export type AddressFlags = Components.Schemas.AddressFlags;
|
|
6053
6303
|
export type TrustedFlag = Components.Schemas.TrustedFlag;
|
|
@@ -6139,6 +6389,8 @@ export type DisplayNameCorrespondence = Components.Schemas.DisplayNameCorrespond
|
|
|
6139
6389
|
export type PlacementAction = Components.Schemas.PlacementAction;
|
|
6140
6390
|
export type SemanticSearchChunkType = Components.Schemas.SemanticSearchChunkType;
|
|
6141
6391
|
export type OutboxMessageStatus = Components.Schemas.OutboxMessageStatus;
|
|
6392
|
+
export type OutboxAttachmentState = Components.Schemas.OutboxAttachmentState;
|
|
6393
|
+
export type OutboxAttachmentRejectionReason = Components.Schemas.OutboxAttachmentRejectionReason;
|
|
6142
6394
|
export type MessageStatus = Components.Schemas.MessageStatus;
|
|
6143
6395
|
export type MessageSyncStatus = Components.Schemas.MessageSyncStatus;
|
|
6144
6396
|
export type AuthResultVerdict = Components.Schemas.AuthResultVerdict;
|
|
@@ -6166,6 +6418,6 @@ export type String64 = Components.Schemas.String64;
|
|
|
6166
6418
|
export type String800 = Components.Schemas.String800;
|
|
6167
6419
|
export type String32 = Components.Schemas.String32;
|
|
6168
6420
|
export type String256 = Components.Schemas.String256;
|
|
6169
|
-
export type SemanticVersion = Components.Schemas.SemanticVersion;
|
|
6170
6421
|
export type String2048 = Components.Schemas.String2048;
|
|
6422
|
+
export type SemanticVersion = Components.Schemas.SemanticVersion;
|
|
6171
6423
|
export type String200 = Components.Schemas.String200;
|