diff --git a/openapi.yml b/openapi.yml index 1f05afb..1e8b265 100644 --- a/openapi.yml +++ b/openapi.yml @@ -5,6 +5,9 @@ info: version: 0.1.0 components: securitySchemes: + basicAuth: + type: http + scheme: basic apiKey: type: apiKey name: X-API-Key @@ -28,7 +31,7 @@ components: example: BAD_REQUEST message: type: string - description: + description: >- A human-readable message. This field may also provide additional context to the error code. example: Bad request @@ -130,16 +133,18 @@ paths: properties: keepOriginalStyles: type: boolean - description: - Whether to keep the text formatting of the variables in the - document. Default is true. + description: >- + Whether to keep the text formatting of the variables in + the document. Default is true. templateLiterals: type: object description: Map of template literals to replace in the document. additionalProperties: type: string file: - description: The Microsoft Word document (.DOCX or .DOC) file to convert to PDF. + description: >- + The Microsoft Word document (.DOCX or .DOC) file to convert + to PDF. type: string format: binary encoding: @@ -153,28 +158,28 @@ paths: x-fern-sdk-method-name: fromDocx x-fern-availability: beta responses: - "201": + '201': description: PDF Document generated successfully content: application/pdf: schema: type: string format: binary - "400": + '400': description: Bad request content: application/json: schema: description: Bad request - $ref: "#/components/schemas/def-0" - "401": + $ref: '#/components/schemas/def-0' + '401': description: Unauthorized content: application/json: schema: description: Unauthorized - $ref: "#/components/schemas/def-0" - "500": + $ref: '#/components/schemas/def-0' + '500': description: Internal server error /pdf/generate/: post: @@ -197,36 +202,37 @@ paths: properties: test: type: boolean - description: - Generate a test document instead of a production document. The - generated document will contain a watermark. Defaults to - true. + description: >- + Generate a test document instead of a production + document. The generated document will contain a + watermark. Defaults to true. default: true host: type: boolean - description: - If enabled, the document will be hosted by FileForge and a - presigned URL will be returned. + description: >- + If enabled, the document will be hosted by FileForge and + a presigned URL will be returned. default: false expiresAt: type: string format: date-time - description: - If host is enabled, the expiration date of the presigned URL. - Defaults to 7 days from now. If more than 7 days, the - document will be hosted for a monthly fee. + description: >- + If host is enabled, the expiration date of the presigned + URL. Defaults to 7 days from now. If more than 7 days, + the document will be hosted for a monthly fee. fileName: type: string - description: - The name of the generated PDF file. Defaults to document. The file - name should not contain extensions nor path traversals. + description: >- + The name of the generated PDF file. Defaults to + document. The file name should not contain extensions + nor path traversals. default: document allowViewing: type: boolean - description: - If enabled, the document will be viewable in the web app. Defaults - to false. This may go against the privacy policy of your - application. + description: >- + If enabled, the document will be viewable in the web + app. Defaults to false. This may go against the privacy + policy of your application. default: false files: description: >- @@ -264,7 +270,7 @@ paths: x-fern-sdk-method-name: generate x-fern-availability: generally-available responses: - "201": + '201': description: PDF Document generated successfully content: application/pdf: @@ -281,29 +287,29 @@ paths: type: string format: uri description: URL to the generated PDF document - "400": + '400': description: Bad request content: application/json: schema: description: Bad request - $ref: "#/components/schemas/def-0" - "401": + $ref: '#/components/schemas/def-0' + '401': description: Unauthorized content: application/json: schema: description: Unauthorized - $ref: "#/components/schemas/def-0" - "500": + $ref: '#/components/schemas/def-0' + '500': description: Internal server error - "502": + '502': description: Bad Gateway content: application/json: schema: description: Bad Gateway - $ref: "#/components/schemas/def-0" + $ref: '#/components/schemas/def-0' /pdf/merge/: post: operationId: mergePDFDocuments @@ -324,29 +330,30 @@ paths: properties: host: type: boolean - description: - If enabled, the document will be hosted by FileForge and a - presigned URL will be returned. + description: >- + If enabled, the document will be hosted by FileForge and + a presigned URL will be returned. default: false expiresAt: type: string format: date-time - description: - If host is enabled, the expiration date of the presigned URL. - Defaults to 7 days from now. If more than 7 days, the - document will be hosted for a monthly fee. + description: >- + If host is enabled, the expiration date of the presigned + URL. Defaults to 7 days from now. If more than 7 days, + the document will be hosted for a monthly fee. fileName: type: string - description: - The name of the generated PDF file. Defaults to document. The file - name should not contain extensions nor path traversals. + description: >- + The name of the generated PDF file. Defaults to + document. The file name should not contain extensions + nor path traversals. default: document allowViewing: type: boolean - description: - If enabled, the document will be viewable in the web app. Defaults - to false. This may go against the privacy policy of your - application. + description: >- + If enabled, the document will be viewable in the web + app. Defaults to false. This may go against the privacy + policy of your application. default: false files: allOf: @@ -366,7 +373,7 @@ paths: x-fern-sdk-method-name: merge x-fern-availability: generally-available responses: - "201": + '201': description: PDF Document generated successfully content: application/pdf: @@ -383,21 +390,21 @@ paths: type: string format: uri description: URL to the merged PDF document - "400": + '400': description: Bad request content: application/json: schema: description: Bad request - $ref: "#/components/schemas/def-0" - "401": + $ref: '#/components/schemas/def-0' + '401': description: Unauthorized content: application/json: schema: description: Unauthorized - $ref: "#/components/schemas/def-0" - "500": + $ref: '#/components/schemas/def-0' + '500': description: Internal server error /pdf/form/detect/: post: @@ -406,9 +413,9 @@ paths: tags: - PDF - form - description: - Returns a list of form fields detected in the PDF document, along - with their location, options and requirements. For a more visual + description: >- + Returns a list of form fields detected in the PDF document, along with + their location, options and requirements. For a more visual representation, use the /pdf/form/mark endpoint. requestBody: content: @@ -444,7 +451,7 @@ paths: x-fern-sdk-method-name: detect x-fern-availability: beta responses: - "200": + '200': description: Document fields detected successfully content: application/json: @@ -477,7 +484,7 @@ paths: properties: x: type: number - y: + 'y': type: number width: type: number @@ -485,7 +492,7 @@ paths: type: number required: - x - - y + - 'y' - width - height required: @@ -578,21 +585,21 @@ paths: type: string required: - type - "400": + '400': description: Bad request content: application/json: schema: description: Bad request - $ref: "#/components/schemas/def-0" - "401": + $ref: '#/components/schemas/def-0' + '401': description: Unauthorized content: application/json: schema: description: Unauthorized - $ref: "#/components/schemas/def-0" - "500": + $ref: '#/components/schemas/def-0' + '500': description: Internal server error /pdf/form/mark/: post: @@ -601,9 +608,9 @@ paths: tags: - PDF - form - description: - Returns a modified PDF document with form fields marked with a - green border, and hover text showing the field name. + description: >- + Returns a modified PDF document with form fields marked with a green + border, and hover text showing the field name. requestBody: content: multipart/form-data: @@ -630,28 +637,28 @@ paths: x-fern-sdk-method-name: mark x-fern-availability: beta responses: - "201": + '201': description: Marked PDF Document generated successfully content: application/pdf: schema: type: string format: binary - "400": + '400': description: Bad request content: application/json: schema: description: Bad request - $ref: "#/components/schemas/def-0" - "401": + $ref: '#/components/schemas/def-0' + '401': description: Unauthorized content: application/json: schema: description: Unauthorized - $ref: "#/components/schemas/def-0" - "500": + $ref: '#/components/schemas/def-0' + '500': description: Internal server error /pdf/form/fill/: post: @@ -660,9 +667,9 @@ paths: tags: - PDF - form - description: - Returns a modified PDF document with filled form fields. A subset - of fields can be filled. + description: >- + Returns a modified PDF document with filled form fields. A subset of + fields can be filled. requestBody: content: multipart/form-data: @@ -678,9 +685,9 @@ paths: properties: flattenForm: type: boolean - description: - Flatten the form fields after filling them. This will make the PDF - form uneditable. + description: >- + Flatten the form fields after filling them. This will + make the PDF form uneditable. default: false fields: type: array @@ -695,12 +702,12 @@ paths: - value properties: name: - description: - Name of the field to fill. This must match an exact name from the - PDF document. To detect all fields, use the - /pdf/form/fields endpoint, or use the - /pdf/form/mark endpoint to get an annotated - PDF with each detected field. + description: >- + Name of the field to fill. This must match an + exact name from the PDF document. To detect + all fields, use the /pdf/form/fields endpoint, + or use the /pdf/form/mark endpoint to get an + annotated PDF with each detected field. type: string type: type: string @@ -715,12 +722,12 @@ paths: - checked properties: name: - description: - Name of the field to fill. This must match an exact name from the - PDF document. To detect all fields, use the - /pdf/form/fields endpoint, or use the - /pdf/form/mark endpoint to get an annotated - PDF with each detected field. + description: >- + Name of the field to fill. This must match an + exact name from the PDF document. To detect + all fields, use the /pdf/form/fields endpoint, + or use the /pdf/form/mark endpoint to get an + annotated PDF with each detected field. type: string type: type: string @@ -735,12 +742,12 @@ paths: - selected properties: name: - description: - Name of the field to fill. This must match an exact name from the - PDF document. To detect all fields, use the - /pdf/form/fields endpoint, or use the - /pdf/form/mark endpoint to get an annotated - PDF with each detected field. + description: >- + Name of the field to fill. This must match an + exact name from the PDF document. To detect + all fields, use the /pdf/form/fields endpoint, + or use the /pdf/form/mark endpoint to get an + annotated PDF with each detected field. type: string type: type: string @@ -758,12 +765,12 @@ paths: - selected properties: name: - description: - Name of the field to fill. This must match an exact name from the - PDF document. To detect all fields, use the - /pdf/form/fields endpoint, or use the - /pdf/form/mark endpoint to get an annotated - PDF with each detected field. + description: >- + Name of the field to fill. This must match an + exact name from the PDF document. To detect + all fields, use the /pdf/form/fields endpoint, + or use the /pdf/form/mark endpoint to get an + annotated PDF with each detected field. type: string type: type: string @@ -786,28 +793,28 @@ paths: x-fern-sdk-method-name: fill x-fern-availability: beta responses: - "201": + '201': description: PDF Document filled successfully content: application/pdf: schema: type: string format: binary - "400": + '400': description: Bad request content: application/json: schema: description: Bad request - $ref: "#/components/schemas/def-0" - "401": + $ref: '#/components/schemas/def-0' + '401': description: Unauthorized content: application/json: schema: description: Unauthorized - $ref: "#/components/schemas/def-0" - "500": + $ref: '#/components/schemas/def-0' + '500': description: Internal server error /pdf/split/: post: @@ -815,7 +822,7 @@ paths: summary: Splits a PDF document into 2 PDF documents. tags: - PDF - description: + description: >- Splits a PDF document into 2 PDF documents. Returns a zip file containing the 2 documents. Each document is named after the original document with a suffix added to indicate the range of pages it contains. @@ -836,9 +843,9 @@ paths: splitPage: type: integer minimum: 1 - description: - The page number to split the document at (the page will be included - in the first document) + description: >- + The page number to split the document at (the page will + be included in the first document) file: type: string format: binary @@ -853,28 +860,28 @@ paths: x-fern-sdk-method-name: split x-fern-availability: generally-available responses: - "201": + '201': description: ZIP file generated successfully content: application/zip: schema: type: string format: binary - "400": + '400': description: Bad request content: application/json: schema: description: Bad request - $ref: "#/components/schemas/def-0" - "401": + $ref: '#/components/schemas/def-0' + '401': description: Unauthorized content: application/json: schema: description: Unauthorized - $ref: "#/components/schemas/def-0" - "500": + $ref: '#/components/schemas/def-0' + '500': description: Internal server error /pdf/extract/: post: @@ -882,11 +889,11 @@ paths: summary: Extract a range of pages from a PDF document. tags: - PDF - description: - Extracts a range of pages from a PDF document. The start and end - pages are included in the extracted document. The extracted document is - named after the original document with a suffix added to indicate the - range of pages it contains (ex:document\_extracted\_\$start\_\$end.pdf). + description: >- + Extracts a range of pages from a PDF document. The start and end pages + are included in the extracted document. The extracted document is named + after the original document with a suffix added to indicate the range of + pages it contains (ex:document\_extracted\_\$start\_\$end.pdf). requestBody: content: multipart/form-data: @@ -924,28 +931,28 @@ paths: x-fern-sdk-method-name: extract x-fern-availability: generally-available responses: - "201": + '201': description: Extracted PDF file generated successfully content: application/pdf: schema: type: string format: binary - "400": + '400': description: Bad request content: application/json: schema: description: Bad request - $ref: "#/components/schemas/def-0" - "401": + $ref: '#/components/schemas/def-0' + '401': description: Unauthorized content: application/json: schema: description: Unauthorized - $ref: "#/components/schemas/def-0" - "500": + $ref: '#/components/schemas/def-0' + '500': description: Internal server error /pdf/insert/: post: @@ -953,13 +960,13 @@ paths: summary: Insert a PDF document into another PDF document at a specified page. tags: - PDF - description: - "Insert a PDF document into another PDF document at a specified - page. The inserted document is named after the original document with a - suffix added to indicate the range of pages it contains - (ex:document\\_inserted\\_\\$insertPage\\_\\$document2.pdf). Note: The - first document is the parent document and the second document is the - document to be inserted." + description: >- + Insert a PDF document into another PDF document at a specified page. The + inserted document is named after the original document with a suffix + added to indicate the range of pages it contains + (ex:document\_inserted\_\$insertPage\_\$document2.pdf). Note: The first + document is the parent document and the second document is the document + to be inserted. requestBody: content: multipart/form-data: @@ -996,28 +1003,28 @@ paths: x-fern-sdk-method-name: insert x-fern-availability: generally-available responses: - "201": + '201': description: PDF file inserted successfully content: application/pdf: schema: type: string format: binary - "400": + '400': description: Bad request content: application/json: schema: description: Bad request - $ref: "#/components/schemas/def-0" - "401": + $ref: '#/components/schemas/def-0' + '401': description: Unauthorized content: application/json: schema: description: Unauthorized - $ref: "#/components/schemas/def-0" - "500": + $ref: '#/components/schemas/def-0' + '500': description: Internal server error /status/: get: @@ -1025,7 +1032,7 @@ paths: description: Get the status of the API x-fern-availability: generally-available responses: - "200": + '200': description: Default Response content: application/json: @@ -1037,6 +1044,8 @@ paths: servers: - url: https://api.fileforge.com description: Global Server + - url: https://us-west-1.api.fileforge.com + description: Regional Server tags: - name: PDF description: PDF operations