@remit/api-openapi-types 0.0.109 → 0.0.110

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 +98 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.109",
3
+ "version": "0.0.110",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -327,7 +327,11 @@ explained to the user as a failed delete.
327
327
  /**
328
328
  * The stable name of one check the spam service ran and found something with (RFC 041). A client holds one sentence per name.
329
329
  */
330
- export type SpamReasonName = "DmarcFail" | "SignerMismatch" | "ReplyToMismatch" | "LinkTextMismatch" | "LinkDomainDistant" | "PunycodeDomain" | "MixedScriptDomain" | "ConfusableDomains" | "SingleOffDomainLink" | "GeneratedName" | "FirstContactDomain" | "RecentlyRegisteredDomain" | "UnknownRegistrationDate" | "ClassifierSpam" | "ClassifierPhishing" | "ProviderSpam" | "DisplayNameForeignAddress" | "DisplayNameLookalike" | "ListedPhishingLink" | "BackendSymbol";
330
+ export type SpamReasonName = "DmarcFail" | "SignerMismatch" | "ReplyToMismatch" | "LinkTextMismatch" | "LinkDomainDistant" | "PunycodeDomain" | "MixedScriptDomain" | "ConfusableDomains" | "SingleOffDomainLink" | "GeneratedName" | "FirstContactDomain" | "RecentlyRegisteredDomain" | "UnknownRegistrationDate" | "ClassifierSpam" | "ClassifierPhishing" | "ProviderSpam" | "DisplayNameForeignAddress" | "DisplayNameLookalike" | "ModelImpersonation" | "ModelSpam" | "ModelClean" | "ListedPhishingLink" | "BackendSymbol";
331
+ /**
332
+ * What happened to the model call for one checked message (RFC 041 stage 3).
333
+ */
334
+ export type SpamModelOutcome = "Answered" | "NotConfigured" | "DailyLimit" | "RateLimited" | "OutOfBand";
331
335
  /**
332
336
  * Why a spam service gave no verdict (RFC 041).
333
337
  */
@@ -388,6 +392,10 @@ distinguishable from a network failure without parsing prose.
388
392
  * Message reference types per RFC 2822 Section 3.6.4
389
393
  */
390
394
  export type ReferenceType = "in_reply_to" | "references";
395
+ /**
396
+ * Why a rescan left one message unchecked (RFC 041). A caller retries only the retryable codes.
397
+ */
398
+ export type RescanFailureCode = "RateLimited" | "DailyCap" | "NotSettled" | "NotFound" | "NotPermitted";
391
399
  /**
392
400
  * Manual bulk label action (issue #26) — apply or remove a label on a `just these` selection. Never sets `appliedByFilterId`: that field is reserved for filter-driven applies (RFC 034 Decision 3.3).
393
401
  */
@@ -4983,9 +4991,9 @@ every reader of either would otherwise narrow on the kind first.
4983
4991
  kind: SpamKind;
4984
4992
  reasons: SpamReason[];
4985
4993
  /**
4986
- * The service called a model, so Remit counts the call against the daily cap.
4994
+ * What happened to the model call: `Answered`, or why no answer shaped the verdict.
4987
4995
  */
4988
- modelCalled: boolean;
4996
+ modelOutcome: SpamModelOutcome;
4989
4997
  }
4990
4998
  /**
4991
4999
  * One check that found something, shaped like an rspamd symbol.
@@ -6573,6 +6581,48 @@ either way and cannot tell which it received.
6573
6581
  */
6574
6582
  starColor?: StarColor;
6575
6583
  }
