@remit/api-openapi-types 0.0.24 → 0.0.26
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 +111 -1
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -224,7 +224,7 @@ current enum emitter anyway, so the wire contract uses the bare form.
|
|
|
224
224
|
/**
|
|
225
225
|
* 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
226
|
*/
|
|
227
|
-
export type AccountSettingName = "Theme" | "Density" | "DefaultComposerFormat" | "PinnedFolders" | "AccountSignaturePlainText" | "AccountSignatureHtml" | "AccountDisplayName" | "AccountMuted" | "MailboxDisplayName" | "MailboxMuted" | "FolderRoleAppointment" | "MailboxRole";
|
|
227
|
+
export type AccountSettingName = "Theme" | "Density" | "DefaultComposerFormat" | "PinnedFolders" | "AccountSignaturePlainText" | "AccountSignatureHtml" | "AccountDisplayName" | "AccountMuted" | "AccountComposeLanguages" | "MailboxDisplayName" | "MailboxMuted" | "FolderRoleAppointment" | "MailboxRole";
|
|
228
228
|
/**
|
|
229
229
|
* 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
230
|
*/
|
|
@@ -1048,6 +1048,10 @@ never from a raw content-type line — parameters carry `name=` and
|
|
|
1048
1048
|
* HTML email signature for this account
|
|
1049
1049
|
*/
|
|
1050
1050
|
signatureHtml?: string;
|
|
1051
|
+
/**
|
|
1052
|
+
* 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).
|
|
1053
|
+
*/
|
|
1054
|
+
composeLanguages?: string[];
|
|
1051
1055
|
/**
|
|
1052
1056
|
* 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
1057
|
*/
|
|
@@ -2244,6 +2248,10 @@ standing to persist.
|
|
|
2244
2248
|
* HTML email signature
|
|
2245
2249
|
*/
|
|
2246
2250
|
signatureHtml?: string;
|
|
2251
|
+
/**
|
|
2252
|
+
* BCP 47 language tags this account writes mail in, most-used first (issue #686). Replaces the stored list outright; an empty array clears it.
|
|
2253
|
+
*/
|
|
2254
|
+
composeLanguages?: string[];
|
|
2247
2255
|
/**
|
|
2248
2256
|
* Account-level mute flag. Pass a MutedFlag object to mute; pass `null` to clear the mute.
|
|
2249
2257
|
*/
|
|
@@ -2455,6 +2463,10 @@ standing to persist.
|
|
|
2455
2463
|
* Labels applied to this message — filter-, organize-, and manually-applied alike (issue #26). Absent/empty means no label is applied.
|
|
2456
2464
|
*/
|
|
2457
2465
|
labels?: LabelSummaryResponse[];
|
|
2466
|
+
/**
|
|
2467
|
+
* 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.
|
|
2468
|
+
*/
|
|
2469
|
+
spamReport?: MessageSpamReport;
|
|
2458
2470
|
}
|
|
2459
2471
|
/**
|
|
2460
2472
|
* 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.
|
|
@@ -2514,6 +2526,15 @@ standing to persist.
|
|
|
2514
2526
|
name: String140;
|
|
2515
2527
|
color: LabelColor;
|
|
2516
2528
|
}
|
|
2529
|
+
/**
|
|
2530
|
+
* 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.
|
|
2531
|
+
*/
|
|
2532
|
+
export interface MessageSpamReport {
|
|
2533
|
+
/**
|
|
2534
|
+
* Timestamp (epoch millis) the report was made.
|
|
2535
|
+
*/
|
|
2536
|
+
reportedAt: number;
|
|
2537
|
+
}
|
|
2517
2538
|
/**
|
|
2518
2539
|
* Aggregate response for `searchThreads`. Carries the matching rows (`items`), a
|
|
2519
2540
|
pagination `continuationToken`, and an optional `count` of every message the
|
|
@@ -3240,6 +3261,10 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
3240
3261
|
* Body-sync timestamp (epoch millis) the classifier's placement verdict was first decided, whether the verdict was to move the message or to leave it in place. Absent means placement has never been evaluated for this message. Guards `computePlacement` against a re-entrant body-sync pass (`fetchAndGetBody`'s `NoSuchKey` fallback, `syncBodies(..., force: true)`) re-deciding — and possibly reversing — a placement a user has since overridden by hand. `movedByRemit` remains the guard for a message that was placement-decided before this field existed.
|
|
3241
3262
|
*/
|
|
3242
3263
|
placementDecidedAt?: number;
|
|
3264
|
+
/**
|
|
3265
|
+
* Recorded when the user reported this message as spam. Absent means never reported, or reported and then undone (`POST /messages/not-spam` clears it). Independent of the message's current folder — deliberately not derived from "sits in Junk", which is also true of a message Remit moved on its own.
|
|
3266
|
+
*/
|
|
3267
|
+
spamReport?: MessageSpamReport;
|
|
3243
3268
|
createdAt: number;
|
|
3244
3269
|
updatedAt: number;
|
|
3245
3270
|
}
|
|
@@ -3367,6 +3392,10 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
3367
3392
|
* Labels applied to this message — filter-, organize-, and manually-applied alike (issue #26). Absent/empty means no label is applied.
|
|
3368
3393
|
*/
|
|
3369
3394
|
labels?: LabelSummaryResponse[];
|
|
3395
|
+
/**
|
|
3396
|
+
* Present when the user reported this message as spam and the report has not been undone. Backs the "Reported as spam · Undo" affordance.
|
|
3397
|
+
*/
|
|
3398
|
+
spamReport?: MessageSpamReport;
|
|
3370
3399
|
}
|
|
3371
3400
|
/**
|
|
3372
3401
|
* Message envelope (header metadata)
|
|
@@ -3739,6 +3768,36 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
3739
3768
|
*/
|
|
3740
3769
|
action: LabelAction;
|
|
3741
3770
|
}
|
|
3771
|
+
/**
|
|
3772
|
+
* 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.
|
|
3773
|
+
*/
|
|
3774
|
+
export interface SpamReportBulkResult {
|
|
3775
|
+
/**
|
|
3776
|
+
* Number of items accepted for processing
|
|
3777
|
+
*/
|
|
3778
|
+
successCount: number;
|
|
3779
|
+
/**
|
|
3780
|
+
* Number of items rejected before processing
|
|
3781
|
+
*/
|
|
3782
|
+
failureCount: number;
|
|
3783
|
+
/**
|
|
3784
|
+
* One entry per message that failed, naming why. Absent or empty when every message succeeded.
|
|
3785
|
+
*/
|
|
3786
|
+
failures?: SpamReportFailure[];
|
|
3787
|
+
}
|
|
3788
|
+
/**
|
|
3789
|
+
* One message's failure reason within a report-spam or not-spam bulk call.
|
|
3790
|
+
*/
|
|
3791
|
+
export interface SpamReportFailure {
|
|
3792
|
+
/**
|
|
3793
|
+
* The message that failed
|
|
3794
|
+
*/
|
|
3795
|
+
messageId: UUID;
|
|
3796
|
+
/**
|
|
3797
|
+
* 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.
|
|
3798
|
+
*/
|
|
3799
|
+
reason: string;
|
|
3800
|
+
}
|
|
3742
3801
|
/**
|
|
3743
3802
|
* Junction table linking envelope addresses to normalized addresses. Stores per-message display name since it may vary.
|
|
3744
3803
|
*/
|
|
@@ -4812,6 +4871,18 @@ declare namespace Paths {
|
|
|
4812
4871
|
export type $200 = void;
|
|
4813
4872
|
}
|
|
4814
4873
|
}
|
|
4874
|
+
namespace ReportSpam {
|
|
4875
|
+
export type RequestBody = Components.Schemas.BulkMessageInput;
|
|
4876
|
+
namespace Responses {
|
|
4877
|
+
export type $200 = void;
|
|
4878
|
+
}
|
|
4879
|
+
}
|
|
4880
|
+
namespace NotSpam {
|
|
4881
|
+
export type RequestBody = Components.Schemas.BulkMessageInput;
|
|
4882
|
+
namespace Responses {
|
|
4883
|
+
export type $200 = void;
|
|
4884
|
+
}
|
|
4885
|
+
}
|
|
4815
4886
|
}
|
|
4816
4887
|
|
|
4817
4888
|
export interface OperationMethods {
|
|
@@ -5295,6 +5366,22 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
|
|
|
5295
5366
|
data?: Paths.UpdateMessageLabels.RequestBody,
|
|
5296
5367
|
config?: AxiosRequestConfig
|
|
5297
5368
|
): OperationResponse<Paths.UpdateMessageLabels.Responses.$200>;
|
|
5369
|
+
/**
|
|
5370
|
+
* reportSpam - 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.
|
|
5371
|
+
*/
|
|
5372
|
+
'reportSpam'(
|
|
5373
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5374
|
+
data?: Paths.ReportSpam.RequestBody,
|
|
5375
|
+
config?: AxiosRequestConfig
|
|
5376
|
+
): OperationResponse<Paths.ReportSpam.Responses.$200>;
|
|
5377
|
+
/**
|
|
5378
|
+
* notSpam - 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.
|
|
5379
|
+
*/
|
|
5380
|
+
'notSpam'(
|
|
5381
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5382
|
+
data?: Paths.NotSpam.RequestBody,
|
|
5383
|
+
config?: AxiosRequestConfig
|
|
5384
|
+
): OperationResponse<Paths.NotSpam.Responses.$200>;
|
|
5298
5385
|
}
|
|
5299
5386
|
|
|
5300
5387
|
export interface PathsDictionary {
|
|
@@ -5864,6 +5951,26 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
|
|
|
5864
5951
|
config?: AxiosRequestConfig
|
|
5865
5952
|
): OperationResponse<Paths.UpdateMessageLabels.Responses.$200>;
|
|
5866
5953
|
};
|
|
5954
|
+
['/messages/report-spam']: {
|
|
5955
|
+
/**
|
|
5956
|
+
* reportSpam - 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.
|
|
5957
|
+
*/
|
|
5958
|
+
'post'(
|
|
5959
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5960
|
+
data?: Paths.ReportSpam.RequestBody,
|
|
5961
|
+
config?: AxiosRequestConfig
|
|
5962
|
+
): OperationResponse<Paths.ReportSpam.Responses.$200>;
|
|
5963
|
+
};
|
|
5964
|
+
['/messages/not-spam']: {
|
|
5965
|
+
/**
|
|
5966
|
+
* notSpam - 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.
|
|
5967
|
+
*/
|
|
5968
|
+
'post'(
|
|
5969
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5970
|
+
data?: Paths.NotSpam.RequestBody,
|
|
5971
|
+
config?: AxiosRequestConfig
|
|
5972
|
+
): OperationResponse<Paths.NotSpam.Responses.$200>;
|
|
5973
|
+
};
|
|
5867
5974
|
}
|
|
5868
5975
|
|
|
5869
5976
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>;
|
|
@@ -5934,6 +6041,7 @@ export type ThreadMessageResponse = Components.Schemas.ThreadMessageResponse;
|
|
|
5934
6041
|
export type MessageAuthenticity = Components.Schemas.MessageAuthenticity;
|
|
5935
6042
|
export type AutoMovedInfo = Components.Schemas.AutoMovedInfo;
|
|
5936
6043
|
export type LabelSummaryResponse = Components.Schemas.LabelSummaryResponse;
|
|
6044
|
+
export type MessageSpamReport = Components.Schemas.MessageSpamReport;
|
|
5937
6045
|
export type ThreadSearchResponse = Components.Schemas.ThreadSearchResponse;
|
|
5938
6046
|
export type SemanticSearchResult = Components.Schemas.SemanticSearchResult;
|
|
5939
6047
|
export type CreateOutboxMessageInput = Components.Schemas.CreateOutboxMessageInput;
|
|
@@ -5974,6 +6082,8 @@ export type BulkMessageInput = Components.Schemas.BulkMessageInput;
|
|
|
5974
6082
|
export type MoveMessagesInput = Components.Schemas.MoveMessagesInput;
|
|
5975
6083
|
export type CopyMessagesInput = Components.Schemas.CopyMessagesInput;
|
|
5976
6084
|
export type UpdateMessageLabelsInput = Components.Schemas.UpdateMessageLabelsInput;
|
|
6085
|
+
export type SpamReportBulkResult = Components.Schemas.SpamReportBulkResult;
|
|
6086
|
+
export type SpamReportFailure = Components.Schemas.SpamReportFailure;
|
|
5977
6087
|
export type EnvelopeAddress = Components.Schemas.EnvelopeAddress;
|
|
5978
6088
|
export type AccountSettingValue = Components.Schemas.AccountSettingValue;
|
|
5979
6089
|
export type BooleanSetting = Components.Schemas.BooleanSetting;
|