@remit/api-openapi-spec 0.0.24 → 0.0.25
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 +377 -1
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -2371,6 +2371,136 @@
|
|
|
2371
2371
|
}
|
|
2372
2372
|
}
|
|
2373
2373
|
},
|
|
2374
|
+
"/outbox/{outboxMessageId}/attachments": {
|
|
2375
|
+
"post": {
|
|
2376
|
+
"operationId": "OutboxDetailOperations_mintOutboxAttachment",
|
|
2377
|
+
"description": "Reserve room on a draft for a file, and get somewhere to put it",
|
|
2378
|
+
"parameters": [
|
|
2379
|
+
{
|
|
2380
|
+
"name": "outboxMessageId",
|
|
2381
|
+
"in": "path",
|
|
2382
|
+
"required": true,
|
|
2383
|
+
"schema": {
|
|
2384
|
+
"$ref": "#/components/schemas/UUID"
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
],
|
|
2388
|
+
"responses": {
|
|
2389
|
+
"200": {
|
|
2390
|
+
"description": "The request has succeeded.",
|
|
2391
|
+
"content": {
|
|
2392
|
+
"application/json": {
|
|
2393
|
+
"schema": {
|
|
2394
|
+
"$ref": "#/components/schemas/RemitImap.MintOutboxAttachmentResponse"
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
},
|
|
2399
|
+
"400": {
|
|
2400
|
+
"description": "Refusal response for an attachment",
|
|
2401
|
+
"content": {
|
|
2402
|
+
"application/json": {
|
|
2403
|
+
"schema": {
|
|
2404
|
+
"$ref": "#/components/schemas/RemitImap.OutboxAttachmentRejection"
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
},
|
|
2409
|
+
"413": {
|
|
2410
|
+
"description": "Refusal response for an attachment",
|
|
2411
|
+
"content": {
|
|
2412
|
+
"application/json": {
|
|
2413
|
+
"schema": {
|
|
2414
|
+
"$ref": "#/components/schemas/RemitImap.OutboxAttachmentRejection"
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
},
|
|
2420
|
+
"requestBody": {
|
|
2421
|
+
"required": true,
|
|
2422
|
+
"content": {
|
|
2423
|
+
"application/json": {
|
|
2424
|
+
"schema": {
|
|
2425
|
+
"$ref": "#/components/schemas/RemitImap.MintOutboxAttachmentInput"
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
},
|
|
2430
|
+
"x-amazon-apigateway-integration": {
|
|
2431
|
+
"type": "aws_proxy",
|
|
2432
|
+
"httpMethod": "POST",
|
|
2433
|
+
"passthroughBehavior": "when_no_match",
|
|
2434
|
+
"uri": {
|
|
2435
|
+
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations"
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
},
|
|
2440
|
+
"/outbox/{outboxMessageId}/attachments/{outboxAttachmentId}/complete": {
|
|
2441
|
+
"post": {
|
|
2442
|
+
"operationId": "OutboxAttachmentOperations_completeOutboxAttachment",
|
|
2443
|
+
"description": "Confirm an uploaded file against the object storage now holds",
|
|
2444
|
+
"parameters": [
|
|
2445
|
+
{
|
|
2446
|
+
"name": "outboxMessageId",
|
|
2447
|
+
"in": "path",
|
|
2448
|
+
"required": true,
|
|
2449
|
+
"schema": {
|
|
2450
|
+
"$ref": "#/components/schemas/UUID"
|
|
2451
|
+
}
|
|
2452
|
+
},
|
|
2453
|
+
{
|
|
2454
|
+
"name": "outboxAttachmentId",
|
|
2455
|
+
"in": "path",
|
|
2456
|
+
"required": true,
|
|
2457
|
+
"schema": {
|
|
2458
|
+
"$ref": "#/components/schemas/UUID"
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
],
|
|
2462
|
+
"responses": {
|
|
2463
|
+
"200": {
|
|
2464
|
+
"description": "The request has succeeded.",
|
|
2465
|
+
"content": {
|
|
2466
|
+
"application/json": {
|
|
2467
|
+
"schema": {
|
|
2468
|
+
"$ref": "#/components/schemas/RemitImap.OutboxAttachmentResponse"
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
},
|
|
2473
|
+
"400": {
|
|
2474
|
+
"description": "Refusal response for an attachment",
|
|
2475
|
+
"content": {
|
|
2476
|
+
"application/json": {
|
|
2477
|
+
"schema": {
|
|
2478
|
+
"$ref": "#/components/schemas/RemitImap.OutboxAttachmentRejection"
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
},
|
|
2483
|
+
"413": {
|
|
2484
|
+
"description": "Refusal response for an attachment",
|
|
2485
|
+
"content": {
|
|
2486
|
+
"application/json": {
|
|
2487
|
+
"schema": {
|
|
2488
|
+
"$ref": "#/components/schemas/RemitImap.OutboxAttachmentRejection"
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2493
|
+
},
|
|
2494
|
+
"x-amazon-apigateway-integration": {
|
|
2495
|
+
"type": "aws_proxy",
|
|
2496
|
+
"httpMethod": "POST",
|
|
2497
|
+
"passthroughBehavior": "when_no_match",
|
|
2498
|
+
"uri": {
|
|
2499
|
+
"Fn::Sub": "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations"
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
},
|
|
2374
2504
|
"/outbox/{outboxMessageId}/send": {
|
|
2375
2505
|
"post": {
|
|
2376
2506
|
"operationId": "OutboxDetailOperations_sendOutboxMessage",
|
|
@@ -5187,6 +5317,105 @@
|
|
|
5187
5317
|
},
|
|
5188
5318
|
"description": "Core message metadata for API responses"
|
|
5189
5319
|
},
|
|
5320
|
+
"RemitImap.MintOutboxAttachmentInput": {
|
|
5321
|
+
"type": "object",
|
|
5322
|
+
"required": [
|
|
5323
|
+
"filename",
|
|
5324
|
+
"contentType",
|
|
5325
|
+
"sizeBytes"
|
|
5326
|
+
],
|
|
5327
|
+
"properties": {
|
|
5328
|
+
"filename": {
|
|
5329
|
+
"allOf": [
|
|
5330
|
+
{
|
|
5331
|
+
"$ref": "#/components/schemas/String256"
|
|
5332
|
+
}
|
|
5333
|
+
],
|
|
5334
|
+
"description": "Filename as the sender picked it. Sanitized server-side."
|
|
5335
|
+
},
|
|
5336
|
+
"contentType": {
|
|
5337
|
+
"allOf": [
|
|
5338
|
+
{
|
|
5339
|
+
"$ref": "#/components/schemas/String256"
|
|
5340
|
+
}
|
|
5341
|
+
],
|
|
5342
|
+
"description": "Media type the browser reported. Recorded, never trusted for rendering."
|
|
5343
|
+
},
|
|
5344
|
+
"sizeBytes": {
|
|
5345
|
+
"type": "integer",
|
|
5346
|
+
"format": "int64",
|
|
5347
|
+
"minimum": 1,
|
|
5348
|
+
"description": "Exact size of the file. The upload is bound to this number."
|
|
5349
|
+
}
|
|
5350
|
+
},
|
|
5351
|
+
"description": "What the client intends to attach, before any bytes move"
|
|
5352
|
+
},
|
|
5353
|
+
"RemitImap.MintOutboxAttachmentResponse": {
|
|
5354
|
+
"type": "object",
|
|
5355
|
+
"required": [
|
|
5356
|
+
"outboxAttachmentId",
|
|
5357
|
+
"outboxMessageId",
|
|
5358
|
+
"filename",
|
|
5359
|
+
"contentType",
|
|
5360
|
+
"sizeBytes",
|
|
5361
|
+
"uploadUrl",
|
|
5362
|
+
"uploadExpiresAt"
|
|
5363
|
+
],
|
|
5364
|
+
"properties": {
|
|
5365
|
+
"outboxAttachmentId": {
|
|
5366
|
+
"allOf": [
|
|
5367
|
+
{
|
|
5368
|
+
"$ref": "#/components/schemas/UUID"
|
|
5369
|
+
}
|
|
5370
|
+
],
|
|
5371
|
+
"description": "Primary identifier, and the name the completion call uses"
|
|
5372
|
+
},
|
|
5373
|
+
"outboxMessageId": {
|
|
5374
|
+
"allOf": [
|
|
5375
|
+
{
|
|
5376
|
+
"$ref": "#/components/schemas/UUID"
|
|
5377
|
+
}
|
|
5378
|
+
],
|
|
5379
|
+
"description": "Draft the file is reserved against"
|
|
5380
|
+
},
|
|
5381
|
+
"filename": {
|
|
5382
|
+
"allOf": [
|
|
5383
|
+
{
|
|
5384
|
+
"$ref": "#/components/schemas/String256"
|
|
5385
|
+
}
|
|
5386
|
+
],
|
|
5387
|
+
"description": "Sanitized filename that will appear on the sent message"
|
|
5388
|
+
},
|
|
5389
|
+
"contentType": {
|
|
5390
|
+
"allOf": [
|
|
5391
|
+
{
|
|
5392
|
+
"$ref": "#/components/schemas/String256"
|
|
5393
|
+
}
|
|
5394
|
+
],
|
|
5395
|
+
"description": "Normalized media type"
|
|
5396
|
+
},
|
|
5397
|
+
"sizeBytes": {
|
|
5398
|
+
"type": "integer",
|
|
5399
|
+
"format": "int64",
|
|
5400
|
+
"minimum": 1,
|
|
5401
|
+
"description": "Reserved size. The upload must carry exactly this many bytes."
|
|
5402
|
+
},
|
|
5403
|
+
"uploadUrl": {
|
|
5404
|
+
"allOf": [
|
|
5405
|
+
{
|
|
5406
|
+
"$ref": "#/components/schemas/String2048"
|
|
5407
|
+
}
|
|
5408
|
+
],
|
|
5409
|
+
"description": "Where to PUT the raw bytes. Single use, one attachment, expires."
|
|
5410
|
+
},
|
|
5411
|
+
"uploadExpiresAt": {
|
|
5412
|
+
"type": "integer",
|
|
5413
|
+
"format": "int64",
|
|
5414
|
+
"description": "When the reservation and the upload URL both lapse"
|
|
5415
|
+
}
|
|
5416
|
+
},
|
|
5417
|
+
"description": "A reservation and somewhere to put the bytes.\n\n`uploadUrl` is opaque: on a hosted deployment it addresses block storage\ndirectly and the bytes never traverse this API, on a self-hosted one it\naddresses this deployment's own upload route. A client PUTs the file to it\neither way and cannot tell which it received."
|
|
5418
|
+
},
|
|
5190
5419
|
"RemitImap.MoveMessagesInput": {
|
|
5191
5420
|
"type": "object",
|
|
5192
5421
|
"required": [
|
|
@@ -5482,6 +5711,134 @@
|
|
|
5482
5711
|
},
|
|
5483
5712
|
"description": "Response body for POST /accounts/{accountId}/organize/preview — the messages the same matcher would apply the action to, without applying it. Bounded server-side."
|
|
5484
5713
|
},
|
|
5714
|
+
"RemitImap.OutboxAttachmentRejection": {
|
|
5715
|
+
"type": "object",
|
|
5716
|
+
"required": [
|
|
5717
|
+
"reason",
|
|
5718
|
+
"message",
|
|
5719
|
+
"limitBytes",
|
|
5720
|
+
"usedBytes"
|
|
5721
|
+
],
|
|
5722
|
+
"properties": {
|
|
5723
|
+
"reason": {
|
|
5724
|
+
"allOf": [
|
|
5725
|
+
{
|
|
5726
|
+
"$ref": "#/components/schemas/RemitImap.OutboxAttachmentRejectionReason"
|
|
5727
|
+
}
|
|
5728
|
+
],
|
|
5729
|
+
"description": "Machine-readable reason"
|
|
5730
|
+
},
|
|
5731
|
+
"message": {
|
|
5732
|
+
"allOf": [
|
|
5733
|
+
{
|
|
5734
|
+
"$ref": "#/components/schemas/String512"
|
|
5735
|
+
}
|
|
5736
|
+
],
|
|
5737
|
+
"description": "Sentence naming the file, its size and the cap"
|
|
5738
|
+
},
|
|
5739
|
+
"limitBytes": {
|
|
5740
|
+
"type": "integer",
|
|
5741
|
+
"format": "int64",
|
|
5742
|
+
"minimum": 0,
|
|
5743
|
+
"description": "Total bytes one message may carry"
|
|
5744
|
+
},
|
|
5745
|
+
"usedBytes": {
|
|
5746
|
+
"type": "integer",
|
|
5747
|
+
"format": "int64",
|
|
5748
|
+
"minimum": 0,
|
|
5749
|
+
"description": "Bytes already spoken for on this draft, uploaded or merely reserved"
|
|
5750
|
+
}
|
|
5751
|
+
},
|
|
5752
|
+
"description": "A file the server refused, with everything the composer needs to say why"
|
|
5753
|
+
},
|
|
5754
|
+
"RemitImap.OutboxAttachmentRejectionReason": {
|
|
5755
|
+
"type": "string",
|
|
5756
|
+
"enum": [
|
|
5757
|
+
"EmptyFile",
|
|
5758
|
+
"UnusableFilename",
|
|
5759
|
+
"FileTooLarge",
|
|
5760
|
+
"MessageTooLarge",
|
|
5761
|
+
"TooManyAttachments",
|
|
5762
|
+
"ReservationExpired",
|
|
5763
|
+
"UploadMissing",
|
|
5764
|
+
"SizeMismatch"
|
|
5765
|
+
],
|
|
5766
|
+
"description": "Why the server refused to reserve, or to accept, a file for a draft.\n\nClosed rather than free text: the composer renders its own copy for each\nmember (naming the file, the size and the cap), so a refusal must be\ndistinguishable from a network failure without parsing prose."
|
|
5767
|
+
},
|
|
5768
|
+
"RemitImap.OutboxAttachmentResponse": {
|
|
5769
|
+
"type": "object",
|
|
5770
|
+
"required": [
|
|
5771
|
+
"outboxAttachmentId",
|
|
5772
|
+
"outboxMessageId",
|
|
5773
|
+
"filename",
|
|
5774
|
+
"contentType",
|
|
5775
|
+
"sizeBytes",
|
|
5776
|
+
"state"
|
|
5777
|
+
],
|
|
5778
|
+
"properties": {
|
|
5779
|
+
"outboxAttachmentId": {
|
|
5780
|
+
"allOf": [
|
|
5781
|
+
{
|
|
5782
|
+
"$ref": "#/components/schemas/UUID"
|
|
5783
|
+
}
|
|
5784
|
+
],
|
|
5785
|
+
"description": "Primary identifier",
|
|
5786
|
+
"readOnly": true
|
|
5787
|
+
},
|
|
5788
|
+
"outboxMessageId": {
|
|
5789
|
+
"allOf": [
|
|
5790
|
+
{
|
|
5791
|
+
"$ref": "#/components/schemas/UUID"
|
|
5792
|
+
}
|
|
5793
|
+
],
|
|
5794
|
+
"description": "Draft this file belongs to",
|
|
5795
|
+
"readOnly": true
|
|
5796
|
+
},
|
|
5797
|
+
"filename": {
|
|
5798
|
+
"allOf": [
|
|
5799
|
+
{
|
|
5800
|
+
"$ref": "#/components/schemas/String256"
|
|
5801
|
+
}
|
|
5802
|
+
],
|
|
5803
|
+
"description": "Filename as it will appear on the sent message, sanitized server-side",
|
|
5804
|
+
"readOnly": true
|
|
5805
|
+
},
|
|
5806
|
+
"contentType": {
|
|
5807
|
+
"allOf": [
|
|
5808
|
+
{
|
|
5809
|
+
"$ref": "#/components/schemas/String256"
|
|
5810
|
+
}
|
|
5811
|
+
],
|
|
5812
|
+
"description": "Media type recorded at upload. Never trusted for rendering.",
|
|
5813
|
+
"readOnly": true
|
|
5814
|
+
},
|
|
5815
|
+
"sizeBytes": {
|
|
5816
|
+
"type": "integer",
|
|
5817
|
+
"format": "int64",
|
|
5818
|
+
"minimum": 0,
|
|
5819
|
+
"description": "Bytes claimed at reservation, confirmed against storage once stored",
|
|
5820
|
+
"readOnly": true
|
|
5821
|
+
},
|
|
5822
|
+
"state": {
|
|
5823
|
+
"allOf": [
|
|
5824
|
+
{
|
|
5825
|
+
"$ref": "#/components/schemas/RemitImap.OutboxAttachmentState"
|
|
5826
|
+
}
|
|
5827
|
+
],
|
|
5828
|
+
"description": "Whether the bytes have arrived",
|
|
5829
|
+
"readOnly": true
|
|
5830
|
+
}
|
|
5831
|
+
},
|
|
5832
|
+
"description": "A file on a draft, as the composer sees it"
|
|
5833
|
+
},
|
|
5834
|
+
"RemitImap.OutboxAttachmentState": {
|
|
5835
|
+
"type": "string",
|
|
5836
|
+
"enum": [
|
|
5837
|
+
"Pending",
|
|
5838
|
+
"Stored"
|
|
5839
|
+
],
|
|
5840
|
+
"description": "Where an attachment is between being promised and being sendable.\n\nThere is no third state and no absence: a row exists from the moment room is\nclaimed, so the cap can be enforced against rows in one transaction rather\nthan against bytes that may or may not have landed yet."
|
|
5841
|
+
},
|
|
5485
5842
|
"RemitImap.OutboxMessageResponse": {
|
|
5486
5843
|
"type": "object",
|
|
5487
5844
|
"required": [
|
|
@@ -5494,7 +5851,8 @@
|
|
|
5494
5851
|
"references",
|
|
5495
5852
|
"status",
|
|
5496
5853
|
"createdAt",
|
|
5497
|
-
"updatedAt"
|
|
5854
|
+
"updatedAt",
|
|
5855
|
+
"attachments"
|
|
5498
5856
|
],
|
|
5499
5857
|
"properties": {
|
|
5500
5858
|
"outboxMessageId": {
|
|
@@ -5609,6 +5967,13 @@
|
|
|
5609
5967
|
"type": "integer",
|
|
5610
5968
|
"format": "int64",
|
|
5611
5969
|
"readOnly": true
|
|
5970
|
+
},
|
|
5971
|
+
"attachments": {
|
|
5972
|
+
"type": "array",
|
|
5973
|
+
"items": {
|
|
5974
|
+
"$ref": "#/components/schemas/RemitImap.OutboxAttachmentResponse"
|
|
5975
|
+
},
|
|
5976
|
+
"description": "Files on this message. Empty when it carries none."
|
|
5612
5977
|
}
|
|
5613
5978
|
},
|
|
5614
5979
|
"description": "Outbox message response"
|
|
@@ -7044,6 +7409,13 @@
|
|
|
7044
7409
|
"RemitImap.UpdateOutboxMessageInput": {
|
|
7045
7410
|
"type": "object",
|
|
7046
7411
|
"properties": {
|
|
7412
|
+
"attachmentIds": {
|
|
7413
|
+
"type": "array",
|
|
7414
|
+
"items": {
|
|
7415
|
+
"$ref": "#/components/schemas/UUID"
|
|
7416
|
+
},
|
|
7417
|
+
"description": "The files this draft keeps. Anything left out is removed with its bytes."
|
|
7418
|
+
},
|
|
7047
7419
|
"toAddresses": {
|
|
7048
7420
|
"type": "array",
|
|
7049
7421
|
"items": {
|
|
@@ -7227,6 +7599,10 @@
|
|
|
7227
7599
|
"type": "string",
|
|
7228
7600
|
"maxLength": 140
|
|
7229
7601
|
},
|
|
7602
|
+
"String2048": {
|
|
7603
|
+
"type": "string",
|
|
7604
|
+
"maxLength": 2048
|
|
7605
|
+
},
|
|
7230
7606
|
"String256": {
|
|
7231
7607
|
"type": "string",
|
|
7232
7608
|
"maxLength": 256
|