Skip to content

Commit

Permalink
chore(doc-client): update types
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Sauerer committed Nov 25, 2024
1 parent be83fc3 commit 079ef77
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 16 deletions.
4 changes: 2 additions & 2 deletions clients/document-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clients/document-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epilot/document-client",
"version": "0.15.1",
"version": "0.16.1",
"description": "API Client for epilot document API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
41 changes: 33 additions & 8 deletions clients/document-client/src/openapi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,26 @@ declare namespace Components {
* A message explaining the progress
*/
message?: string;
ics_output?: {
/**
* example:
* {
* "s3ref": {
* "bucket": "document-api-preview-prod",
* "key": "preview/my-appointment.ics"
* }
* }
*/
output_document?: {
/**
* Generated document filename for ICS
* example:
* my-appointment-OR-001.ics
*/
filename?: string;
s3ref?: S3Reference;
};
};
pdf_output?: {
/**
* Pre-signed S3 GET URL for PDF preview
Expand Down Expand Up @@ -452,6 +472,7 @@ declare namespace Paths {
export type $200 = Components.Schemas.DocumentMetaResponse;
export type $400 = Components.Schemas.ErrorOutput;
export type $403 = Components.Schemas.ErrorOutput;
export type $415 = Components.Schemas.ErrorOutput;
}
}
}
Expand All @@ -474,16 +495,18 @@ export interface OperationMethods {
/**
* generateDocumentV2 - generateDocumentV2
*
* Builds document generated from input document with variables.
* Generates documents from templates with variables.
*
* Supported input document types:
* Supported document types as input:
* - .docx
* - .ics
*
* Supported output document types:
* Supported document types as output:
* - .pdf
* - .docx but limited to only text based variables
* - .ics
*
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the input document.
*
*/
'generateDocumentV2'(
Expand Down Expand Up @@ -531,16 +554,18 @@ export interface PathsDictionary {
/**
* generateDocumentV2 - generateDocumentV2
*
* Builds document generated from input document with variables.
* Generates documents from templates with variables.
*
* Supported input document types:
* Supported document types as input:
* - .docx
* - .ics
*
* Supported output document types:
* Supported document types as output:
* - .pdf
* - .docx but limited to only text based variables
* - .ics
*
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the input document.
*
*/
'post'(
Expand Down
37 changes: 32 additions & 5 deletions clients/document-client/src/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@
},
"415": {
"description": "Unsupported media type",
"content": null
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorOutput"
}
}
}
}
}
}
Expand All @@ -76,7 +82,7 @@
"post": {
"operationId": "generateDocumentV2",
"summary": "generateDocumentV2",
"description": "Builds document generated from input document with variables.\n\nSupported input document types:\n- .docx\n\nSupported output document types:\n- .pdf\n- .docx but limited to only text based variables\n\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.\n",
"description": "Generates documents from templates with variables.\n\nSupported document types as input:\n- .docx\n- .ics\n\nSupported document types as output:\n- .pdf\n- .docx but limited to only text based variables\n- .ics\n\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the input document.\n",
"parameters": [
{
"in": "query",
Expand Down Expand Up @@ -558,6 +564,30 @@
"description": "A message explaining the progress",
"type": "string"
},
"ics_output": {
"type": "object",
"properties": {
"output_document": {
"type": "object",
"properties": {
"filename": {
"description": "Generated document filename for ICS",
"type": "string",
"example": "my-appointment-OR-001.ics"
},
"s3ref": {
"$ref": "#/components/schemas/S3Reference"
}
},
"example": {
"s3ref": {
"bucket": "document-api-preview-prod",
"key": "preview/my-appointment.ics"
}
}
}
}
},
"pdf_output": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -687,9 +717,6 @@
}
},
"servers": [
{
"url": "https://document.sls.epilot.io"
},
{
"url": "https://document.sls.epilot.io"
}
Expand Down

0 comments on commit 079ef77

Please sign in to comment.