@remit/api-openapi-types 0.0.24 → 0.0.25
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 +102 -0
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -2455,6 +2455,10 @@ standing to persist.
|
|
|
2455
2455
|
* Labels applied to this message — filter-, organize-, and manually-applied alike (issue #26). Absent/empty means no label is applied.
|
|
2456
2456
|
*/
|
|
2457
2457
|
labels?: LabelSummaryResponse[];
|
|
2458
|
+
/**
|
|
2459
|
+
* 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.
|
|
2460
|
+
*/
|
|
2461
|
+
spamReport?: MessageSpamReport;
|
|
2458
2462
|
}
|
|
2459
2463
|
/**
|
|
2460
2464
|
* 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 +2518,15 @@ standing to persist.
|
|
|
2514
2518
|
name: String140;
|
|
2515
2519
|
color: LabelColor;
|
|
2516
2520
|
}
|
|
2521
|
+
/**
|
|
2522
|
+
* 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.
|
|
2523
|
+
*/
|
|
2524
|
+
export interface MessageSpamReport {
|
|
2525
|
+
/**
|
|
2526
|
+
* Timestamp (epoch millis) the report was made.
|
|
2527
|
+
*/
|
|
2528
|
+
reportedAt: number;
|
|
2529
|
+
}
|
|
2517
2530
|
/**
|
|
2518
2531
|
* Aggregate response for `searchThreads`. Carries the matching rows (`items`), a
|
|
2519
2532
|
pagination `continuationToken`, and an optional `count` of every message the
|
|
@@ -3240,6 +3253,10 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
3240
3253
|
* 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
3254
|
*/
|
|
3242
3255
|
placementDecidedAt?: number;
|
|
3256
|
+
/**
|
|
3257
|
+
* 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.
|
|
3258
|
+
*/
|
|
3259
|
+
spamReport?: MessageSpamReport;
|
|
3243
3260
|
createdAt: number;
|
|
3244
3261
|
updatedAt: number;
|
|
3245
3262
|
}
|
|
@@ -3367,6 +3384,10 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
3367
3384
|
* Labels applied to this message — filter-, organize-, and manually-applied alike (issue #26). Absent/empty means no label is applied.
|
|
3368
3385
|
*/
|
|
3369
3386
|
labels?: LabelSummaryResponse[];
|
|
3387
|
+
/**
|
|
3388
|
+
* Present when the user reported this message as spam and the report has not been undone. Backs the "Reported as spam · Undo" affordance.
|
|
3389
|
+
*/
|
|
3390
|
+
spamReport?: MessageSpamReport;
|
|
3370
3391
|
}
|
|
3371
3392
|
/**
|
|
3372
3393
|
* Message envelope (header metadata)
|
|
@@ -3739,6 +3760,36 @@ present only when `count=true`. Thread-specific so the shared `ResultList<T>`
|
|
|
3739
3760
|
*/
|
|
3740
3761
|
action: LabelAction;
|
|
3741
3762
|
}
|
|
3763
|
+
/**
|
|
3764
|
+
* 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.
|
|
3765
|
+
*/
|
|
3766
|
+
export interface SpamReportBulkResult {
|
|
3767
|
+
/**
|
|
3768
|
+
* Number of items accepted for processing
|
|
3769
|
+
*/
|
|
3770
|
+
successCount: number;
|
|
3771
|
+
/**
|
|
3772
|
+
* Number of items rejected before processing
|
|
3773
|
+
*/
|
|
3774
|
+
failureCount: number;
|
|
3775
|
+
/**
|
|
3776
|
+
* One entry per message that failed, naming why. Absent or empty when every message succeeded.
|
|
3777
|
+
*/
|
|
3778
|
+
failures?: SpamReportFailure[];
|
|
3779
|
+
}
|
|
3780
|
+
/**
|
|
3781
|
+
* One message's failure reason within a report-spam or not-spam bulk call.
|
|
3782
|
+
*/
|
|
3783
|
+
export interface SpamReportFailure {
|
|
3784
|
+
/**
|
|
3785
|
+
* The message that failed
|
|
3786
|
+
*/
|
|
3787
|
+
messageId: UUID;
|
|
3788
|
+
/**
|
|
3789
|
+
* 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.
|
|
3790
|
+
*/
|
|
3791
|
+
reason: string;
|
|
3792
|
+
}
|
|
3742
3793
|
/**
|
|
3743
3794
|
* Junction table linking envelope addresses to normalized addresses. Stores per-message display name since it may vary.
|
|
3744
3795
|
*/
|
|
@@ -4812,6 +4863,18 @@ declare namespace Paths {
|
|
|
4812
4863
|
export type $200 = void;
|
|
4813
4864
|
}
|
|
4814
4865
|
}
|
|
4866
|
+
namespace ReportSpam {
|
|
4867
|
+
export type RequestBody = Components.Schemas.BulkMessageInput;
|
|
4868
|
+
namespace Responses {
|
|
4869
|
+
export type $200 = void;
|
|
4870
|
+
}
|
|
4871
|
+
}
|
|
4872
|
+
namespace NotSpam {
|
|
4873
|
+
export type RequestBody = Components.Schemas.BulkMessageInput;
|
|
4874
|
+
namespace Responses {
|
|
4875
|
+
export type $200 = void;
|
|
4876
|
+
}
|
|
4877
|
+
}
|
|
4815
4878
|
}
|
|
4816
4879
|
|
|
4817
4880
|
export interface OperationMethods {
|
|
@@ -5295,6 +5358,22 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
|
|
|
5295
5358
|
data?: Paths.UpdateMessageLabels.RequestBody,
|
|
5296
5359
|
config?: AxiosRequestConfig
|
|
5297
5360
|
): OperationResponse<Paths.UpdateMessageLabels.Responses.$200>;
|
|
5361
|
+
/**
|
|
5362
|
+
* 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.
|
|
5363
|
+
*/
|
|
5364
|
+
'reportSpam'(
|
|
5365
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5366
|
+
data?: Paths.ReportSpam.RequestBody,
|
|
5367
|
+
config?: AxiosRequestConfig
|
|
5368
|
+
): OperationResponse<Paths.ReportSpam.Responses.$200>;
|
|
5369
|
+
/**
|
|
5370
|
+
* 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.
|
|
5371
|
+
*/
|
|
5372
|
+
'notSpam'(
|
|
5373
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5374
|
+
data?: Paths.NotSpam.RequestBody,
|
|
5375
|
+
config?: AxiosRequestConfig
|
|
5376
|
+
): OperationResponse<Paths.NotSpam.Responses.$200>;
|
|
5298
5377
|
}
|
|
5299
5378
|
|
|
5300
5379
|
export interface PathsDictionary {
|
|
@@ -5864,6 +5943,26 @@ Callers that omit `query` are unaffected: the INBOX (and starred) listings behav
|
|
|
5864
5943
|
config?: AxiosRequestConfig
|
|
5865
5944
|
): OperationResponse<Paths.UpdateMessageLabels.Responses.$200>;
|
|
5866
5945
|
};
|
|
5946
|
+
['/messages/report-spam']: {
|
|
5947
|
+
/**
|
|
5948
|
+
* 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.
|
|
5949
|
+
*/
|
|
5950
|
+
'post'(
|
|
5951
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5952
|
+
data?: Paths.ReportSpam.RequestBody,
|
|
5953
|
+
config?: AxiosRequestConfig
|
|
5954
|
+
): OperationResponse<Paths.ReportSpam.Responses.$200>;
|
|
5955
|
+
};
|
|
5956
|
+
['/messages/not-spam']: {
|
|
5957
|
+
/**
|
|
5958
|
+
* 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.
|
|
5959
|
+
*/
|
|
5960
|
+
'post'(
|
|
5961
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
5962
|
+
data?: Paths.NotSpam.RequestBody,
|
|
5963
|
+
config?: AxiosRequestConfig
|
|
5964
|
+
): OperationResponse<Paths.NotSpam.Responses.$200>;
|
|
5965
|
+
};
|
|
5867
5966
|
}
|
|
5868
5967
|
|
|
5869
5968
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>;
|
|
@@ -5934,6 +6033,7 @@ export type ThreadMessageResponse = Components.Schemas.ThreadMessageResponse;
|
|
|
5934
6033
|
export type MessageAuthenticity = Components.Schemas.MessageAuthenticity;
|
|
5935
6034
|
export type AutoMovedInfo = Components.Schemas.AutoMovedInfo;
|
|
5936
6035
|
export type LabelSummaryResponse = Components.Schemas.LabelSummaryResponse;
|
|
6036
|
+
export type MessageSpamReport = Components.Schemas.MessageSpamReport;
|
|
5937
6037
|
export type ThreadSearchResponse = Components.Schemas.ThreadSearchResponse;
|
|
5938
6038
|
export type SemanticSearchResult = Components.Schemas.SemanticSearchResult;
|
|
5939
6039
|
export type CreateOutboxMessageInput = Components.Schemas.CreateOutboxMessageInput;
|
|
@@ -5974,6 +6074,8 @@ export type BulkMessageInput = Components.Schemas.BulkMessageInput;
|
|
|
5974
6074
|
export type MoveMessagesInput = Components.Schemas.MoveMessagesInput;
|
|
5975
6075
|
export type CopyMessagesInput = Components.Schemas.CopyMessagesInput;
|
|
5976
6076
|
export type UpdateMessageLabelsInput = Components.Schemas.UpdateMessageLabelsInput;
|
|
6077
|
+
export type SpamReportBulkResult = Components.Schemas.SpamReportBulkResult;
|
|
6078
|
+
export type SpamReportFailure = Components.Schemas.SpamReportFailure;
|
|
5977
6079
|
export type EnvelopeAddress = Components.Schemas.EnvelopeAddress;
|
|
5978
6080
|
export type AccountSettingValue = Components.Schemas.AccountSettingValue;
|
|
5979
6081
|
export type BooleanSetting = Components.Schemas.BooleanSetting;
|