@remit/api-openapi-types 0.0.108 → 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 +104 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.108",
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" | "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
  */
@@ -7276,13 +7326,17 @@ of copying it, and so a person can see what was imported after the fact.
7276
7326
  */
7277
7327
  rcpt: string[];
7278
7328
  /**
7279
- * The connecting IP from the receiving server's Received header, or empty.
7329
+ * The sending server's IP: the hop the provider's SPF check judged, else the first hop from a public address, or empty.
7280
7330
  */
7281
7331
  ip: string;
7282
7332
  /**
7283
- * The HELO name from the receiving server's Received header, or empty.
7333
+ * The HELO name the sending server gave, or empty.
7284
7334
  */
7285
7335
  helo: string;
7336
+ /**
7337
+ * The sending server's reverse DNS name as the receiving server recorded it, or empty.
7338
+ */
7339
+ hostname: string;
7286
7340
  }
7287
7341
  /**
7288
7342
  * The provider's authentication results, read from its Authentication-Results.
@@ -8878,6 +8932,19 @@ declare namespace Paths {
8878
8932
  export type $401 = Components.Schemas.ApiError;
8879
8933
  }
8880
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
+ }
8881
8948
  namespace UpdateFlags {
8882
8949
  export type RequestBody = Components.Schemas.BulkUpdateFlagsInput;
8883
8950
  namespace Responses {
@@ -9792,6 +9859,14 @@ Counting: `count=true` answers how many CONVERSATIONS match, over the whole scop
9792
9859
  data?: Paths.UpdateMessageFlags.RequestBody,
9793
9860
  config?: AxiosRequestConfig
9794
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>;
9795
9870
  /**
9796
9871
  * MessageBulkOperations_updateFlags - Update flags on multiple messages
9797
9872
  */
@@ -10829,6 +10904,16 @@ Counting: `count=true` answers how many CONVERSATIONS match, over the whole scop
10829
10904
  config?: AxiosRequestConfig
10830
10905
  ): OperationResponse<Paths.UpdateMessageFlags.Responses.$200>;
10831
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
+ };
10832
10917
  ['/messages/flags']: {
10833
10918
  /**
10834
10919
  * MessageBulkOperations_updateFlags - Update flags on multiple messages
@@ -11684,6 +11769,14 @@ export interface Operations {
11684
11769
  requestBody: Components.Schemas.UpdateFlagsInput;
11685
11770
  responses: { 200: { messageId: Components.Schemas.UUID; isRead: boolean; isStarred: boolean }; 404: Components.Schemas.ApiError; 403: Components.Schemas.ApiError; 401: Components.Schemas.ApiError };
11686
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
+ };
11687
11780
  'MessageBulkOperations_updateFlags': {
11688
11781
  params: {};
11689
11782
  query: {};
@@ -11999,6 +12092,10 @@ export type MessageReference = Components.Schemas.MessageReference;
11999
12092
  export type MessageReferenceResponse = Components.Schemas.MessageReferenceResponse;
12000
12093
  export type RawMessageResponse = Components.Schemas.RawMessageResponse;
12001
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;
12002
12099
  export type BulkUpdateFlagsInput = Components.Schemas.BulkUpdateFlagsInput;
12003
12100
  export type MessageBulkOperationResult = Components.Schemas.MessageBulkOperationResult;
12004
12101
  export type DeleteMessagesInput = Components.Schemas.DeleteMessagesInput;
@@ -12126,6 +12223,7 @@ export type SpamSenderScreenRule = Components.Schemas.SpamSenderScreenRule;
12126
12223
  export type SpamAction = Components.Schemas.SpamAction;
12127
12224
  export type SpamKind = Components.Schemas.SpamKind;
12128
12225
  export type SpamReasonName = Components.Schemas.SpamReasonName;
12226
+ export type SpamModelOutcome = Components.Schemas.SpamModelOutcome;
12129
12227
  export type SpamFailureKind = Components.Schemas.SpamFailureKind;
12130
12228
  export type OutboxAttachmentState = Components.Schemas.OutboxAttachmentState;
12131
12229
  export type OutboxAttachmentRejectionReason = Components.Schemas.OutboxAttachmentRejectionReason;
@@ -12139,6 +12237,7 @@ export type TransferEncoding = Components.Schemas.TransferEncoding;
12139
12237
  export type ContentDisposition = Components.Schemas.ContentDisposition;
12140
12238
  export type MultipartSubtype = Components.Schemas.MultipartSubtype;
12141
12239
  export type ReferenceType = Components.Schemas.ReferenceType;
12240
+ export type RescanFailureCode = Components.Schemas.RescanFailureCode;
12142
12241
  export type LabelAction = Components.Schemas.LabelAction;
12143
12242
  export type CalendarSuggestionState = Components.Schemas.CalendarSuggestionState;
12144
12243
  export type CalendarSuggestionSource = Components.Schemas.CalendarSuggestionSource;