@remit/api-openapi-spec 0.0.84 → 0.0.85
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/openapi.json +285 -1
- package/package.json +1 -1
- package/request-validators.mjs +4 -3
package/openapi.json
CHANGED
|
@@ -6522,6 +6522,43 @@
|
|
|
6522
6522
|
}
|
|
6523
6523
|
}
|
|
6524
6524
|
},
|
|
6525
|
+
"/settings/classification-provider": {
|
|
6526
|
+
"delete": {
|
|
6527
|
+
"operationId": "UserSettingsOperations_clearClassificationProvider",
|
|
6528
|
+
"description": "Delete the saved classification provider, its key and every classification setting. Classification is then off. Answers with every setting as it now stands.",
|
|
6529
|
+
"parameters": [],
|
|
6530
|
+
"responses": {
|
|
6531
|
+
"200": {
|
|
6532
|
+
"description": "The request has succeeded.",
|
|
6533
|
+
"content": {
|
|
6534
|
+
"application/json": {
|
|
6535
|
+
"schema": {
|
|
6536
|
+
"$ref": "#/components/schemas/RemitImap.UserSettingsResponse"
|
|
6537
|
+
}
|
|
6538
|
+
}
|
|
6539
|
+
}
|
|
6540
|
+
},
|
|
6541
|
+
"401": {
|
|
6542
|
+
"description": "The request carried no usable credential. `code` is `unauthorized`.",
|
|
6543
|
+
"content": {
|
|
6544
|
+
"application/json": {
|
|
6545
|
+
"schema": {
|
|
6546
|
+
"$ref": "#/components/schemas/ApiError"
|
|
6547
|
+
}
|
|
6548
|
+
}
|
|
6549
|
+
}
|
|
6550
|
+
}
|
|
6551
|
+
},
|
|
6552
|
+
"x-amazon-apigateway-integration": {
|
|
6553
|
+
"type": "aws_proxy",
|
|
6554
|
+
"httpMethod": "POST",
|
|
6555
|
+
"passthroughBehavior": "when_no_match",
|
|
6556
|
+
"uri": {
|
|
6557
|
+
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations"
|
|
6558
|
+
}
|
|
6559
|
+
}
|
|
6560
|
+
}
|
|
6561
|
+
},
|
|
6525
6562
|
"/settings/default-invitation-sender": {
|
|
6526
6563
|
"delete": {
|
|
6527
6564
|
"operationId": "UserSettingsOperations_clearDefaultInvitationSender",
|
|
@@ -9348,6 +9385,206 @@
|
|
|
9348
9385
|
],
|
|
9349
9386
|
"description": "Category override for auto-classification"
|
|
9350
9387
|
},
|
|
9388
|
+
"RemitImap.ClassificationAdapterShape": {
|
|
9389
|
+
"type": "string",
|
|
9390
|
+
"enum": [
|
|
9391
|
+
"DecisionApi",
|
|
9392
|
+
"ChatJsonSchema",
|
|
9393
|
+
"JinaClassify"
|
|
9394
|
+
],
|
|
9395
|
+
"description": "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`."
|
|
9396
|
+
},
|
|
9397
|
+
"RemitImap.ClassificationConfigured": {
|
|
9398
|
+
"type": "object",
|
|
9399
|
+
"required": [
|
|
9400
|
+
"state",
|
|
9401
|
+
"presetId",
|
|
9402
|
+
"model",
|
|
9403
|
+
"baseUrl",
|
|
9404
|
+
"apiKeySaved",
|
|
9405
|
+
"enabled",
|
|
9406
|
+
"dailyLimit",
|
|
9407
|
+
"savedAt"
|
|
9408
|
+
],
|
|
9409
|
+
"properties": {
|
|
9410
|
+
"state": {
|
|
9411
|
+
"type": "string",
|
|
9412
|
+
"enum": [
|
|
9413
|
+
"Configured"
|
|
9414
|
+
]
|
|
9415
|
+
},
|
|
9416
|
+
"presetId": {
|
|
9417
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationPresetId"
|
|
9418
|
+
},
|
|
9419
|
+
"model": {
|
|
9420
|
+
"type": "string"
|
|
9421
|
+
},
|
|
9422
|
+
"baseUrl": {
|
|
9423
|
+
"type": "string"
|
|
9424
|
+
},
|
|
9425
|
+
"apiKeySaved": {
|
|
9426
|
+
"type": "boolean",
|
|
9427
|
+
"description": "Whether an API key is stored for this provider."
|
|
9428
|
+
},
|
|
9429
|
+
"enabled": {
|
|
9430
|
+
"type": "boolean",
|
|
9431
|
+
"description": "Whether classification runs."
|
|
9432
|
+
},
|
|
9433
|
+
"dailyLimit": {
|
|
9434
|
+
"type": "integer",
|
|
9435
|
+
"format": "int32",
|
|
9436
|
+
"description": "The most classification calls per mail account per UTC day."
|
|
9437
|
+
},
|
|
9438
|
+
"savedAt": {
|
|
9439
|
+
"type": "integer",
|
|
9440
|
+
"format": "int64",
|
|
9441
|
+
"description": "When the provider, model, base URL or key was last saved, in epoch milliseconds (UTC)."
|
|
9442
|
+
}
|
|
9443
|
+
},
|
|
9444
|
+
"description": "The saved classification provider. The API key itself is never returned."
|
|
9445
|
+
},
|
|
9446
|
+
"RemitImap.ClassificationNoPrice": {
|
|
9447
|
+
"type": "object",
|
|
9448
|
+
"required": [
|
|
9449
|
+
"state"
|
|
9450
|
+
],
|
|
9451
|
+
"properties": {
|
|
9452
|
+
"state": {
|
|
9453
|
+
"type": "string",
|
|
9454
|
+
"enum": [
|
|
9455
|
+
"NoPrice"
|
|
9456
|
+
]
|
|
9457
|
+
}
|
|
9458
|
+
},
|
|
9459
|
+
"description": "A classification preset with no price to show: self-hosted, or a price the provider sets per model."
|
|
9460
|
+
},
|
|
9461
|
+
"RemitImap.ClassificationNotConfigured": {
|
|
9462
|
+
"type": "object",
|
|
9463
|
+
"required": [
|
|
9464
|
+
"state"
|
|
9465
|
+
],
|
|
9466
|
+
"properties": {
|
|
9467
|
+
"state": {
|
|
9468
|
+
"type": "string",
|
|
9469
|
+
"enum": [
|
|
9470
|
+
"NotConfigured"
|
|
9471
|
+
]
|
|
9472
|
+
}
|
|
9473
|
+
},
|
|
9474
|
+
"description": "No classification provider is saved, so classification is off."
|
|
9475
|
+
},
|
|
9476
|
+
"RemitImap.ClassificationPreset": {
|
|
9477
|
+
"type": "object",
|
|
9478
|
+
"required": [
|
|
9479
|
+
"presetId",
|
|
9480
|
+
"label",
|
|
9481
|
+
"group",
|
|
9482
|
+
"adapterShape",
|
|
9483
|
+
"defaultModel",
|
|
9484
|
+
"needsKey",
|
|
9485
|
+
"price"
|
|
9486
|
+
],
|
|
9487
|
+
"properties": {
|
|
9488
|
+
"presetId": {
|
|
9489
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationPresetId"
|
|
9490
|
+
},
|
|
9491
|
+
"label": {
|
|
9492
|
+
"type": "string"
|
|
9493
|
+
},
|
|
9494
|
+
"group": {
|
|
9495
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationPresetGroup"
|
|
9496
|
+
},
|
|
9497
|
+
"adapterShape": {
|
|
9498
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationAdapterShape"
|
|
9499
|
+
},
|
|
9500
|
+
"defaultBaseUrl": {
|
|
9501
|
+
"type": "string",
|
|
9502
|
+
"description": "The base URL used when the reader leaves it empty. Absent when a save has to name one in `classificationBaseUrl`."
|
|
9503
|
+
},
|
|
9504
|
+
"defaultModel": {
|
|
9505
|
+
"type": "string",
|
|
9506
|
+
"description": "The model used when the reader leaves it empty."
|
|
9507
|
+
},
|
|
9508
|
+
"needsKey": {
|
|
9509
|
+
"type": "boolean",
|
|
9510
|
+
"description": "Whether a save needs `classificationApiKey`."
|
|
9511
|
+
},
|
|
9512
|
+
"price": {
|
|
9513
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationPrice"
|
|
9514
|
+
}
|
|
9515
|
+
},
|
|
9516
|
+
"description": "A classification provider the reader can pick."
|
|
9517
|
+
},
|
|
9518
|
+
"RemitImap.ClassificationPresetGroup": {
|
|
9519
|
+
"type": "string",
|
|
9520
|
+
"enum": [
|
|
9521
|
+
"Hosted",
|
|
9522
|
+
"Custom",
|
|
9523
|
+
"Local"
|
|
9524
|
+
],
|
|
9525
|
+
"description": "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."
|
|
9526
|
+
},
|
|
9527
|
+
"RemitImap.ClassificationPresetId": {
|
|
9528
|
+
"type": "string",
|
|
9529
|
+
"enum": [
|
|
9530
|
+
"Jev",
|
|
9531
|
+
"Jina",
|
|
9532
|
+
"Mistral",
|
|
9533
|
+
"Gemini",
|
|
9534
|
+
"OpenAiCompatible",
|
|
9535
|
+
"Local"
|
|
9536
|
+
],
|
|
9537
|
+
"description": "A classification provider preset: a known provider with its adapter shape, default base URL and default model."
|
|
9538
|
+
},
|
|
9539
|
+
"RemitImap.ClassificationPrice": {
|
|
9540
|
+
"anyOf": [
|
|
9541
|
+
{
|
|
9542
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationPriced"
|
|
9543
|
+
},
|
|
9544
|
+
{
|
|
9545
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationNoPrice"
|
|
9546
|
+
}
|
|
9547
|
+
]
|
|
9548
|
+
},
|
|
9549
|
+
"RemitImap.ClassificationPriced": {
|
|
9550
|
+
"type": "object",
|
|
9551
|
+
"required": [
|
|
9552
|
+
"state",
|
|
9553
|
+
"currency",
|
|
9554
|
+
"perMillionInputTokens"
|
|
9555
|
+
],
|
|
9556
|
+
"properties": {
|
|
9557
|
+
"state": {
|
|
9558
|
+
"type": "string",
|
|
9559
|
+
"enum": [
|
|
9560
|
+
"Priced"
|
|
9561
|
+
]
|
|
9562
|
+
},
|
|
9563
|
+
"currency": {
|
|
9564
|
+
"type": "string",
|
|
9565
|
+
"enum": [
|
|
9566
|
+
"USD"
|
|
9567
|
+
],
|
|
9568
|
+
"description": "ISO 4217 currency of `perMillionInputTokens`."
|
|
9569
|
+
},
|
|
9570
|
+
"perMillionInputTokens": {
|
|
9571
|
+
"type": "number",
|
|
9572
|
+
"format": "double",
|
|
9573
|
+
"description": "Price of one million input tokens. Output tokens are not charged."
|
|
9574
|
+
}
|
|
9575
|
+
},
|
|
9576
|
+
"description": "A classification preset that has a known price per million input tokens."
|
|
9577
|
+
},
|
|
9578
|
+
"RemitImap.ClassificationSettings": {
|
|
9579
|
+
"anyOf": [
|
|
9580
|
+
{
|
|
9581
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationNotConfigured"
|
|
9582
|
+
},
|
|
9583
|
+
{
|
|
9584
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationConfigured"
|
|
9585
|
+
}
|
|
9586
|
+
]
|
|
9587
|
+
},
|
|
9351
9588
|
"RemitImap.ConfigDescriptionResponse": {
|
|
9352
9589
|
"type": "object",
|
|
9353
9590
|
"required": [
|
|
@@ -14296,6 +14533,36 @@
|
|
|
14296
14533
|
}
|
|
14297
14534
|
],
|
|
14298
14535
|
"description": "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`."
|
|
14536
|
+
},
|
|
14537
|
+
"classificationPresetId": {
|
|
14538
|
+
"allOf": [
|
|
14539
|
+
{
|
|
14540
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationPresetId"
|
|
14541
|
+
}
|
|
14542
|
+
],
|
|
14543
|
+
"description": "Save a classification provider. Saving another preset deletes the stored key. Without it, the classification fields below apply to the saved provider."
|
|
14544
|
+
},
|
|
14545
|
+
"classificationModel": {
|
|
14546
|
+
"type": "string",
|
|
14547
|
+
"description": "The model to ask for. Empty means the preset's default model."
|
|
14548
|
+
},
|
|
14549
|
+
"classificationBaseUrl": {
|
|
14550
|
+
"type": "string",
|
|
14551
|
+
"description": "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."
|
|
14552
|
+
},
|
|
14553
|
+
"classificationApiKey": {
|
|
14554
|
+
"type": "string",
|
|
14555
|
+
"description": "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."
|
|
14556
|
+
},
|
|
14557
|
+
"classificationEnabled": {
|
|
14558
|
+
"type": "boolean",
|
|
14559
|
+
"description": "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."
|
|
14560
|
+
},
|
|
14561
|
+
"classificationDailyLimit": {
|
|
14562
|
+
"type": "integer",
|
|
14563
|
+
"format": "int32",
|
|
14564
|
+
"minimum": 1,
|
|
14565
|
+
"description": "The most classification calls per mail account per UTC day. Needs a saved provider."
|
|
14299
14566
|
}
|
|
14300
14567
|
},
|
|
14301
14568
|
"description": "A change to the caller's settings. Every field is optional and absence means untouched."
|
|
@@ -14303,7 +14570,9 @@
|
|
|
14303
14570
|
"RemitImap.UserSettingsResponse": {
|
|
14304
14571
|
"type": "object",
|
|
14305
14572
|
"required": [
|
|
14306
|
-
"defaultInvitationSenderChosen"
|
|
14573
|
+
"defaultInvitationSenderChosen",
|
|
14574
|
+
"classificationPresets",
|
|
14575
|
+
"classification"
|
|
14307
14576
|
],
|
|
14308
14577
|
"properties": {
|
|
14309
14578
|
"defaultInvitationSenderAccountId": {
|
|
@@ -14317,6 +14586,21 @@
|
|
|
14317
14586
|
"defaultInvitationSenderChosen": {
|
|
14318
14587
|
"type": "boolean",
|
|
14319
14588
|
"description": "Whether `defaultInvitationSenderAccountId` is the reader's own choice rather than the account an event is on."
|
|
14589
|
+
},
|
|
14590
|
+
"classificationPresets": {
|
|
14591
|
+
"type": "array",
|
|
14592
|
+
"items": {
|
|
14593
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationPreset"
|
|
14594
|
+
},
|
|
14595
|
+
"description": "Every classification provider the reader can pick."
|
|
14596
|
+
},
|
|
14597
|
+
"classification": {
|
|
14598
|
+
"allOf": [
|
|
14599
|
+
{
|
|
14600
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationSettings"
|
|
14601
|
+
}
|
|
14602
|
+
],
|
|
14603
|
+
"description": "The saved classification provider, or `NotConfigured`."
|
|
14320
14604
|
}
|
|
14321
14605
|
},
|
|
14322
14606
|
"description": "The caller's own settings: choices that belong to the person rather than to\none mail account. Each field is stored as an `AccountSetting` row of the\naccount config and read back here, so a setting added later is one more\nfield on this resource rather than one more operation."
|
package/package.json
CHANGED