Skip to content

Commit f479fd0

Browse files
committed
feat(openapi): add cdn file endpoint and enhance ai detection in docx to pdf conversion
1 parent 9d8d1e3 commit f479fd0

File tree

1 file changed

+113
-13
lines changed

1 file changed

+113
-13
lines changed

openapi.yml

Lines changed: 113 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,88 @@ components:
3737
example: Bad request
3838
title: ErrorSchema
3939
paths:
40-
/status/:
40+
/cdn/file/:
4141
get:
42-
operationId: getStatus
43-
description: Get the status of the API
44-
x-fern-availability: generally-available
42+
operationId: file
43+
summary: Get a file using a presigned URL
44+
tags:
45+
- CDN
46+
description: >-
47+
This endpoint is used to get a file using a presigned URL. The presigned
48+
URL is generated by the API and should be used to avoid region mismatch.
49+
parameters:
50+
- schema:
51+
type: string
52+
in: query
53+
name: b
54+
required: true
55+
description: >-
56+
Storage bucket identifier. Note that storage buckets are region
57+
specific, so you should be using the presigned URL provided by the
58+
API to avoid region mismatch.
59+
- schema:
60+
type: string
61+
in: query
62+
name: f
63+
required: true
64+
description: File path. Pay attention to URL encode the file path if needed.
65+
- schema:
66+
type: string
67+
in: query
68+
name: u
69+
required: false
70+
description: >-
71+
Bucket username. This is an automatically generated user when the
72+
presigned URL is created.
73+
- schema:
74+
type: string
75+
in: query
76+
name: p
77+
required: false
78+
description: >-
79+
Bucket password. This is an automatically generated password when
80+
the presigned URL is created.
81+
- schema:
82+
type: string
83+
in: query
84+
name: t
85+
required: false
86+
description: Presigned URL expiration timestamp, in milliseconds
87+
- schema:
88+
type: string
89+
in: query
90+
name: s
91+
required: true
92+
description: Presigned URL signature
93+
x-fern-sdk-group-name:
94+
- cdn
95+
x-fern-sdk-method-name: getFile
96+
x-fern-availability: beta
4597
responses:
4698
'200':
47-
description: Default Response
99+
description: The file content
48100
content:
49101
application/json:
50102
schema:
51-
type: object
52-
properties:
53-
status:
54-
type: string
103+
type: string
104+
format: binary
105+
description: The file content
106+
'400':
107+
description: Bad request
108+
content:
109+
application/json:
110+
schema:
111+
description: Bad request
112+
$ref: '#/components/schemas/def-0'
113+
'401':
114+
description: Unauthorized
115+
content:
116+
application/json:
117+
schema:
118+
description: Unauthorized
119+
$ref: '#/components/schemas/def-0'
120+
'500':
121+
description: Internal server error
55122
/pdf/docx/:
56123
post:
57124
operationId: convertDOCXtoPDF
@@ -398,7 +465,15 @@ paths:
398465
properties:
399466
options:
400467
type: object
401-
properties: {}
468+
properties:
469+
aiDetection:
470+
type: object
471+
properties:
472+
enable:
473+
type: boolean
474+
default: false
475+
limit:
476+
type: number
402477
file:
403478
type: string
404479
format: binary
@@ -430,6 +505,16 @@ paths:
430505
type: boolean
431506
readOnly:
432507
type: boolean
508+
aiDetectedName:
509+
type: object
510+
required:
511+
- name
512+
- score
513+
properties:
514+
name:
515+
type: string
516+
score:
517+
type: number
433518
locations:
434519
type: array
435520
items:
@@ -979,11 +1064,26 @@ paths:
9791064
$ref: '#/components/schemas/def-0'
9801065
'500':
9811066
description: Internal server error
1067+
/status/:
1068+
get:
1069+
operationId: getStatus
1070+
description: Get the status of the API
1071+
x-fern-availability: generally-available
1072+
responses:
1073+
'200':
1074+
description: Default Response
1075+
content:
1076+
application/json:
1077+
schema:
1078+
type: object
1079+
properties:
1080+
status:
1081+
type: string
9821082
servers:
9831083
- url: https://api.fileforge.com
984-
description: Tunnel server
985-
- url: http://localhost:3000
986-
description: Development server
1084+
description: Global Server
1085+
- url: https://us-west-1.api.fileforge.com
1086+
description: Regional Server
9871087
tags:
9881088
- name: PDF
9891089
description: PDF operations

0 commit comments

Comments
 (0)