6584
+ /**
6585
+ * Messages to check again for spam and category (RFC 041).
6586
+ */
6587
+ export interface RescanInput {
6588
+ /**
6589
+ * The messages to check, all in the account the path names. At most 10 per call; a backfill sends ten per call.
6590
+ */
6591
+ messageIds: UUID[];
6592
+ /**
6593
+ * Also apply placement, moving a message the verdict sends to Junk. Without it a rescan writes verdicts, scores and labels only.
6594
+ */
6595
+ move?: boolean;
6596
+ }
6597
+ /**
6598
+ * The outcome per message, as SQS `SendMessageBatch` answers. The call succeeds when some messages fail.
6599
+ */
6600
+ export interface RescanResult {
6601
+ successful: RescanSuccess[];
6602
+ failed: RescanFailure[];
6603
+ }
6604
+ /**
6605
+ * One message the rescan checked.
6606
+ */
6607
+ export interface RescanSuccess {
6608
+ messageId: UUID;
6609
+ verdict: SpamVerdictNotChecked | SpamVerdictScreenedOut | SpamChecked | SpamFailed;
6610
+ /**
6611
+ * Names of the labels the rescan applied to the message.
6612
+ */
6613
+ labels: string[];
6614
+ }
6615
+ /**
6616
+ * One message the rescan left unchecked.
6617
+ */
6618
+ export interface RescanFailure {
6619
+ messageId: UUID;
6620
+ code: RescanFailureCode;
6621
+ /**
6622
+ * Whether the same id may succeed on a later call: true for `RateLimited` and `DailyCap`.
6623
+ */
6624
+ retryable: boolean;
6625
+ }
6576
6626
  /**
6577
6627
  * Input for bulk flag update operations
6578
6628
  */
@@ -8882,6 +8932,19 @@ declare namespace Paths {
8882
8932
  export type $401 = Components.Schemas.ApiError;
8883
8933
  }
8884
8934
  }
8935
+ namespace RescanMessages {
8936
+ export interface PathParameters {
8937
+ accountId: Components.Schemas.UUID;
8938
+ }
8939
+ export type RequestBody = Components.Schemas.RescanInput;
8940
+ namespace Responses {
8941
+ export type $200 = Components.Schemas.RescanResult;
8942
+ export type $400 = Components.Schemas.ValidationError;
8943
+ export type $404 = Components.Schemas.ApiError;
8944
+ export type $403 = Components.Schemas.ApiError;
8945
+ export type $401 = Components.Schemas.ApiError;
8946
+ }
8947
+ }
8885
8948
  namespace UpdateFlags {
8886
8949
  export type RequestBody = Components.Schemas.BulkUpdateFlagsInput;
8887
8950
  namespace Responses {
@@ -9796,6 +9859,14 @@ Counting: `count=true` answers how many CONVERSATIONS match, over the whole scop
9796
9859
  data?: Paths.UpdateMessageFlags.RequestBody,
9797
9860
  config?: AxiosRequestConfig
9798
9861
  ): OperationResponse<Paths.UpdateMessageFlags.Responses.$200>;
9862
+ /**
9863
+ * AccountMessageOperations_rescanMessages - Check up to 10 messages again with the category classifier and the spam service (RFC 041), and answer once they are done. Sets a category only on mail that is still uncategorized, and never labels a message the owner marked Not spam. Writes verdicts and labels; with `move` it also applies placement. The call succeeds when some messages fail: each lands in `successful` or `failed`.
9864
+ */
9865
+ 'AccountMessageOperations_rescanMessages'(
9866
+ parameters?: Parameters<Paths.RescanMessages.PathParameters> | null,
9867
+ data?: Paths.RescanMessages.RequestBody,
9868
+ config?: AxiosRequestConfig
9869
+ ): OperationResponse<Paths.RescanMessages.Responses.$200>;
9799
9870
  /**
9800
9871
  * MessageBulkOperations_updateFlags - Update flags on multiple messages
9801
9872
  */
@@ -10833,6 +10904,16 @@ Counting: `count=true` answers how many CONVERSATIONS match, over the whole scop
10833
10904
  config?: AxiosRequestConfig
10834
10905
  ): OperationResponse<Paths.UpdateMessageFlags.Responses.$200>;
10835
10906
  };
