@celigo/api-specs 0.2.202 → 0.2.203
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/dist/agent.yml +80 -13
- package/dist/editransaction.yml +534 -5
- package/dist/export.yml +17 -6
- package/dist/filedefinitionrules.yml +98 -21
- package/dist/fileserver.yml +615 -101
- package/dist/filestorage.yml +753 -0
- package/dist/flow.yml +308 -23
- package/dist/job.yml +71 -32
- package/dist/processor.yml +93 -2
- package/dist/tool.yml +57 -12
- package/package.json +1 -1
- package/schemas.json +1 -1
|
@@ -21,8 +21,10 @@ tags:
|
|
|
21
21
|
description: |-
|
|
22
22
|
Submit an EDI specification PDF (X12 or EDIFACT) and receive parsing
|
|
23
23
|
and/or generation File Definition Rules JSON, generated asynchronously.
|
|
24
|
-
Submit endpoints
|
|
25
|
-
|
|
24
|
+
Submit endpoints take the PDF as a `multipart/form-data` file part
|
|
25
|
+
(or the legacy base64 JSON body) and return a `requestId` immediately
|
|
26
|
+
(202); poll the matching GET endpoint until the job reaches
|
|
27
|
+
`completed` or `failed`.
|
|
26
28
|
Job records expire 24 hours after submission. Submissions are
|
|
27
29
|
rate-limited per caller (10 per hour, with an administrator bypass);
|
|
28
30
|
the document-types catalog allows 100 per hour and 10 per 60 seconds.
|
|
@@ -32,7 +34,7 @@ tags:
|
|
|
32
34
|
|
|
33
35
|
## File definition rules schemas
|
|
34
36
|
|
|
35
|
-
{% openapi-schemas spec="filedefinitionrules" schemas="FdrSubmitRequest,FileDefinitionGenerationJob,FileDefinitionParsingJob" grouped="true" %}
|
|
37
|
+
{% openapi-schemas spec="filedefinitionrules" schemas="FdrSubmitUpload,FdrSubmitRequest,FileDefinitionGenerationJob,FileDefinitionParsingJob" grouped="true" %}
|
|
36
38
|
paths:
|
|
37
39
|
/v1/filedefinitionrules/generate:
|
|
38
40
|
post:
|
|
@@ -46,11 +48,18 @@ paths:
|
|
|
46
48
|
artifacts from the supplied EDI specification PDF. Returns a
|
|
47
49
|
`requestId` immediately; poll
|
|
48
50
|
`GET /v1/filedefinitionrules/generate/{requestId}` for status and
|
|
49
|
-
results.
|
|
50
|
-
|
|
51
|
+
results. Upload the PDF as a `multipart/form-data` file part; the
|
|
52
|
+
base64 JSON body is still accepted. Rate-limited to 10 submissions per
|
|
53
|
+
caller per hour (administrators bypass the limit).
|
|
51
54
|
requestBody:
|
|
52
55
|
required: true
|
|
53
56
|
content:
|
|
57
|
+
multipart/form-data:
|
|
58
|
+
schema:
|
|
59
|
+
$ref: '#/components/schemas/FdrSubmitUpload'
|
|
60
|
+
encoding:
|
|
61
|
+
pdf:
|
|
62
|
+
contentType: application/pdf
|
|
54
63
|
application/json:
|
|
55
64
|
schema:
|
|
56
65
|
$ref: '#/components/schemas/FdrSubmitRequest'
|
|
@@ -179,11 +188,18 @@ paths:
|
|
|
179
188
|
artifact) from the supplied EDI specification PDF. Returns a
|
|
180
189
|
`requestId` immediately; poll
|
|
181
190
|
`GET /v1/filedefinitionrules/parse/{requestId}` for status and
|
|
182
|
-
results.
|
|
183
|
-
|
|
191
|
+
results. Upload the PDF as a `multipart/form-data` file part; the
|
|
192
|
+
base64 JSON body is still accepted. Rate-limited to 10 submissions per
|
|
193
|
+
caller per hour (administrators bypass the limit).
|
|
184
194
|
requestBody:
|
|
185
195
|
required: true
|
|
186
196
|
content:
|
|
197
|
+
multipart/form-data:
|
|
198
|
+
schema:
|
|
199
|
+
$ref: '#/components/schemas/FdrSubmitUpload'
|
|
200
|
+
encoding:
|
|
201
|
+
pdf:
|
|
202
|
+
contentType: application/pdf
|
|
187
203
|
application/json:
|
|
188
204
|
schema:
|
|
189
205
|
$ref: '#/components/schemas/FdrSubmitRequest'
|
|
@@ -349,20 +365,52 @@ components:
|
|
|
349
365
|
type: http
|
|
350
366
|
scheme: bearer
|
|
351
367
|
schemas:
|
|
368
|
+
FdrSubmitUpload:
|
|
369
|
+
type: object
|
|
370
|
+
additionalProperties: false
|
|
371
|
+
required:
|
|
372
|
+
- pdf
|
|
373
|
+
- documentType
|
|
374
|
+
description: |-
|
|
375
|
+
Multipart form for submitting an EDI specification PDF. Send exactly
|
|
376
|
+
these two parts; any other part fails with `400 INVALID_REQUEST`.
|
|
377
|
+
properties:
|
|
378
|
+
pdf:
|
|
379
|
+
type: string
|
|
380
|
+
format: binary
|
|
381
|
+
contentMediaType: application/pdf
|
|
382
|
+
description: |-
|
|
383
|
+
EDI specification PDF, sent as a file part. Bytes that don't start
|
|
384
|
+
with `%PDF` fail with `422 PDF_EXTRACTION_FAILED`, and files over
|
|
385
|
+
50 MB with `413 PAYLOAD_TOO_LARGE`. A scanned or image-only PDF is
|
|
386
|
+
accepted, and the job then fails with `DETECTION_FAILED`.
|
|
387
|
+
documentType:
|
|
388
|
+
type: integer
|
|
389
|
+
description: |-
|
|
390
|
+
X12 transaction set number (e.g. 850), or 0 to auto-detect an
|
|
391
|
+
EDIFACT specification from the PDF contents. Same rules as the
|
|
392
|
+
JSON body's `documentType`.
|
|
393
|
+
examples:
|
|
394
|
+
- 850
|
|
352
395
|
FdrSubmitRequest:
|
|
353
396
|
type: object
|
|
397
|
+
additionalProperties: false
|
|
354
398
|
required:
|
|
355
399
|
- pdf
|
|
356
400
|
- documentType
|
|
401
|
+
description: |-
|
|
402
|
+
JSON body carrying the PDF as base64. The service still accepts it,
|
|
403
|
+
but a multipart upload avoids the base64 size overhead. Any other
|
|
404
|
+
field fails with `400 INVALID_REQUEST`.
|
|
357
405
|
properties:
|
|
358
406
|
pdf:
|
|
359
407
|
type: string
|
|
360
408
|
description: |-
|
|
361
|
-
Base64-encoded EDI specification PDF
|
|
362
|
-
|
|
363
|
-
fails with `
|
|
364
|
-
|
|
365
|
-
|
|
409
|
+
Base64-encoded EDI specification PDF; a `data:application/pdf;base64,`
|
|
410
|
+
prefix is stripped. A value that isn't base64 or doesn't decode to a
|
|
411
|
+
PDF fails with `422 PDF_EXTRACTION_FAILED`, and a decoded PDF over
|
|
412
|
+
50 MB with `413 PAYLOAD_TOO_LARGE`. A scanned or image-only PDF is
|
|
413
|
+
accepted, and the job then fails with `DETECTION_FAILED`.
|
|
366
414
|
documentType:
|
|
367
415
|
type: integer
|
|
368
416
|
description: |-
|
|
@@ -393,13 +441,13 @@ components:
|
|
|
393
441
|
- SERVICE_UNAVAILABLE
|
|
394
442
|
x-enumDescriptions:
|
|
395
443
|
INVALID_DOCUMENT_TYPE: documentType is not 0 and not a supported X12 set (400), or a failed job's PDF is not the submitted documentType
|
|
396
|
-
INVALID_REQUEST: Request body failed
|
|
444
|
+
INVALID_REQUEST: Request body failed validation — wrong Content-Type, malformed JSON, a missing pdf or documentType, or an unexpected field
|
|
397
445
|
UNAUTHORIZED: Missing or non-Bearer Authorization header
|
|
398
446
|
FORBIDDEN: Invalid, expired, or insufficient token or AShare
|
|
399
447
|
REQUEST_NOT_FOUND: Job id missing, wrong operation, or expired
|
|
400
|
-
PAYLOAD_TOO_LARGE:
|
|
448
|
+
PAYLOAD_TOO_LARGE: The PDF, or the multipart body carrying it, exceeds the size limit
|
|
401
449
|
RATE_LIMIT_EXCEEDED: Caller exceeded the endpoint token bucket
|
|
402
|
-
PDF_EXTRACTION_FAILED: pdf is not valid base64 or not
|
|
450
|
+
PDF_EXTRACTION_FAILED: pdf is not valid base64 or its bytes do not start with %PDF
|
|
403
451
|
UNSUPPORTED_TYPE: Worker could not generate an FDR for the detected type
|
|
404
452
|
DETECTION_FAILED: Worker could not classify the PDF as X12 or EDIFACT, including a PDF with no text (a scanned or image-only one)
|
|
405
453
|
GENERATION_FAILED: Unexpected pipeline or server failure
|
|
@@ -419,7 +467,7 @@ components:
|
|
|
419
467
|
description: Human-readable description of this error.
|
|
420
468
|
source:
|
|
421
469
|
type: string
|
|
422
|
-
description: Field or component that produced the error (`pdf`, `documentType`, `Authorization`, `requestId`, `rate_limiter`, `generation`).
|
|
470
|
+
description: Field or component that produced the error (`pdf`, `documentType`, `body`, `Content-Type`, `Authorization`, `requestId`, `rate_limiter`, `generation`), or the name of an unexpected field.
|
|
423
471
|
Error:
|
|
424
472
|
type: object
|
|
425
473
|
additionalProperties: false
|
|
@@ -605,7 +653,12 @@ components:
|
|
|
605
653
|
$ref: '#/components/schemas/FileDefinitionDocumentTypes'
|
|
606
654
|
responses:
|
|
607
655
|
400-bad-request:
|
|
608
|
-
description:
|
|
656
|
+
description: |-
|
|
657
|
+
Invalid documentType, or the request body failed validation: a
|
|
658
|
+
Content-Type other than multipart/form-data or JSON, malformed JSON,
|
|
659
|
+
a missing `pdf` file part or `documentType`, or an unexpected
|
|
660
|
+
field. documentType is checked after the PDF bytes, so a
|
|
661
|
+
non-PDF upload fails with 422 even when documentType is also invalid.
|
|
609
662
|
content:
|
|
610
663
|
application/json:
|
|
611
664
|
schema:
|
|
@@ -617,6 +670,26 @@ components:
|
|
|
617
670
|
- code: INVALID_DOCUMENT_TYPE
|
|
618
671
|
message: Document type must be a valid X12 transaction set number (e.g. 850) or 0 for EDIFACT; got 999
|
|
619
672
|
source: documentType
|
|
673
|
+
missingPdfPart:
|
|
674
|
+
summary: Multipart body without a pdf file part
|
|
675
|
+
value:
|
|
676
|
+
errors:
|
|
677
|
+
- code: INVALID_REQUEST
|
|
678
|
+
message: Field is required
|
|
679
|
+
source: pdf
|
|
680
|
+
unexpectedField:
|
|
681
|
+
summary: Multipart body with an extra field
|
|
682
|
+
value:
|
|
683
|
+
errors:
|
|
684
|
+
- code: INVALID_REQUEST
|
|
685
|
+
message: 'Unexpected field: foo'
|
|
686
|
+
source: foo
|
|
687
|
+
unsupportedContentType:
|
|
688
|
+
value:
|
|
689
|
+
errors:
|
|
690
|
+
- code: INVALID_REQUEST
|
|
691
|
+
message: Content-Type must be multipart/form-data or JSON
|
|
692
|
+
source: Content-Type
|
|
620
693
|
401-unauthorized:
|
|
621
694
|
description: Missing Authorization header or scheme is not Bearer JWT.
|
|
622
695
|
content:
|
|
@@ -644,7 +717,10 @@ components:
|
|
|
644
717
|
message: Bearer token has expired
|
|
645
718
|
source: Authorization
|
|
646
719
|
413-payload-too-large:
|
|
647
|
-
description:
|
|
720
|
+
description: |-
|
|
721
|
+
The PDF exceeds the 50 MB limit. A multipart body is rejected before
|
|
722
|
+
it is read when its Content-Length exceeds the limit plus a small
|
|
723
|
+
allowance for the form envelope.
|
|
648
724
|
content:
|
|
649
725
|
application/json:
|
|
650
726
|
schema:
|
|
@@ -654,10 +730,10 @@ components:
|
|
|
654
730
|
value:
|
|
655
731
|
errors:
|
|
656
732
|
- code: PAYLOAD_TOO_LARGE
|
|
657
|
-
message:
|
|
733
|
+
message: PDF exceeds 50 MB limit
|
|
658
734
|
source: pdf
|
|
659
735
|
422-unprocessable-entity:
|
|
660
|
-
description: pdf
|
|
736
|
+
description: The base64 `pdf` does not decode, or the uploaded or decoded bytes do not start with %PDF.
|
|
661
737
|
content:
|
|
662
738
|
application/json:
|
|
663
739
|
schema:
|
|
@@ -667,8 +743,9 @@ components:
|
|
|
667
743
|
value:
|
|
668
744
|
errors:
|
|
669
745
|
- code: PDF_EXTRACTION_FAILED
|
|
670
|
-
message:
|
|
746
|
+
message: uploaded bytes are not a valid PDF (missing %PDF header)
|
|
671
747
|
source: pdf
|
|
748
|
+
correlationId: 550e8400-e29b-41d4-a716-446655440000
|
|
672
749
|
429-rate-limit:
|
|
673
750
|
description: Caller exceeded the endpoint's rate limit.
|
|
674
751
|
headers:
|