@remit/api-openapi-types 0.0.101 → 0.0.102
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 +113 -6
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -248,7 +248,7 @@ current enum emitter anyway, so the wire contract uses the bare form.
|
|
|
248
248
|
/**
|
|
249
249
|
* A label a classification provider picks for a message: the junk verdicts, priority, and the message categories.
|
|
250
250
|
*/
|
|
251
|
-
export type ClassificationLabel = "Spam" | "Phishing" | "Priority" | "Personal" | "Newsletter" | "Marketing" | "Automated" | "Transactional" | "Social";
|
|
251
|
+
export type ClassificationLabel = "Spam" | "Phishing" | "Priority" | "Personal" | "Newsletter" | "Marketing" | "Automated" | "Transactional" | "Social" | "ColdOutreach";
|
|
252
252
|
/**
|
|
253
253
|
* Why a classification provider call gave no usable answer.
|
|
254
254
|
*/
|
|
@@ -257,6 +257,10 @@ current enum emitter anyway, so the wire contract uses the bare form.
|
|
|
257
257
|
* The classification provider form field a failure points at.
|
|
258
258
|
*/
|
|
259
259
|
export type ClassificationField = "ApiKey" | "Model" | "BaseUrl";
|
|
260
|
+
/**
|
|
261
|
+
* Header-derived message category. Set by classifyByHeaders during body-sync. Defaults to `uncategorized`, which covers both a message that has not been classified yet and one the classifier declined to categorize; `Message.classificationState` is what tells those apart.
|
|
262
|
+
*/
|
|
263
|
+
export type MessageCategory = "uncategorized" | "personal" | "newsletter" | "marketing" | "automated" | "transactional" | "social" | "coldOutreach";
|
|
260
264
|
/**
|
|
261
265
|
* Sort order for list operations
|
|
262
266
|
*/
|
|
@@ -265,10 +269,6 @@ current enum emitter anyway, so the wire contract uses the bare form.
|
|
|
265
269
|
* Gmail-style star colors for message/thread marking
|
|
266
270
|
*/
|
|
267
271
|
export type StarColor = "none" | "yellow" | "orange" | "red" | "purple" | "blue" | "teal" | "green" | "yellow_bang" | "red_bang" | "purple_question" | "blue_info" | "orange_guillemet" | "green_check" | "yellow_check" | "blue_star";
|
|
268
|
-
/**
|
|
269
|
-
* Header-derived message category. Set by classifyByHeaders during body-sync. Defaults to `uncategorized`, which covers both a message that has not been classified yet and one the classifier declined to categorize; `Message.classificationState` is what tells those apart.
|
|
270
|
-
*/
|
|
271
|
-
export type MessageCategory = "uncategorized" | "personal" | "newsletter" | "marketing" | "automated" | "transactional" | "social";
|
|
272
272
|
/**
|
|
273
273
|
* Trust level for the From address, derived at read time from AddressFlags + counters.
|
|
274
274
|
*/
|
|
@@ -3952,6 +3952,55 @@ field on this resource rather than one more operation.
|
|
|
3952
3952
|
*/
|
|
3953
3953
|
fix: string;
|
|
3954
3954
|
}
|
|
3955
|
+
/**
|
|
3956
|
+
* The classifier's distribution and corrections over mail that arrived on or after `since`, across every account the caller holds.
|
|
3957
|
+
*/
|
|
3958
|
+
export interface ClassifierStats {
|
|
3959
|
+
/**
|
|
3960
|
+
* The start of the window, as the request gave it: an ISO 8601 date-time with zone offset.
|
|
3961
|
+
*/
|
|
3962
|
+
since: string;
|
|
3963
|
+
/**
|
|
3964
|
+
* Messages that arrived on or after `since` whose body sync classified them.
|
|
3965
|
+
*/
|
|
3966
|
+
examined: number;
|
|
3967
|
+
/**
|
|
3968
|
+
* Examined messages per category; a category with none is absent.
|
|
3969
|
+
*/
|
|
3970
|
+
byCategory: ClassifierCategoryCount[];
|
|
3971
|
+
/**
|
|
3972
|
+
* Confident scores per label, over the examined messages; a label with none is absent.
|
|
3973
|
+
*/
|
|
3974
|
+
byLabel: ClassifierLabelCount[];
|
|
3975
|
+
corrections: ClassifierCorrections;
|
|
3976
|
+
}
|
|
3977
|
+
/**
|
|
3978
|
+
* Examined messages in one category.
|
|
3979
|
+
*/
|
|
3980
|
+
export interface ClassifierCategoryCount {
|
|
3981
|
+
category: MessageCategory;
|
|
3982
|
+
count: number;
|
|
3983
|
+
}
|
|
3984
|
+
/**
|
|
3985
|
+
* Confident scores for one label.
|
|
3986
|
+
*/
|
|
3987
|
+
export interface ClassifierLabelCount {
|
|
3988
|
+
label: ClassificationLabel;
|
|
3989
|
+
count: number;
|
|
3990
|
+
}
|
|
3991
|
+
/**
|
|
3992
|
+
* Times the reader disagreed with the classifier since `since`.
|
|
3993
|
+
*/
|
|
3994
|
+
export interface ClassifierCorrections {
|
|
3995
|
+
/**
|
|
3996
|
+
* Messages the reader reported as spam whose stored scores held no confident `Spam` or `Phishing` score.
|
|
3997
|
+
*/
|
|
3998
|
+
spamReportedNotJunk: number;
|
|
3999
|
+
/**
|
|
4000
|
+
* Senders whose `Address.flags.category` override was set on or after `since`.
|
|
4001
|
+
*/
|
|
4002
|
+
categoryOverridden: number;
|
|
4003
|
+
}
|
|
3955
4004
|
/**
|
|
3956
4005
|
* Tasks due in the requested window, in due order. Unpaginated: the window is the bound.
|
|
3957
4006
|
*/
|
|
@@ -5789,6 +5838,10 @@ either way and cannot tell which it received.
|
|
|
5789
5838
|
* 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.
|
|
5790
5839
|
*/
|
|
5791
5840
|
placementDecidedAt?: number;
|
|
5841
|
+
/**
|
|
5842
|
+
* Every score the classification provider gave this message at body sync. Empty when the provider was not asked or gave no answer, and for every message synced before scores were stored. Persistence-only: no response model exposes it.
|
|
5843
|
+
*/
|
|
5844
|
+
classifierScores: ClassifierScore[];
|
|
5792
5845
|
/**
|
|
5793
5846
|
* 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.
|
|
5794
5847
|
*/
|
|
@@ -5851,6 +5904,23 @@ either way and cannot tell which it received.
|
|
|
5851
5904
|
*/
|
|
5852
5905
|
decidedAt: number;
|
|
5853
5906
|
}
|
|
5907
|
+
/**
|
|
5908
|
+
* One label the classification provider scored for a message, as body sync stored it.
|
|
5909
|
+
*/
|
|
5910
|
+
export interface ClassifierScore {
|
|
5911
|
+
/**
|
|
5912
|
+
* The label the provider scored.
|
|
5913
|
+
*/
|
|
5914
|
+
label: ClassificationLabel;
|
|
5915
|
+
/**
|
|
5916
|
+
* The provider's confidence in `label`, between 0 and 1.
|
|
5917
|
+
*/
|
|
5918
|
+
confidence: number;
|
|
5919
|
+
/**
|
|
5920
|
+
* True when `confidence` reached the threshold for the provider's kind of confidence when body sync stored it: 0.7 for a calibrated provider, 0.8 for an advisory one.
|
|
5921
|
+
*/
|
|
5922
|
+
confident: boolean;
|
|
5923
|
+
}
|
|
5854
5924
|
/**
|
|
5855
5925
|
* Core message entity as the API carries it: the stored row plus the Message-ID header, which is stored on the message's thread row.
|
|
5856
5926
|
*/
|
|
@@ -5955,6 +6025,10 @@ either way and cannot tell which it received.
|
|
|
5955
6025
|
* 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.
|
|
5956
6026
|
*/
|
|
5957
6027
|
placementDecidedAt?: number;
|
|
6028
|
+
/**
|
|
6029
|
+
* Every score the classification provider gave this message at body sync. Empty when the provider was not asked or gave no answer, and for every message synced before scores were stored. Persistence-only: no response model exposes it.
|
|
6030
|
+
*/
|
|
6031
|
+
classifierScores: ClassifierScore[];
|
|
5958
6032
|
/**
|
|
5959
6033
|
* 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.
|
|
5960
6034
|
*/
|
|
@@ -8033,6 +8107,16 @@ declare namespace Paths {
|
|
|
8033
8107
|
export type $401 = void;
|
|
8034
8108
|
}
|
|
8035
8109
|
}
|
|
8110
|
+
namespace GetClassificationStats {
|
|
8111
|
+
export interface QueryParameters {
|
|
8112
|
+
since: string;
|
|
8113
|
+
}
|
|
8114
|
+
namespace Responses {
|
|
8115
|
+
export type $200 = void;
|
|
8116
|
+
export type $400 = void;
|
|
8117
|
+
export type $401 = void;
|
|
8118
|
+
}
|
|
8119
|
+
}
|
|
8036
8120
|
namespace ListCalendarTasks {
|
|
8037
8121
|
export interface QueryParameters {
|
|
8038
8122
|
from: string;
|
|
@@ -9036,6 +9120,14 @@ reader organizes the event, none otherwise.
|
|
|
9036
9120
|
data?: Paths.TestClassificationProvider.RequestBody,
|
|
9037
9121
|
config?: AxiosRequestConfig
|
|
9038
9122
|
): OperationResponse<any>;
|
|
9123
|
+
/**
|
|
9124
|
+
* getClassificationStats - Count what the classifier decided for mail that arrived on or after `since`, and how often the reader corrected it. Refused with 400 when `since` is not an ISO 8601 date-time with zone offset.
|
|
9125
|
+
*/
|
|
9126
|
+
'getClassificationStats'(
|
|
9127
|
+
parameters?: Parameters<Paths.GetClassificationStats.QueryParameters> | null,
|
|
9128
|
+
data?: any,
|
|
9129
|
+
config?: AxiosRequestConfig
|
|
9130
|
+
): OperationResponse<Paths.GetClassificationStats.Responses.$200>;
|
|
9039
9131
|
/**
|
|
9040
9132
|
* listCalendarTasks - Tasks due in a window, across every task collection the caller holds, in due order. Refused with 400 on the same window rules as the event listing.
|
|
9041
9133
|
*/
|
|
@@ -10015,6 +10107,16 @@ reader organizes the event, none otherwise.
|
|
|
10015
10107
|
config?: AxiosRequestConfig
|
|
10016
10108
|
): OperationResponse<any>;
|
|
10017
10109
|
};
|
|
10110
|
+
['/classification-stats']: {
|
|
10111
|
+
/**
|
|
10112
|
+
* getClassificationStats - Count what the classifier decided for mail that arrived on or after `since`, and how often the reader corrected it. Refused with 400 when `since` is not an ISO 8601 date-time with zone offset.
|
|
10113
|
+
*/
|
|
10114
|
+
'get'(
|
|
10115
|
+
parameters?: Parameters<Paths.GetClassificationStats.QueryParameters> | null,
|
|
10116
|
+
data?: any,
|
|
10117
|
+
config?: AxiosRequestConfig
|
|
10118
|
+
): OperationResponse<Paths.GetClassificationStats.Responses.$200>;
|
|
10119
|
+
};
|
|
10018
10120
|
['/calendar-tasks']: {
|
|
10019
10121
|
/**
|
|
10020
10122
|
* listCalendarTasks - Tasks due in a window, across every task collection the caller holds, in due order. Refused with 400 on the same window rules as the event listing.
|
|
@@ -10647,6 +10749,10 @@ export type UpdateUserSettingsInput = Components.Schemas.UpdateUserSettingsInput
|
|
|
10647
10749
|
export type ClassificationTestInput = Components.Schemas.ClassificationTestInput;
|
|
10648
10750
|
export type ClassificationTestPassed = Components.Schemas.ClassificationTestPassed;
|
|
10649
10751
|
export type ClassificationTestFailed = Components.Schemas.ClassificationTestFailed;
|
|
10752
|
+
export type ClassifierStats = Components.Schemas.ClassifierStats;
|
|
10753
|
+
export type ClassifierCategoryCount = Components.Schemas.ClassifierCategoryCount;
|
|
10754
|
+
export type ClassifierLabelCount = Components.Schemas.ClassifierLabelCount;
|
|
10755
|
+
export type ClassifierCorrections = Components.Schemas.ClassifierCorrections;
|
|
10650
10756
|
export type CalendarTaskListResponse = Components.Schemas.CalendarTaskListResponse;
|
|
10651
10757
|
export type CalendarTask = Components.Schemas.CalendarTask;
|
|
10652
10758
|
export type CalendarTaskResponse = Components.Schemas.CalendarTaskResponse;
|
|
@@ -10700,6 +10806,7 @@ export type MessageRecord = Components.Schemas.MessageRecord;
|
|
|
10700
10806
|
export type MessageAuthResult = Components.Schemas.MessageAuthResult;
|
|
10701
10807
|
export type MessageProviderSpam = Components.Schemas.MessageProviderSpam;
|
|
10702
10808
|
export type MessageFilterMove = Components.Schemas.MessageFilterMove;
|
|
10809
|
+
export type ClassifierScore = Components.Schemas.ClassifierScore;
|
|
10703
10810
|
export type Message = Components.Schemas.Message;
|
|
10704
10811
|
export type MessageSummaryResponse = Components.Schemas.MessageSummaryResponse;
|
|
10705
10812
|
export type EnvelopeResponse = Components.Schemas.EnvelopeResponse;
|
|
@@ -10810,9 +10917,9 @@ export type ClassificationUnrunnableReason = Components.Schemas.ClassificationUn
|
|
|
10810
10917
|
export type ClassificationLabel = Components.Schemas.ClassificationLabel;
|
|
10811
10918
|
export type ClassificationFailureKind = Components.Schemas.ClassificationFailureKind;
|
|
10812
10919
|
export type ClassificationField = Components.Schemas.ClassificationField;
|
|
10920
|
+
export type MessageCategory = Components.Schemas.MessageCategory;
|
|
10813
10921
|
export type SortOrder = Components.Schemas.SortOrder;
|
|
10814
10922
|
export type StarColor = Components.Schemas.StarColor;
|
|
10815
|
-
export type MessageCategory = Components.Schemas.MessageCategory;
|
|
10816
10923
|
export type SenderTrust = Components.Schemas.SenderTrust;
|
|
10817
10924
|
export type DisplayNameCorrespondence = Components.Schemas.DisplayNameCorrespondence;
|
|
10818
10925
|
export type MessageStatus = Components.Schemas.MessageStatus;
|