10907
+ ['/accounts/{accountId}/messages/rescan']: {
10908
+ /**
10909
+ * AccountMessageOperations_rescanMessages - Check up to 10 messages again with the category classifier and the spam service (RFC 041), and answer once they are done. Sets a category only on mail that is still uncategorized, and never labels a message the owner marked Not spam. Writes verdicts and labels; with `move` it also applies placement. The call succeeds when some messages fail: each lands in `successful` or `failed`.
10910
+ */
10911
+ 'post'(
10912
+ parameters?: Parameters<Paths.RescanMessages.PathParameters> | null,
10913
+ data?: Paths.RescanMessages.RequestBody,
10914
+ config?: AxiosRequestConfig
10915
+ ): OperationResponse<Paths.RescanMessages.Responses.$200>;
10916
+ };
10836
10917
  ['/messages/flags']: {
10837
10918
  /**
10838
10919
  * MessageBulkOperations_updateFlags - Update flags on multiple messages
@@ -11688,6 +11769,14 @@ export interface Operations {
11688
11769
  requestBody: Components.Schemas.UpdateFlagsInput;
11689
11770
  responses: { 200: { messageId: Components.Schemas.UUID; isRead: boolean; isStarred: boolean }; 404: Components.Schemas.ApiError; 403: Components.Schemas.ApiError; 401: Components.Schemas.ApiError };
11690
11771
  };
11772
+ 'AccountMessageOperations_rescanMessages': {
11773
+ params: { accountId: Components.Schemas.UUID };
11774
+ query: {};
11775
+ headers: {};
11776
+ cookies: {};
11777
+ requestBody: Components.Schemas.RescanInput;
11778
+ responses: { 200: Components.Schemas.RescanResult; 400: Components.Schemas.ValidationError; 404: Components.Schemas.ApiError; 403: Components.Schemas.ApiError; 401: Components.Schemas.ApiError };
11779
+ };
11691
11780
  'MessageBulkOperations_updateFlags': {
11692
11781
  params: {};
11693
11782
  query: {};
@@ -12003,6 +12092,10 @@ export type MessageReference = Components.Schemas.MessageReference;
12003
12092
  export type MessageReferenceResponse = Components.Schemas.MessageReferenceResponse;
12004
12093
  export type RawMessageResponse = Components.Schemas.RawMessageResponse;
12005
12094
  export type UpdateFlagsInput = Components.Schemas.UpdateFlagsInput;
12095
+ export type RescanInput = Components.Schemas.RescanInput;
12096
+ export type RescanResult = Components.Schemas.RescanResult;
12097
+ export type RescanSuccess = Components.Schemas.RescanSuccess;
12098
+ export type RescanFailure = Components.Schemas.RescanFailure;
12006
12099
  export type BulkUpdateFlagsInput = Components.Schemas.BulkUpdateFlagsInput;
12007
12100
  export type MessageBulkOperationResult = Components.Schemas.MessageBulkOperationResult;
12008
12101
  export type DeleteMessagesInput = Components.Schemas.DeleteMessagesInput;
@@ -12130,6 +12223,7 @@ export type SpamSenderScreenRule = Components.Schemas.SpamSenderScreenRule;
12130
12223
  export type SpamAction = Components.Schemas.SpamAction;
12131
12224
  export type SpamKind = Components.Schemas.SpamKind;
12132
12225
  export type SpamReasonName = Components.Schemas.SpamReasonName;
12226
+ export type SpamModelOutcome = Components.Schemas.SpamModelOutcome;
12133
12227
  export type SpamFailureKind = Components.Schemas.SpamFailureKind;
12134
12228
  export type OutboxAttachmentState = Components.Schemas.OutboxAttachmentState;
12135
12229
  export type OutboxAttachmentRejectionReason = Components.Schemas.OutboxAttachmentRejectionReason;
@@ -12143,6 +12237,7 @@ export type TransferEncoding = Components.Schemas.TransferEncoding;
12143
12237
  export type ContentDisposition = Components.Schemas.ContentDisposition;
12144
12238
  export type MultipartSubtype = Components.Schemas.MultipartSubtype;
12145
12239
  export type ReferenceType = Components.Schemas.ReferenceType;
12240
+ export type RescanFailureCode = Components.Schemas.RescanFailureCode;
12146
12241
  export type LabelAction = Components.Schemas.LabelAction;
12147
12242
  export type CalendarSuggestionState = Components.Schemas.CalendarSuggestionState;
12148
12243
  export type CalendarSuggestionSource = Components.Schemas.CalendarSuggestionSource;