@remit/api-openapi-types 0.0.87 → 0.0.89

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 +150 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/api-openapi-types",
3
- "version": "0.0.87",
3
+ "version": "0.0.89",
4
4
  "type": "module",
5
5
  "main": "types.d.ts",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -213,6 +213,18 @@ 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";
216
228
  /**
217
229
  * Sort order for list operations
218
230
  */
@@ -363,7 +375,7 @@ distinguishable from a network failure without parsing prose.
363
375
  /**
364
376
  * 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
377
  */
366
- export type AccountSettingName = "Theme" | "Density" | "DefaultComposerFormat" | "PinnedFolders" | "AccountSignaturePlainText" | "AccountSignatureHtml" | "AccountDisplayName" | "AccountMuted" | "AccountComposeLanguages" | "MailboxDisplayName" | "MailboxMuted" | "FolderRoleAppointment" | "FolderRoleAppointmentLabel" | "MailboxRole" | "DefaultInvitationSenderAccountId";
378
+ 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
379
  /**
368
380
  * 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
381
  */
@@ -3615,6 +3627,87 @@ field on this resource rather than one more operation.
3615
3627
  * Whether `defaultInvitationSenderAccountId` is the reader's own choice rather than the account an event is on.
3616
3628
  */
3617
3629
  defaultInvitationSenderChosen: boolean;
3630
+ /**
3631
+ * Every classification provider the reader can pick.
3632
+ */
3633
+ classificationPresets: ClassificationPreset[];
3634
+ /**
3635
+ * The saved classification provider, or `NotConfigured`.
3636
+ */
3637
+ classification: ClassificationNotConfigured | ClassificationConfigured;
3638
+ }
3639
+ /**
3640
+ * A classification provider the reader can pick.
3641
+ */
3642
+ export interface ClassificationPreset {
3643
+ presetId: ClassificationPresetId;
3644
+ label: string;
3645
+ group: ClassificationPresetGroup;
3646
+ adapterShape: ClassificationAdapterShape;
3647
+ /**
3648
+ * The base URL used when the reader leaves it empty. Absent when a save has to name one in `classificationBaseUrl`.
3649
+ */
3650
+ defaultBaseUrl?: string;
3651
+ /**
3652
+ * The model used when the reader leaves it empty.
3653
+ */
3654
+ defaultModel: string;
3655
+ /**
3656
+ * Whether a save needs `classificationApiKey`.
3657
+ */
3658
+ needsKey: boolean;
3659
+ price: ClassificationPriced | ClassificationNoPrice;
3660
+ }
3661
+ /**
3662
+ * A classification preset that has a known price per million input tokens.
3663
+ */
3664
+ export interface ClassificationPriced {
3665
+ state: "Priced";
3666
+ /**
3667
+ * ISO 4217 currency of `perMillionInputTokens`.
3668
+ */
3669
+ currency: "USD";
3670
+ /**
3671
+ * Price of one million input tokens. Output tokens are not charged.
3672
+ */
3673
+ perMillionInputTokens: number;
3674
+ }
3675
+ /**
3676
+ * A classification preset with no price to show: self-hosted, or a price the provider sets per model.
3677
+ */
3678
+ export interface ClassificationNoPrice {
3679
+ state: "NoPrice";
3680
+ }
3681
+ /**
3682
+ * No classification provider is saved, so classification is off.
3683
+ */
3684
+ export interface ClassificationNotConfigured {
3685
+ state: "NotConfigured";
3686
+ }
3687
+ /**
3688
+ * The saved classification provider. The API key itself is never returned.
3689
+ */
3690
+ export interface ClassificationConfigured {
3691
+ state: "Configured";
3692
+ presetId: ClassificationPresetId;
3693
+ model: string;
3694
+ baseUrl: string;
3695
+ /**
3696
+ * Whether an API key is stored for this provider.
3697
+ */
3698
+ apiKeySaved: boolean;
3699
+ /**
3700
+ * Whether classification runs.
3701
+ */
3702
+ enabled: boolean;
3703
+ /**
3704
+ * The most classification calls per mail account per UTC day.
3705
+ */
3706
+ dailyLimit: number;
3707
+ /**
3708
+ * When the provider, model, base URL or key was last saved, in epoch milliseconds (UTC).
3709
+ */
3710
+ savedAt: number;
3618
3711
  }
3619
3712
  /**
3620
3713
  * A change to the caller's settings. Every field is optional and absence means untouched.
@@ -3624,6 +3717,30 @@ field on this resource rather than one more operation.
3624
3717
  * 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
3718
  */
3626
3719
  defaultInvitationSenderAccountId?: UUID;
