@remit/api-openapi-types 0.0.88 → 0.0.90
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 +252 -1
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -213,6 +213,30 @@ current enum emitter anyway, so the wire contract uses the bare form.
|
|
|
213
213
|
* The answer a guest gives an invitation. It is written as the reader's `ATTENDEE;PARTSTAT` on the stored event (RFC 5545 3.2.12).
|
|
214
214
|
*/
|
|
215
215
|
export type CalendarInviteAnswer = "Accepted" | "Tentative" | "Declined";
|
|
216
|
+
/**
|
|
217
|
+
* A classification provider preset: a known provider with its adapter shape, default base URL and default model.
|
|
218
|
+
*/
|
|
219
|
+
export type ClassificationPresetId = "Jev" | "Jina" | "Mistral" | "Gemini" | "OpenAiCompatible" | "Local";
|
|
220
|
+
/**
|
|
221
|
+
* How a settings screen groups the classification presets. `Hosted` is a named provider, `Custom` an endpoint the reader names, `Local` a model on the reader's own machine.
|
|
222
|
+
*/
|
|
223
|
+
export type ClassificationPresetGroup = "Hosted" | "Custom" | "Local";
|
|
224
|
+
/**
|
|
225
|
+
* The request shape a classification provider speaks. `DecisionApi` returns a calibrated probability per label; `ChatJsonSchema` is an OpenAI-compatible chat completion constrained to the label enum; `JinaClassify` is Jina's `/v1/classify`.
|
|
226
|
+
*/
|
|
227
|
+
export type ClassificationAdapterShape = "DecisionApi" | "ChatJsonSchema" | "JinaClassify";
|
|
228
|
+
/**
|
|
229
|
+
* A label a classification provider picks for a message: the junk verdicts, priority, and the message categories.
|
|
230
|
+
*/
|
|
231
|
+
export type ClassificationLabel = "Spam" | "Phishing" | "Priority" | "Personal" | "Newsletter" | "Marketing" | "Automated" | "Transactional" | "Social";
|
|
232
|
+
/**
|
|
233
|
+
* Why a classification provider call gave no usable answer.
|
|
234
|
+
*/
|
|
235
|
+
export type ClassificationFailureKind = "Unauthorized" | "ModelNotFound" | "RateLimited" | "Rejected" | "ProviderError" | "Unreachable" | "TimedOut" | "Unparseable";
|
|
236
|
+
/**
|
|
237
|
+
* The classification provider form field a failure points at.
|
|
238
|
+
*/
|
|
239
|
+
export type ClassificationField = "ApiKey" | "Model" | "BaseUrl";
|
|
216
240
|
/**
|
|
217
241
|
* Sort order for list operations
|
|
218
242
|
*/
|
|
@@ -363,7 +387,7 @@ distinguishable from a network failure without parsing prose.
|
|
|
363
387
|
/**
|
|
364
388
|
* 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.
|
|
365
389
|
*/
|
|
366
|
-
export type AccountSettingName = "Theme" | "Density" | "DefaultComposerFormat" | "PinnedFolders" | "AccountSignaturePlainText" | "AccountSignatureHtml" | "AccountDisplayName" | "AccountMuted" | "AccountComposeLanguages" | "MailboxDisplayName" | "MailboxMuted" | "FolderRoleAppointment" | "FolderRoleAppointmentLabel" | "MailboxRole" | "DefaultInvitationSenderAccountId";
|
|
390
|
+
export type AccountSettingName = "Theme" | "Density" | "DefaultComposerFormat" | "PinnedFolders" | "AccountSignaturePlainText" | "AccountSignatureHtml" | "AccountDisplayName" | "AccountMuted" | "AccountComposeLanguages" | "MailboxDisplayName" | "MailboxMuted" | "FolderRoleAppointment" | "FolderRoleAppointmentLabel" | "MailboxRole" | "DefaultInvitationSenderAccountId" | "ClassificationPresetId" | "ClassificationModel" | "ClassificationBaseUrl" | "ClassificationApiKey" | "ClassificationEnabled" | "ClassificationDailyLimit";
|
|
367
391
|
/**
|
|
368
392
|
* Lifecycle of one applied configuration import. An import is Complete the moment every folder reference in the file has been bound to a real mailbox; until then it is Pending, waiting on the IMAP discovery that will produce those mailboxes.
|
|
369
393
|
*/
|
|
@@ -3615,6 +3639,87 @@ field on this resource rather than one more operation.
|
|
|
3615
3639
|
* Whether `defaultInvitationSenderAccountId` is the reader's own choice rather than the account an event is on.
|
|
3616
3640
|
*/
|
|
3617
3641
|
defaultInvitationSenderChosen: boolean;
|
|
3642
|
+
/**
|
|
3643
|
+
* Every classification provider the reader can pick.
|
|
3644
|
+
*/
|
|
3645
|
+
classificationPresets: ClassificationPreset[];
|
|
3646
|
+
/**
|
|
3647
|
+
* The saved classification provider, or `NotConfigured`.
|
|
3648
|
+
*/
|
|
3649
|
+
classification: ClassificationNotConfigured | ClassificationConfigured;
|
|
3650
|
+
}
|
|
3651
|
+
/**
|
|
3652
|
+
* A classification provider the reader can pick.
|
|
3653
|
+
*/
|
|
3654
|
+
export interface ClassificationPreset {
|
|
3655
|
+
presetId: ClassificationPresetId;
|
|
3656
|
+
label: string;
|
|
3657
|
+
group: ClassificationPresetGroup;
|
|
3658
|
+
adapterShape: ClassificationAdapterShape;
|
|
3659
|
+
/**
|
|
3660
|
+
* The base URL used when the reader leaves it empty. Absent when a save has to name one in `classificationBaseUrl`.
|
|
3661
|
+
*/
|
|
3662
|
+
defaultBaseUrl?: string;
|
|
3663
|
+
/**
|
|
3664
|
+
* The model used when the reader leaves it empty.
|
|
3665
|
+
*/
|
|
3666
|
+
defaultModel: string;
|
|
3667
|
+
/**
|
|
3668
|
+
* Whether a save needs `classificationApiKey`.
|
|
3669
|
+
*/
|
|
3670
|
+
needsKey: boolean;
|
|
3671
|
+
price: ClassificationPriced | ClassificationNoPrice;
|
|
3672
|
+
}
|
|
3673
|
+
/**
|
|
3674
|
+
* A classification preset that has a known price per million input tokens.
|
|
3675
|
+
*/
|
|
3676
|
+
export interface ClassificationPriced {
|
|
3677
|
+
state: "Priced";
|
|
3678
|
+
/**
|
|
3679
|
+
* ISO 4217 currency of `perMillionInputTokens`.
|
|
3680
|
+
*/
|
|
3681
|
+
currency: "USD";
|
|
3682
|
+
/**
|
|
3683
|
+
* Price of one million input tokens. Output tokens are not charged.
|
|
3684
|
+
*/
|
|
3685
|
+
perMillionInputTokens: number;
|
|
3686
|
+
}
|
|
3687
|
+
/**
|
|
3688
|
+
* A classification preset with no price to show: self-hosted, or a price the provider sets per model.
|
|
3689
|
+
*/
|
|
3690
|
+
export interface ClassificationNoPrice {
|
|
3691
|
+
state: "NoPrice";
|
|
3692
|
+
}
|
|
3693
|
+
/**
|
|
3694
|
+
* No classification provider is saved, so classification is off.
|
|
3695
|
+
*/
|
|
3696
|
+
export interface ClassificationNotConfigured {
|
|
3697
|
+
state: "NotConfigured";
|
|
3698
|
+
}
|
|
3699
|
+
/**
|
|
3700
|
+
* The saved classification provider. The API key itself is never returned.
|
|
3701
|
+
*/
|
|
3702
|
+
export interface ClassificationConfigured {
|
|
3703
|
+
state: "Configured";
|
|
3704
|
+
presetId: ClassificationPresetId;
|
|
3705
|
+
model: string;
|
|
3706
|
+
baseUrl: string;
|
|
3707
|
+
/**
|
|
3708
|
+
* Whether an API key is stored for this provider.
|
|
3709
|
+
*/
|
|
3710
|
+
apiKeySaved: boolean;
|
|
3711
|
+
/**
|
|
3712
|
+
* Whether classification runs.
|
|
3713
|
+
*/
|
|
3714
|
+
enabled: boolean;
|
|
3715
|
+
/**
|
|
3716
|
+
* The most classification calls per mail account per UTC day.
|
|
3717
|
+
*/
|
|
3718
|
+
dailyLimit: number;
|
|
3719
|
+
/**
|
|
3720
|
+
* When the provider, model, base URL or key was last saved, in epoch milliseconds (UTC).
|
|
3721
|
+
*/
|
|
3722
|
+
savedAt: number;
|
|
3618
3723
|
}
|
|
3619
3724
|
/**
|
|
3620
3725
|
* A change to the caller's settings. Every field is optional and absence means untouched.
|
|
@@ -3624,6 +3729,89 @@ field on this resource rather than one more operation.
|
|
|
3624
3729
|
* The account invitations go out from by default. Refused with 400 `unknown_sender` when it is not an account of the caller's account config that sends mail. Cleared with `clearDefaultInvitationSender`.
|
|
3625
3730
|
*/
|
|
3626
3731
|
defaultInvitationSenderAccountId?: UUID;
|
|
3732
|
+
/**
|
|
3733
|
+
* Save a classification provider. Saving another preset deletes the stored key. Without it, the classification fields below apply to the saved provider.
|
|
3734
|
+
*/
|
|
3735
|
+
classificationPresetId?: ClassificationPresetId;
|
|
3736
|
+
/**
|
|
3737
|
+
* The model to ask for. Empty means the preset's default model.
|
|
3738
|
+
*/
|
|
3739
|
+
classificationModel?: string;
|
|
3740
|
+
/**
|
|
3741
|
+
* The http or https base URL to call. Empty means the preset's default base URL. Refused with 400 `invalid_classification_base_url` when it is not a URL, or when the preset has no default base URL and none is given.
|
|
3742
|
+
*/
|
|
3743
|
+
classificationBaseUrl?: string;
|
|
3744
|
+
/**
|
|
3745
|
+
* The provider's API key. Write-only: stored encrypted and never returned. Refused with 400 `classification_api_key_required` when the preset needs a key and none is stored for it.
|
|
3746
|
+
*/
|
|
3747
|
+
classificationApiKey?: string;
|
|
3748
|
+
/**
|
|
3749
|
+
* Switch classification on or off. Switching on with no saved provider is refused with 400 `classification_not_configured`; switching off keeps the provider and key.
|
|
3750
|
+
*/
|
|
3751
|
+
classificationEnabled?: boolean;
|
|
3752
|
+
/**
|
|
3753
|
+
* The most classification calls per mail account per UTC day. Needs a saved provider.
|
|
3754
|
+
*/
|
|
3755
|
+
classificationDailyLimit?: number;
|
|
3756
|
+
}
|
|
3757
|
+
/**
|
|
3758
|
+
* The classification provider form as it stands, saved or not.
|
|
3759
|
+
*/
|
|
3760
|
+
export interface ClassificationTestInput {
|
|
3761
|
+
presetId: ClassificationPresetId;
|
|
3762
|
+
/**
|
|
3763
|
+
* The model to ask for. Empty means the preset's default model.
|
|
3764
|
+
*/
|
|
3765
|
+
model: string;
|
|
3766
|
+
/**
|
|
3767
|
+
* The http or https base URL to call. Empty means the preset's default base URL.
|
|
3768
|
+
*/
|
|
3769
|
+
baseUrl: string;
|
|
3770
|
+
/**
|
|
3771
|
+
* The provider's API key. Empty means the key saved for this preset.
|
|
3772
|
+
*/
|
|
3773
|
+
apiKey: string;
|
|
3774
|
+
}
|
|
3775
|
+
/**
|
|
3776
|
+
* The provider classified the sample message.
|
|
3777
|
+
*/
|
|
3778
|
+
export interface ClassificationTestPassed {
|
|
3779
|
+
state: "Passed";
|
|
3780
|
+
/**
|
|
3781
|
+
* How long the provider call took, in milliseconds.
|
|
3782
|
+
*/
|
|
3783
|
+
latencyMs: number;
|
|
3784
|
+
/**
|
|
3785
|
+
* The label the provider chose for the sample message.
|
|
3786
|
+
*/
|
|
3787
|
+
label: ClassificationLabel;
|
|
3788
|
+
/**
|
|
3789
|
+
* The provider's confidence in `label`, between 0 and 1.
|
|
3790
|
+
*/
|
|
3791
|
+
confidence: number;
|
|
3792
|
+
}
|
|
3793
|
+
/**
|
|
3794
|
+
* The provider call gave no usable answer.
|
|
3795
|
+
*/
|
|
3796
|
+
export interface ClassificationTestFailed {
|
|
3797
|
+
state: "Failed";
|
|
3798
|
+
/**
|
|
3799
|
+
* How long the provider call took, in milliseconds.
|
|
3800
|
+
*/
|
|
3801
|
+
latencyMs: number;
|
|
3802
|
+
/**
|
|
3803
|
+
* The HTTP status the provider answered with. Absent when no answer arrived.
|
|
3804
|
+
*/
|
|
3805
|
+
status?: number;
|
|
3806
|
+
kind: ClassificationFailureKind;
|
|
3807
|
+
/**
|
|
3808
|
+
* The form field to change. Absent when no field can fix it: a rate limit or a provider error.
|
|
3809
|
+
*/
|
|
3810
|
+
field?: ClassificationField;
|
|
3811
|
+
/**
|
|
3812
|
+
* What to change so the next test passes.
|
|
3813
|
+
*/
|
|
3814
|
+
fix: string;
|
|
3627
3815
|
}
|
|
3628
3816
|
/**
|
|
3629
3817
|
* Tasks due in the requested window, in due order. Unpaginated: the window is the bound.
|
|
@@ -7678,6 +7866,19 @@ declare namespace Paths {
|
|
|
7678
7866
|
export type $401 = void;
|
|
7679
7867
|
}
|
|
7680
7868
|
}
|
|
7869
|
+
namespace ClearClassificationProvider {
|
|
7870
|
+
namespace Responses {
|
|
7871
|
+
export type $200 = void;
|
|
7872
|
+
export type $401 = void;
|
|
7873
|
+
}
|
|
7874
|
+
}
|
|
7875
|
+
namespace TestClassificationProvider {
|
|
7876
|
+
export type RequestBody = Components.Schemas.ClassificationTestInput;
|
|
7877
|
+
namespace Responses {
|
|
7878
|
+
export type $400 = void;
|
|
7879
|
+
export type $401 = void;
|
|
7880
|
+
}
|
|
7881
|
+
}
|
|
7681
7882
|
namespace ListCalendarTasks {
|
|
7682
7883
|
export interface QueryParameters {
|
|
7683
7884
|
from: string;
|
|
@@ -8665,6 +8866,22 @@ reader organizes the event, none otherwise.
|
|
|
8665
8866
|
data?: any,
|
|
8666
8867
|
config?: AxiosRequestConfig
|
|
8667
8868
|
): OperationResponse<Paths.ClearDefaultInvitationSender.Responses.$200>;
|
|
8869
|
+
/**
|
|
8870
|
+
* clearClassificationProvider - Delete the saved classification provider, its key and every classification setting. Classification is then off. Answers with every setting as it now stands.
|
|
8871
|
+
*/
|
|
8872
|
+
'clearClassificationProvider'(
|
|
8873
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
8874
|
+
data?: any,
|
|
8875
|
+
config?: AxiosRequestConfig
|
|
8876
|
+
): OperationResponse<Paths.ClearClassificationProvider.Responses.$200>;
|
|
8877
|
+
/**
|
|
8878
|
+
* testClassificationProvider - Classify one built-in sample message with the form values, saved or not, and answer with the label or the failure. An empty key uses the saved key. Saved settings stay as they were, and the call counts toward no daily limit.
|
|
8879
|
+
*/
|
|
8880
|
+
'testClassificationProvider'(
|
|
8881
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
8882
|
+
data?: Paths.TestClassificationProvider.RequestBody,
|
|
8883
|
+
config?: AxiosRequestConfig
|
|
8884
|
+
): OperationResponse<any>;
|
|
8668
8885
|
/**
|
|
8669
8886
|
* 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.
|
|
8670
8887
|
*/
|
|
@@ -9624,6 +9841,26 @@ reader organizes the event, none otherwise.
|
|
|
9624
9841
|
config?: AxiosRequestConfig
|
|
9625
9842
|
): OperationResponse<Paths.ClearDefaultInvitationSender.Responses.$200>;
|
|
9626
9843
|
};
|
|
9844
|
+
['/settings/classification-provider']: {
|
|
9845
|
+
/**
|
|
9846
|
+
* clearClassificationProvider - Delete the saved classification provider, its key and every classification setting. Classification is then off. Answers with every setting as it now stands.
|
|
9847
|
+
*/
|
|
9848
|
+
'delete'(
|
|
9849
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
9850
|
+
data?: any,
|
|
9851
|
+
config?: AxiosRequestConfig
|
|
9852
|
+
): OperationResponse<Paths.ClearClassificationProvider.Responses.$200>;
|
|
9853
|
+
};
|
|
9854
|
+
['/settings/classification-test']: {
|
|
9855
|
+
/**
|
|
9856
|
+
* testClassificationProvider - Classify one built-in sample message with the form values, saved or not, and answer with the label or the failure. An empty key uses the saved key. Saved settings stay as they were, and the call counts toward no daily limit.
|
|
9857
|
+
*/
|
|
9858
|
+
'post'(
|
|
9859
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
9860
|
+
data?: Paths.TestClassificationProvider.RequestBody,
|
|
9861
|
+
config?: AxiosRequestConfig
|
|
9862
|
+
): OperationResponse<any>;
|
|
9863
|
+
};
|
|
9627
9864
|
['/calendar-tasks']: {
|
|
9628
9865
|
/**
|
|
9629
9866
|
* 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.
|
|
@@ -10235,7 +10472,15 @@ export type CalendarEventDeleteResponse = Components.Schemas.CalendarEventDelete
|
|
|
10235
10472
|
export type CalendarFreeBusyResponse = Components.Schemas.CalendarFreeBusyResponse;
|
|
10236
10473
|
export type CalendarFreeBusySpan = Components.Schemas.CalendarFreeBusySpan;
|
|
10237
10474
|
export type UserSettingsResponse = Components.Schemas.UserSettingsResponse;
|
|
10475
|
+
export type ClassificationPreset = Components.Schemas.ClassificationPreset;
|
|
10476
|
+
export type ClassificationPriced = Components.Schemas.ClassificationPriced;
|
|
10477
|
+
export type ClassificationNoPrice = Components.Schemas.ClassificationNoPrice;
|
|
10478
|
+
export type ClassificationNotConfigured = Components.Schemas.ClassificationNotConfigured;
|
|
10479
|
+
export type ClassificationConfigured = Components.Schemas.ClassificationConfigured;
|
|
10238
10480
|
export type UpdateUserSettingsInput = Components.Schemas.UpdateUserSettingsInput;
|
|
10481
|
+
export type ClassificationTestInput = Components.Schemas.ClassificationTestInput;
|
|
10482
|
+
export type ClassificationTestPassed = Components.Schemas.ClassificationTestPassed;
|
|
10483
|
+
export type ClassificationTestFailed = Components.Schemas.ClassificationTestFailed;
|
|
10239
10484
|
export type CalendarTaskListResponse = Components.Schemas.CalendarTaskListResponse;
|
|
10240
10485
|
export type CalendarTask = Components.Schemas.CalendarTask;
|
|
10241
10486
|
export type CalendarTaskResponse = Components.Schemas.CalendarTaskResponse;
|
|
@@ -10386,6 +10631,12 @@ export type CalendarInviteMethod = Components.Schemas.CalendarInviteMethod;
|
|
|
10386
10631
|
export type OutboxMessageStatus = Components.Schemas.OutboxMessageStatus;
|
|
10387
10632
|
export type RecurrenceScope = Components.Schemas.RecurrenceScope;
|
|
10388
10633
|
export type CalendarInviteAnswer = Components.Schemas.CalendarInviteAnswer;
|
|
10634
|
+
export type ClassificationPresetId = Components.Schemas.ClassificationPresetId;
|
|
10635
|
+
export type ClassificationPresetGroup = Components.Schemas.ClassificationPresetGroup;
|
|
10636
|
+
export type ClassificationAdapterShape = Components.Schemas.ClassificationAdapterShape;
|
|
10637
|
+
export type ClassificationLabel = Components.Schemas.ClassificationLabel;
|
|
10638
|
+
export type ClassificationFailureKind = Components.Schemas.ClassificationFailureKind;
|
|
10639
|
+
export type ClassificationField = Components.Schemas.ClassificationField;
|
|
10389
10640
|
export type SortOrder = Components.Schemas.SortOrder;
|
|
10390
10641
|
export type StarColor = Components.Schemas.StarColor;
|
|
10391
10642
|
export type MessageCategory = Components.Schemas.MessageCategory;
|