@remit/api-openapi-spec 0.0.85 → 0.0.86
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 +211 -0
- package/package.json +1 -1
- package/request-validators.mjs +4 -3
package/openapi.json
CHANGED
|
@@ -6559,6 +6559,63 @@
|
|
|
6559
6559
|
}
|
|
6560
6560
|
}
|
|
6561
6561
|
},
|
|
6562
|
+
"/settings/classification-test": {
|
|
6563
|
+
"post": {
|
|
6564
|
+
"operationId": "UserSettingsOperations_testClassificationProvider",
|
|
6565
|
+
"description": "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.",
|
|
6566
|
+
"parameters": [],
|
|
6567
|
+
"responses": {
|
|
6568
|
+
"200": {
|
|
6569
|
+
"description": "The request has succeeded.",
|
|
6570
|
+
"content": {
|
|
6571
|
+
"application/json": {
|
|
6572
|
+
"schema": {
|
|
6573
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationTestResponse"
|
|
6574
|
+
}
|
|
6575
|
+
}
|
|
6576
|
+
}
|
|
6577
|
+
},
|
|
6578
|
+
"400": {
|
|
6579
|
+
"description": "The request was refused as malformed or contradictory. `code` is\n`invalid_request` where nothing more specific is known, and the refusal's own\ntoken where there is one.\n\nThe calendar surface answers with the reason it read the request by:\n`invalid_window`, `invalid_scope`, `invalid_url_segment`, `url_segment_taken`,\n`unknown_time_zone` and `default_calendar_undeletable` on the collection and\nthe query, and, for a VCALENDAR it could not accept,\n`malformed_icalendar`, `not_a_calendar`, `unsupported_component`, `no_event`,\n`no_master_event`, `multiple_master_events`, `missing_uid`, `mismatched_uid`,\n`missing_dt_start`, `backwards_end`, `invalid_date_time`,\n`invalid_recurrence_rule`, `missing_recurrence_id`, `not_recurring`,\n`unknown_occurrence` and `unmovable_recurrence_rule`. The outbox answers `mail_sync_off` to a\nsend from an account whose `syncedServices` leave out `Mail`, with the\naccount in `details.accountId`.\n\n`errors` is present only when the request failed schema validation before any\nhandler ran, and names every field that was refused.",
|
|
6580
|
+
"content": {
|
|
6581
|
+
"application/json": {
|
|
6582
|
+
"schema": {
|
|
6583
|
+
"$ref": "#/components/schemas/ValidationError"
|
|
6584
|
+
}
|
|
6585
|
+
}
|
|
6586
|
+
}
|
|
6587
|
+
},
|
|
6588
|
+
"401": {
|
|
6589
|
+
"description": "The request carried no usable credential. `code` is `unauthorized`.",
|
|
6590
|
+
"content": {
|
|
6591
|
+
"application/json": {
|
|
6592
|
+
"schema": {
|
|
6593
|
+
"$ref": "#/components/schemas/ApiError"
|
|
6594
|
+
}
|
|
6595
|
+
}
|
|
6596
|
+
}
|
|
6597
|
+
}
|
|
6598
|
+
},
|
|
6599
|
+
"requestBody": {
|
|
6600
|
+
"required": true,
|
|
6601
|
+
"content": {
|
|
6602
|
+
"application/json": {
|
|
6603
|
+
"schema": {
|
|
6604
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationTestInput"
|
|
6605
|
+
}
|
|
6606
|
+
}
|
|
6607
|
+
}
|
|
6608
|
+
},
|
|
6609
|
+
"x-amazon-apigateway-integration": {
|
|
6610
|
+
"type": "aws_proxy",
|
|
6611
|
+
"httpMethod": "POST",
|
|
6612
|
+
"passthroughBehavior": "when_no_match",
|
|
6613
|
+
"uri": {
|
|
6614
|
+
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations"
|
|
6615
|
+
}
|
|
6616
|
+
}
|
|
6617
|
+
}
|
|
6618
|
+
},
|
|
6562
6619
|
"/settings/default-invitation-sender": {
|
|
6563
6620
|
"delete": {
|
|
6564
6621
|
"operationId": "UserSettingsOperations_clearDefaultInvitationSender",
|
|
@@ -9443,6 +9500,44 @@
|
|
|
9443
9500
|
},
|
|
9444
9501
|
"description": "The saved classification provider. The API key itself is never returned."
|
|
9445
9502
|
},
|
|
9503
|
+
"RemitImap.ClassificationFailureKind": {
|
|
9504
|
+
"type": "string",
|
|
9505
|
+
"enum": [
|
|
9506
|
+
"Unauthorized",
|
|
9507
|
+
"ModelNotFound",
|
|
9508
|
+
"RateLimited",
|
|
9509
|
+
"Rejected",
|
|
9510
|
+
"ProviderError",
|
|
9511
|
+
"Unreachable",
|
|
9512
|
+
"TimedOut",
|
|
9513
|
+
"Unparseable"
|
|
9514
|
+
],
|
|
9515
|
+
"description": "Why a classification provider call gave no usable answer."
|
|
9516
|
+
},
|
|
9517
|
+
"RemitImap.ClassificationField": {
|
|
9518
|
+
"type": "string",
|
|
9519
|
+
"enum": [
|
|
9520
|
+
"ApiKey",
|
|
9521
|
+
"Model",
|
|
9522
|
+
"BaseUrl"
|
|
9523
|
+
],
|
|
9524
|
+
"description": "The classification provider form field a failure points at."
|
|
9525
|
+
},
|
|
9526
|
+
"RemitImap.ClassificationLabel": {
|
|
9527
|
+
"type": "string",
|
|
9528
|
+
"enum": [
|
|
9529
|
+
"Spam",
|
|
9530
|
+
"Phishing",
|
|
9531
|
+
"Priority",
|
|
9532
|
+
"Personal",
|
|
9533
|
+
"Newsletter",
|
|
9534
|
+
"Marketing",
|
|
9535
|
+
"Automated",
|
|
9536
|
+
"Transactional",
|
|
9537
|
+
"Social"
|
|
9538
|
+
],
|
|
9539
|
+
"description": "A label a classification provider picks for a message: the junk verdicts, priority, and the message categories."
|
|
9540
|
+
},
|
|
9446
9541
|
"RemitImap.ClassificationNoPrice": {
|
|
9447
9542
|
"type": "object",
|
|
9448
9543
|
"required": [
|
|
@@ -9585,6 +9680,122 @@
|
|
|
9585
9680
|
}
|
|
9586
9681
|
]
|
|
9587
9682
|
},
|
|
9683
|
+
"RemitImap.ClassificationTestFailed": {
|
|
9684
|
+
"type": "object",
|
|
9685
|
+
"required": [
|
|
9686
|
+
"state",
|
|
9687
|
+
"latencyMs",
|
|
9688
|
+
"kind",
|
|
9689
|
+
"fix"
|
|
9690
|
+
],
|
|
9691
|
+
"properties": {
|
|
9692
|
+
"state": {
|
|
9693
|
+
"type": "string",
|
|
9694
|
+
"enum": [
|
|
9695
|
+
"Failed"
|
|
9696
|
+
]
|
|
9697
|
+
},
|
|
9698
|
+
"latencyMs": {
|
|
9699
|
+
"type": "integer",
|
|
9700
|
+
"format": "int32",
|
|
9701
|
+
"description": "How long the provider call took, in milliseconds."
|
|
9702
|
+
},
|
|
9703
|
+
"status": {
|
|
9704
|
+
"type": "integer",
|
|
9705
|
+
"format": "int32",
|
|
9706
|
+
"description": "The HTTP status the provider answered with. Absent when no answer arrived."
|
|
9707
|
+
},
|
|
9708
|
+
"kind": {
|
|
9709
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationFailureKind"
|
|
9710
|
+
},
|
|
9711
|
+
"field": {
|
|
9712
|
+
"allOf": [
|
|
9713
|
+
{
|
|
9714
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationField"
|
|
9715
|
+
}
|
|
9716
|
+
],
|
|
9717
|
+
"description": "The form field to change. Absent when no field can fix it: a rate limit or a provider error."
|
|
9718
|
+
},
|
|
9719
|
+
"fix": {
|
|
9720
|
+
"type": "string",
|
|
9721
|
+
"description": "What to change so the next test passes."
|
|
9722
|
+
}
|
|
9723
|
+
},
|
|
9724
|
+
"description": "The provider call gave no usable answer."
|
|
9725
|
+
},
|
|
9726
|
+
"RemitImap.ClassificationTestInput": {
|
|
9727
|
+
"type": "object",
|
|
9728
|
+
"required": [
|
|
9729
|
+
"presetId",
|
|
9730
|
+
"model",
|
|
9731
|
+
"baseUrl",
|
|
9732
|
+
"apiKey"
|
|
9733
|
+
],
|
|
9734
|
+
"properties": {
|
|
9735
|
+
"presetId": {
|
|
9736
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationPresetId"
|
|
9737
|
+
},
|
|
9738
|
+
"model": {
|
|
9739
|
+
"type": "string",
|
|
9740
|
+
"description": "The model to ask for. Empty means the preset's default model."
|
|
9741
|
+
},
|
|
9742
|
+
"baseUrl": {
|
|
9743
|
+
"type": "string",
|
|
9744
|
+
"description": "The http or https base URL to call. Empty means the preset's default base URL."
|
|
9745
|
+
},
|
|
9746
|
+
"apiKey": {
|
|
9747
|
+
"type": "string",
|
|
9748
|
+
"description": "The provider's API key. Empty means the key saved for this preset."
|
|
9749
|
+
}
|
|
9750
|
+
},
|
|
9751
|
+
"description": "The classification provider form as it stands, saved or not."
|
|
9752
|
+
},
|
|
9753
|
+
"RemitImap.ClassificationTestPassed": {
|
|
9754
|
+
"type": "object",
|
|
9755
|
+
"required": [
|
|
9756
|
+
"state",
|
|
9757
|
+
"latencyMs",
|
|
9758
|
+
"label",
|
|
9759
|
+
"confidence"
|
|
9760
|
+
],
|
|
9761
|
+
"properties": {
|
|
9762
|
+
"state": {
|
|
9763
|
+
"type": "string",
|
|
9764
|
+
"enum": [
|
|
9765
|
+
"Passed"
|
|
9766
|
+
]
|
|
9767
|
+
},
|
|
9768
|
+
"latencyMs": {
|
|
9769
|
+
"type": "integer",
|
|
9770
|
+
"format": "int32",
|
|
9771
|
+
"description": "How long the provider call took, in milliseconds."
|
|
9772
|
+
},
|
|
9773
|
+
"label": {
|
|
9774
|
+
"allOf": [
|
|
9775
|
+
{
|
|
9776
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationLabel"
|
|
9777
|
+
}
|
|
9778
|
+
],
|
|
9779
|
+
"description": "The label the provider chose for the sample message."
|
|
9780
|
+
},
|
|
9781
|
+
"confidence": {
|
|
9782
|
+
"type": "number",
|
|
9783
|
+
"format": "double",
|
|
9784
|
+
"description": "The provider's confidence in `label`, between 0 and 1."
|
|
9785
|
+
}
|
|
9786
|
+
},
|
|
9787
|
+
"description": "The provider classified the sample message."
|
|
9788
|
+
},
|
|
9789
|
+
"RemitImap.ClassificationTestResponse": {
|
|
9790
|
+
"anyOf": [
|
|
9791
|
+
{
|
|
9792
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationTestPassed"
|
|
9793
|
+
},
|
|
9794
|
+
{
|
|
9795
|
+
"$ref": "#/components/schemas/RemitImap.ClassificationTestFailed"
|
|
9796
|
+
}
|
|
9797
|
+
]
|
|
9798
|
+
},
|
|
9588
9799
|
"RemitImap.ConfigDescriptionResponse": {
|
|
9589
9800
|
"type": "object",
|
|
9590
9801
|
"required": [
|
package/package.json
CHANGED