3720
+ /**
3721
+ * Save a classification provider. Saving another preset deletes the stored key. Without it, the classification fields below apply to the saved provider.
3722
+ */
3723
+ classificationPresetId?: ClassificationPresetId;
3724
+ /**
3725
+ * The model to ask for. Empty means the preset's default model.
3726
+ */
3727
+ classificationModel?: string;
3728
+ /**
3729
+ * 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.
3730
+ */
3731
+ classificationBaseUrl?: string;
3732
+ /**
3733
+ * 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.
3734
+ */
3735
+ classificationApiKey?: string;
3736
+ /**
3737
+ * 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.
3738
+ */
3739
+ classificationEnabled?: boolean;
3740
+ /**
3741
+ * The most classification calls per mail account per UTC day. Needs a saved provider.
3742
+ */
3743
+ classificationDailyLimit?: number;
3627
3744
  }
3628
3745
  /**
3629
3746
  * Tasks due in the requested window, in due order. Unpaginated: the window is the bound.
@@ -7678,6 +7795,12 @@ declare namespace Paths {
7678
7795
  export type $401 = void;
7679
7796
  }
7680
7797
  }
7798
+ namespace ClearClassificationProvider {
7799
+ namespace Responses {
7800
+ export type $200 = void;
7801
+ export type $401 = void;
7802
+ }
7803
+ }
7681
7804
  namespace ListCalendarTasks {
7682
7805
  export interface QueryParameters {
7683
7806
  from: string;
@@ -8665,6 +8788,14 @@ reader organizes the event, none otherwise.
8665
8788
  data?: any,
8666
8789
  config?: AxiosRequestConfig
8667
8790
  ): OperationResponse<Paths.ClearDefaultInvitationSender.Responses.$200>;
8791
+ /**
8792
+ * clearClassificationProvider - Delete the saved classification provider, its key and every classification setting. Classification is then off. Answers with every setting as it now stands.
8793
+ */
8794
+ 'clearClassificationProvider'(
8795
+ parameters?: Parameters<UnknownParamsObject> | null,
8796
+ data?: any,
8797
+ config?: AxiosRequestConfig
8798
+ ): OperationResponse<Paths.ClearClassificationProvider.Responses.$200>;
8668
8799
  /**
8669
8800
  * 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
8801
  */
@@ -9624,6 +9755,16 @@ reader organizes the event, none otherwise.
9624
9755
  config?: AxiosRequestConfig
9625
9756
  ): OperationResponse<Paths.ClearDefaultInvitationSender.Responses.$200>;
9626
9757
  };
9758
+ ['/settings/classification-provider']: {
9759
+ /**
9760
+ * clearClassificationProvider - Delete the saved classification provider, its key and every classification setting. Classification is then off. Answers with every setting as it now stands.
9761
+ */
9762
+ 'delete'(
9763
+ parameters?: Parameters<UnknownParamsObject> | null,
9764
+ data?: any,
9765
+ config?: AxiosRequestConfig
9766
+ ): OperationResponse<Paths.ClearClassificationProvider.Responses.$200>;
9767
+ };
9627
9768
  ['/calendar-tasks']: {
9628
9769
  /**
9629
9770
  * 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,6 +10376,11 @@ export type CalendarEventDeleteResponse = Components.Schemas.CalendarEventDelete
10235
10376
  export type CalendarFreeBusyResponse = Components.Schemas.CalendarFreeBusyResponse;
10236
10377
  export type CalendarFreeBusySpan = Components.Schemas.CalendarFreeBusySpan;
10237
10378
  export type UserSettingsResponse = Components.Schemas.UserSettingsResponse;
10379
+ export type ClassificationPreset = Components.Schemas.ClassificationPreset;
10380
+ export type ClassificationPriced = Components.Schemas.ClassificationPriced;
10381
+ export type ClassificationNoPrice = Components.Schemas.ClassificationNoPrice;
10382
+ export type ClassificationNotConfigured = Components.Schemas.ClassificationNotConfigured;
10383
+ export type ClassificationConfigured = Components.Schemas.ClassificationConfigured;
10238
10384
  export type UpdateUserSettingsInput = Components.Schemas.UpdateUserSettingsInput;
10239
10385
  export type CalendarTaskListResponse = Components.Schemas.CalendarTaskListResponse;
10240
10386
  export type CalendarTask = Components.Schemas.CalendarTask;
@@ -10386,6 +10532,9 @@ export type CalendarInviteMethod = Components.Schemas.CalendarInviteMethod;
10386
10532
  export type OutboxMessageStatus = Components.Schemas.OutboxMessageStatus;
10387
10533
  export type RecurrenceScope = Components.Schemas.RecurrenceScope;
10388
10534
  export type CalendarInviteAnswer = Components.Schemas.CalendarInviteAnswer;
10535
+ export type ClassificationPresetId = Components.Schemas.ClassificationPresetId;
10536
+ export type ClassificationPresetGroup = Components.Schemas.ClassificationPresetGroup;
10537
+ export type ClassificationAdapterShape = Components.Schemas.ClassificationAdapterShape;
10389
10538
  export type SortOrder = Components.Schemas.SortOrder;
10390
10539
  export type StarColor = Components.Schemas.StarColor;
10391
10540
  export type MessageCategory = Components.Schemas.MessageCategory;