@remit/api-openapi-types 0.0.93 → 0.0.94
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 +49 -15
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -225,6 +225,14 @@ current enum emitter anyway, so the wire contract uses the bare form.
|
|
|
225
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
226
|
*/
|
|
227
227
|
export type ClassificationAdapterShape = "DecisionApi" | "ChatJsonSchema" | "JinaClassify";
|
|
228
|
+
/**
|
|
229
|
+
* Where a classification setting's value comes from.
|
|
230
|
+
*/
|
|
231
|
+
export type ClassificationValueSource = "Saved" | "Deployment" | "Default";
|
|
232
|
+
/**
|
|
233
|
+
* Why a classification provider cannot run.
|
|
234
|
+
*/
|
|
235
|
+
export type ClassificationUnrunnableReason = "NoBaseUrl" | "NoApiKey";
|
|
228
236
|
/**
|
|
229
237
|
* A label a classification provider picks for a message: the junk verdicts, priority, and the message categories.
|
|
230
238
|
*/
|
|
@@ -3644,9 +3652,9 @@ field on this resource rather than one more operation.
|
|
|
3644
3652
|
*/
|
|
3645
3653
|
classificationPresets: ClassificationPreset[];
|
|
3646
3654
|
/**
|
|
3647
|
-
* The
|
|
3655
|
+
* The classification provider in effect, `Unrunnable` when one is chosen but cannot run, or `NotConfigured`.
|
|
3648
3656
|
*/
|
|
3649
|
-
classification: ClassificationNotConfigured | ClassificationConfigured;
|
|
3657
|
+
classification: ClassificationNotConfigured | ClassificationConfigured | ClassificationUnrunnable;
|
|
3650
3658
|
}
|
|
3651
3659
|
/**
|
|
3652
3660
|
* A classification provider the reader can pick.
|
|
@@ -3697,7 +3705,7 @@ field on this resource rather than one more operation.
|
|
|
3697
3705
|
state: "NotConfigured";
|
|
3698
3706
|
}
|
|
3699
3707
|
/**
|
|
3700
|
-
* The saved
|
|
3708
|
+
* The classification provider in effect, saved or inherited from the deployment. No API key is ever returned.
|
|
3701
3709
|
*/
|
|
3702
3710
|
export interface ClassificationConfigured {
|
|
3703
3711
|
state: "Configured";
|
|
@@ -3705,7 +3713,7 @@ field on this resource rather than one more operation.
|
|
|
3705
3713
|
model: string;
|
|
3706
3714
|
baseUrl: string;
|
|
3707
3715
|
/**
|
|
3708
|
-
* Whether an API key is
|
|
3716
|
+
* Deprecated: read `sources.apiKey` instead. Whether an API key is saved or inherited from the deployment. Removed once reader-ui reads `sources`.
|
|
3709
3717
|
*/
|
|
3710
3718
|
apiKeySaved: boolean;
|
|
3711
3719
|
/**
|
|
@@ -3717,14 +3725,28 @@ field on this resource rather than one more operation.
|
|
|
3717
3725
|
*/
|
|
3718
3726
|
dailyLimit: number;
|
|
3719
3727
|
/**
|
|
3720
|
-
*
|
|
3728
|
+
* Where each value comes from. A reader overrides one field by saving it, and inherits it again by saving it empty.
|
|
3721
3729
|
*/
|
|
3722
|
-
|
|
3730
|
+
sources: ClassificationSources;
|
|
3723
3731
|
/**
|
|
3724
3732
|
* Today's provider calls, one row per mail account of the account config.
|
|
3725
3733
|
*/
|
|
3726
3734
|
usage: ClassificationUsage[];
|
|
3727
3735
|
}
|
|
3736
|
+
/**
|
|
3737
|
+
* Where each classification setting's value comes from.
|
|
3738
|
+
*/
|
|
3739
|
+
export interface ClassificationSources {
|
|
3740
|
+
presetId: ClassificationValueSource;
|
|
3741
|
+
model: ClassificationValueSource;
|
|
3742
|
+
baseUrl: ClassificationValueSource;
|
|
3743
|
+
/**
|
|
3744
|
+
* `Saved` for a key the reader saved, `Deployment` for the deployment's key, `Default` for no key.
|
|
3745
|
+
*/
|
|
3746
|
+
apiKey: ClassificationValueSource;
|
|
3747
|
+
enabled: ClassificationValueSource;
|
|
3748
|
+
dailyLimit: ClassificationValueSource;
|
|
3749
|
+
}
|
|
3728
3750
|
/**
|
|
3729
3751
|
* One mail account's classification calls today.
|
|
3730
3752
|
*/
|
|
@@ -3755,6 +3777,14 @@ field on this resource rather than one more operation.
|
|
|
3755
3777
|
currency: "USD";
|
|
3756
3778
|
amount: number;
|
|
3757
3779
|
}
|
|
3780
|
+
/**
|
|
3781
|
+
* A classification provider is chosen but cannot run, so classification is off.
|
|
3782
|
+
*/
|
|
3783
|
+
export interface ClassificationUnrunnable {
|
|
3784
|
+
state: "Unrunnable";
|
|
3785
|
+
presetId: ClassificationPresetId;
|
|
3786
|
+
reason: ClassificationUnrunnableReason;
|
|
3787
|
+
}
|
|
3758
3788
|
/**
|
|
3759
3789
|
* A change to the caller's settings. Every field is optional and absence means untouched.
|
|
3760
3790
|
*/
|
|
@@ -3764,27 +3794,27 @@ field on this resource rather than one more operation.
|
|
|
3764
3794
|
*/
|
|
3765
3795
|
defaultInvitationSenderAccountId?: UUID;
|
|
3766
3796
|
/**
|
|
3767
|
-
* Save a classification provider. Saving another preset deletes the stored key. Without it, the classification fields below apply to the saved
|
|
3797
|
+
* Save a classification provider. Saving another preset deletes the stored key, model and base URL. Without it, the classification fields below apply to the provider in effect, saved or inherited from the deployment.
|
|
3768
3798
|
*/
|
|
3769
3799
|
classificationPresetId?: ClassificationPresetId;
|
|
3770
3800
|
/**
|
|
3771
|
-
* The model to ask for. Empty
|
|
3801
|
+
* The model to ask for. Empty deletes the saved model, so it is inherited again.
|
|
3772
3802
|
*/
|
|
3773
3803
|
classificationModel?: string;
|
|
3774
3804
|
/**
|
|
3775
|
-
* The http or https base URL to call. Empty
|
|
3805
|
+
* The http or https base URL to call. Empty deletes the saved base URL, so it is inherited again. Refused with 400 `invalid_classification_base_url` when it is not a URL, or when no base URL is saved, inherited or given by the preset.
|
|
3776
3806
|
*/
|
|
3777
3807
|
classificationBaseUrl?: string;
|
|
3778
3808
|
/**
|
|
3779
|
-
* 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
|
|
3809
|
+
* 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 saved, or inherited from the deployment for the same preset and base URL.
|
|
3780
3810
|
*/
|
|
3781
3811
|
classificationApiKey?: string;
|
|
3782
3812
|
/**
|
|
3783
|
-
* Switch classification on or off. Switching on with no
|
|
3813
|
+
* Switch classification on or off. Switching on with no provider in effect is refused with 400 `classification_not_configured`; switching off keeps the provider and key.
|
|
3784
3814
|
*/
|
|
3785
3815
|
classificationEnabled?: boolean;
|
|
3786
3816
|
/**
|
|
3787
|
-
* The most classification calls per mail account per UTC day. Needs a saved
|
|
3817
|
+
* The most classification calls per mail account per UTC day. Needs a provider in effect, saved or inherited.
|
|
3788
3818
|
*/
|
|
3789
3819
|
classificationDailyLimit?: number;
|
|
3790
3820
|
}
|
|
@@ -3794,15 +3824,15 @@ field on this resource rather than one more operation.
|
|
|
3794
3824
|
export interface ClassificationTestInput {
|
|
3795
3825
|
presetId: ClassificationPresetId;
|
|
3796
3826
|
/**
|
|
3797
|
-
* The model to ask for. Empty means the
|
|
3827
|
+
* The model to ask for. Empty means the inherited model.
|
|
3798
3828
|
*/
|
|
3799
3829
|
model: string;
|
|
3800
3830
|
/**
|
|
3801
|
-
* The http or https base URL to call. Empty means the
|
|
3831
|
+
* The http or https base URL to call. Empty means the inherited base URL.
|
|
3802
3832
|
*/
|
|
3803
3833
|
baseUrl: string;
|
|
3804
3834
|
/**
|
|
3805
|
-
* The provider's API key. Empty means the key saved for this preset.
|
|
3835
|
+
* The provider's API key. Empty means the key saved for this preset, or the deployment's key when the preset and base URL match the deployment's.
|
|
3806
3836
|
*/
|
|
3807
3837
|
apiKey: string;
|
|
3808
3838
|
}
|
|
@@ -10522,8 +10552,10 @@ export type ClassificationPriced = Components.Schemas.ClassificationPriced;
|
|
|
10522
10552
|
export type ClassificationNoPrice = Components.Schemas.ClassificationNoPrice;
|
|
10523
10553
|
export type ClassificationNotConfigured = Components.Schemas.ClassificationNotConfigured;
|
|
10524
10554
|
export type ClassificationConfigured = Components.Schemas.ClassificationConfigured;
|
|
10555
|
+
export type ClassificationSources = Components.Schemas.ClassificationSources;
|
|
10525
10556
|
export type ClassificationUsage = Components.Schemas.ClassificationUsage;
|
|
10526
10557
|
export type ClassificationCostPriced = Components.Schemas.ClassificationCostPriced;
|
|
10558
|
+
export type ClassificationUnrunnable = Components.Schemas.ClassificationUnrunnable;
|
|
10527
10559
|
export type UpdateUserSettingsInput = Components.Schemas.UpdateUserSettingsInput;
|
|
10528
10560
|
export type ClassificationTestInput = Components.Schemas.ClassificationTestInput;
|
|
10529
10561
|
export type ClassificationTestPassed = Components.Schemas.ClassificationTestPassed;
|
|
@@ -10683,6 +10715,8 @@ export type CalendarInviteAnswer = Components.Schemas.CalendarInviteAnswer;
|
|
|
10683
10715
|
export type ClassificationPresetId = Components.Schemas.ClassificationPresetId;
|
|
10684
10716
|
export type ClassificationPresetGroup = Components.Schemas.ClassificationPresetGroup;
|
|
10685
10717
|
export type ClassificationAdapterShape = Components.Schemas.ClassificationAdapterShape;
|
|
10718
|
+
export type ClassificationValueSource = Components.Schemas.ClassificationValueSource;
|
|
10719
|
+
export type ClassificationUnrunnableReason = Components.Schemas.ClassificationUnrunnableReason;
|
|
10686
10720
|
export type ClassificationLabel = Components.Schemas.ClassificationLabel;
|
|
10687
10721
|
export type ClassificationFailureKind = Components.Schemas.ClassificationFailureKind;
|
|
10688
10722
|
export type ClassificationField = Components.Schemas.ClassificationField;
|