diff --git a/clients/document-client/package-lock.json b/clients/document-client/package-lock.json index 0896fce..219e54e 100644 --- a/clients/document-client/package-lock.json +++ b/clients/document-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@epilot/document-client", - "version": "0.15.1", + "version": "0.16.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@epilot/document-client", - "version": "0.15.1", + "version": "0.16.1", "license": "UNLICENSED", "dependencies": { "buffer": "^6.0.3", diff --git a/clients/document-client/package.json b/clients/document-client/package.json index ea13bcc..149115c 100644 --- a/clients/document-client/package.json +++ b/clients/document-client/package.json @@ -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", diff --git a/clients/document-client/src/openapi.d.ts b/clients/document-client/src/openapi.d.ts index 39294bb..9b54e68 100644 --- a/clients/document-client/src/openapi.d.ts +++ b/clients/document-client/src/openapi.d.ts @@ -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 @@ -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; } } } @@ -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'( @@ -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'( diff --git a/clients/document-client/src/openapi.json b/clients/document-client/src/openapi.json index 7063d1d..42ea19b 100644 --- a/clients/document-client/src/openapi.json +++ b/clients/document-client/src/openapi.json @@ -67,7 +67,13 @@ }, "415": { "description": "Unsupported media type", - "content": null + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorOutput" + } + } + } } } } @@ -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", @@ -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": { @@ -687,9 +717,6 @@ } }, "servers": [ - { - "url": "https://document.sls.epilot.io" - }, { "url": "https://document.sls.epilot.io" }