From 0fce7c5bed6a66d1ba276427822b0d83a593a767 Mon Sep 17 00:00:00 2001 From: lilt-infra-service <69855773+lilt-infra-service@users.noreply.github.com> Date: Mon, 16 Sep 2024 18:37:28 +0000 Subject: [PATCH] Regenerates API Bindings --- README.md | 234 ++----- docs/CreateApi.md | 501 +++++++++++++++ docs/CreateConverterConfigParameters.md | 4 +- docs/DeleteSegmentFromMemoryResponse.md | 9 + docs/DocumentWithSegments.md | 1 + docs/DocumentWithoutSegments.md | 2 + docs/DocumentsApi.md | 466 +------------- docs/FilesApi.md | 26 +- docs/InlineResponse200.md | 4 +- docs/JobCreateParameters.md | 3 + docs/JobUpdateParameters.md | 15 + docs/JobsApi.md | 50 +- docs/LanguagePair.md | 2 + docs/LanguagesApi.md | 4 +- docs/LiltCreateContent.md | 14 + docs/MemoriesApi.md | 223 ++----- docs/Memory.md | 2 +- docs/ProjectsApi.md | 346 +--------- docs/SDLXLIFFFilter.md | 28 + docs/SignLiltCreateTermsResponse.md | 9 + docs/TermbaseExportResponse.md | 10 + docs/TranslateApi.md | 152 +---- docs/TranslateSegmentBody.md | 8 + package.json | 2 +- src/ApiClient.js | 14 +- src/api/CreateApi.js | 460 ++++++++++++++ src/api/DocumentsApi.js | 429 +------------ src/api/FilesApi.js | 44 +- src/api/JobsApi.js | 80 +-- src/api/LanguagesApi.js | 10 +- src/api/MemoriesApi.js | 361 ++++------- src/api/ProjectsApi.js | 318 +--------- src/api/TranslateApi.js | 170 +---- src/index.js | 599 ++---------------- src/model/AddFileLabelRequest.js | 8 +- src/model/CreateConverterConfigParameters.js | 50 +- src/model/DeleteSegmentFromMemoryResponse.js | 71 +++ src/model/DocumentWithSegments.js | 17 +- src/model/DocumentWithoutSegments.js | 26 +- src/model/DocumentWithoutSegmentsStatus.js | 9 +- src/model/Error.js | 8 +- src/model/FileDeleteResponse.js | 8 +- src/model/InlineResponse200.js | 35 +- src/model/Job.js | 8 +- src/model/JobCreateParameters.js | 45 +- src/model/JobDeleteResponse.js | 8 +- src/model/JobLeverageStats.js | 8 +- src/model/JobProject.js | 8 +- src/model/JobStats.js | 8 +- src/model/JobUpdateParameters.js | 53 +- src/model/LanguagePair.js | 26 +- src/model/LanguagesResponse.js | 8 +- src/model/LiltCreateContent.js | 118 ++++ src/model/Memory.js | 26 +- src/model/MemoryCreateParameters.js | 8 +- src/model/MemoryDeleteResponse.js | 8 +- src/model/MemoryImportResponse.js | 8 +- src/model/MemoryUpdateParameters.js | 8 +- src/model/Project.js | 8 +- src/model/ProjectCreateParameters.js | 8 +- src/model/ProjectDeleteResponse.js | 8 +- src/model/ProjectStats.js | 8 +- src/model/SDLXLIFFFilter.js | 131 ++++ src/model/Segment.js | 8 +- src/model/SignLiltCreateTermsResponse.js | 72 +++ src/model/SourceFile.js | 8 +- src/model/TermbaseExportResponse.js | 81 +++ src/model/TranslateSegmentBody.js | 92 ++- src/model/Translation.js | 8 +- src/model/TranslationInfo.js | 8 +- src/model/TranslationList.js | 8 +- src/model/TranslationMemoryEntry.js | 8 +- src/model/WorkflowStageAssignment.js | 8 +- test/api/CreateApi.spec.js | 143 +++++ .../DeleteSegmentFromMemoryResponse.spec.js | 65 ++ test/model/LiltCreateContent.spec.js | 95 +++ test/model/SDLXLIFFFilter.spec.js | 77 +++ .../model/SignLiltCreateTermsResponse.spec.js | 65 ++ test/model/TermbaseExportResponse.spec.js | 71 +++ 79 files changed, 2889 insertions(+), 3271 deletions(-) create mode 100644 docs/CreateApi.md create mode 100644 docs/DeleteSegmentFromMemoryResponse.md create mode 100644 docs/LiltCreateContent.md create mode 100644 docs/SDLXLIFFFilter.md create mode 100644 docs/SignLiltCreateTermsResponse.md create mode 100644 docs/TermbaseExportResponse.md create mode 100644 src/api/CreateApi.js create mode 100644 src/model/DeleteSegmentFromMemoryResponse.js create mode 100644 src/model/LiltCreateContent.js create mode 100644 src/model/SDLXLIFFFilter.js create mode 100644 src/model/SignLiltCreateTermsResponse.js create mode 100644 src/model/TermbaseExportResponse.js create mode 100644 test/api/CreateApi.spec.js create mode 100644 test/model/DeleteSegmentFromMemoryResponse.spec.js create mode 100644 test/model/LiltCreateContent.spec.js create mode 100644 test/model/SDLXLIFFFilter.spec.js create mode 100644 test/model/SignLiltCreateTermsResponse.spec.js create mode 100644 test/model/TermbaseExportResponse.spec.js diff --git a/README.md b/README.md index 3ad7f94..ee06268 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # lilt-node LiltNode - JavaScript client for lilt-node +Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory @@ -8,7 +9,8 @@ The Lilt REST API enables programmatic access to the full-range of Lilt backend * Programmatic control of the Lilt CAT environment * Translation memory synchronization -Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. +Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. +The base url for this REST API is `https://api.lilt.com/`. ## Authentication @@ -24,10 +26,9 @@ Our services have a general quota of 4000 requests per minute. Should you hit th This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v2.0 -- Package version: 0.5.0 +- API version: v3.0 +- Package version: 0.6.3 - Build package: org.openapitools.codegen.languages.JavascriptClientCodegen -For more information, please visit [https://lilt.com/docs/api](https://lilt.com/docs/api) ## Installation @@ -132,11 +133,9 @@ var BasicAuth = defaultClient.authentications['BasicAuth']; BasicAuth.username = 'YOUR USERNAME' BasicAuth.password = 'YOUR PASSWORD' -var api = new LiltNode.CommentsApi() -var documentId = 56; // {Number} A unique document identifier. -var segmentId = 56; // {Number} A unique segment identifier. -var body = new LiltNode.CommentBody(); // {CommentBody} The comment being created -api.createComment(documentId, segmentId, body).then(function(data) { +var api = new LiltNode.CreateApi() +var contentId = 56; // {Number} The content ID. +api.deleteLiltCreateContent(contentId).then(function(data) { console.log('API called successfully. Returned data: ' + data); }, function(error) { console.error(error); @@ -147,141 +146,69 @@ api.createComment(documentId, segmentId, body).then(function(data) { ## Documentation for API Endpoints -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*LiltNode.CommentsApi* | [**createComment**](docs/CommentsApi.md#createComment) | **POST** /comments | Create a new comment -*LiltNode.CommentsApi* | [**deleteComment**](docs/CommentsApi.md#deleteComment) | **DELETE** /comments | Delete a Comment -*LiltNode.CommentsApi* | [**getDocumentComments**](docs/CommentsApi.md#getDocumentComments) | **GET** /comments | Retrieve a document's comments by segment -*LiltNode.CommentsApi* | [**updateComment**](docs/CommentsApi.md#updateComment) | **PUT** /comments | Update an existing comment -*LiltNode.ConnectorsApi* | [**createConnector**](docs/ConnectorsApi.md#createConnector) | **POST** /connectors | Upload a Connector -*LiltNode.ConnectorsApi* | [**deleteConnector**](docs/ConnectorsApi.md#deleteConnector) | **DELETE** /connectors | Delete a Connector -*LiltNode.ConnectorsApi* | [**exportConnectorJob**](docs/ConnectorsApi.md#exportConnectorJob) | **POST** /connectors/jobs/deliver | Deliver a Connector Job -*LiltNode.ConnectorsApi* | [**getConnectorJobs**](docs/ConnectorsApi.md#getConnectorJobs) | **GET** /connectors/jobs | Retrieve a Connector Job -*LiltNode.ConnectorsApi* | [**getConnectors**](docs/ConnectorsApi.md#getConnectors) | **GET** /connectors | Retrieve a Connector -*LiltNode.ConnectorsApi* | [**syncConnector**](docs/ConnectorsApi.md#syncConnector) | **POST** /connectors/sync | Sync a Connector -*LiltNode.ConnectorsApi* | [**updateConnector**](docs/ConnectorsApi.md#updateConnector) | **PUT** /connectors | Upload a Connector -*LiltNode.ConverterConfigApi* | [**addConverterConfig**](docs/ConverterConfigApi.md#addConverterConfig) | **PUT** /configs/converter | Add Converter Config -*LiltNode.ConverterConfigApi* | [**deleteConverterConfig**](docs/ConverterConfigApi.md#deleteConverterConfig) | **DELETE** /configs/converter/{configId} | Delete Converter Config -*LiltNode.ConverterConfigApi* | [**deleteFilterMapping**](docs/ConverterConfigApi.md#deleteFilterMapping) | **DELETE** /configs/converter/{configId}/{fileExtension} | Delete Filter Mapping -*LiltNode.ConverterConfigApi* | [**editFilterMapping**](docs/ConverterConfigApi.md#editFilterMapping) | **PUT** /configs/converter/{configId}/{fileExtension} | Add Filter Mapping -*LiltNode.ConverterConfigApi* | [**getConverterConfigById**](docs/ConverterConfigApi.md#getConverterConfigById) | **GET** /configs/converter/{configId} | Fetch Converter Config by Id -*LiltNode.ConverterConfigApi* | [**getConverterConfigs**](docs/ConverterConfigApi.md#getConverterConfigs) | **GET** /configs/converter | List Converter Configs -*LiltNode.DocumentsApi* | [**assignDocument**](docs/DocumentsApi.md#assignDocument) | **PUT** /documents/share | Assign a Document -*LiltNode.DocumentsApi* | [**createDocument**](docs/DocumentsApi.md#createDocument) | **POST** /documents | Create a Document -*LiltNode.DocumentsApi* | [**deleteDocument**](docs/DocumentsApi.md#deleteDocument) | **DELETE** /documents | Delete a Document -*LiltNode.DocumentsApi* | [**downloadDocument**](docs/DocumentsApi.md#downloadDocument) | **GET** /documents/files | Download a Document -*LiltNode.DocumentsApi* | [**getDocument**](docs/DocumentsApi.md#getDocument) | **GET** /documents | Retrieve a Document -*LiltNode.DocumentsApi* | [**markReviewDone**](docs/DocumentsApi.md#markReviewDone) | **POST** /documents/done/review | Mark review done -*LiltNode.DocumentsApi* | [**markTranslationDone**](docs/DocumentsApi.md#markTranslationDone) | **POST** /documents/done/translation | Mark translation done -*LiltNode.DocumentsApi* | [**pretranslateDocuments**](docs/DocumentsApi.md#pretranslateDocuments) | **POST** /documents/pretranslate | Pretranslate a Document -*LiltNode.DocumentsApi* | [**unlockDocuments**](docs/DocumentsApi.md#unlockDocuments) | **POST** /documents/done/unlock | Unlock documents -*LiltNode.DocumentsApi* | [**uploadDocument**](docs/DocumentsApi.md#uploadDocument) | **POST** /documents/files | Upload a File -*LiltNode.FilesApi* | [**addLabel**](docs/FilesApi.md#addLabel) | **POST** /files/labels | Add Label to File -*LiltNode.FilesApi* | [**deleteFile**](docs/FilesApi.md#deleteFile) | **DELETE** /files | Delete a File -*LiltNode.FilesApi* | [**download**](docs/FilesApi.md#download) | **GET** /files/download | Download file -*LiltNode.FilesApi* | [**getFiles**](docs/FilesApi.md#getFiles) | **GET** /files | Retrieve a File -*LiltNode.FilesApi* | [**removeLabel**](docs/FilesApi.md#removeLabel) | **DELETE** /files/labels | Remove Label from File -*LiltNode.FilesApi* | [**uploadFile**](docs/FilesApi.md#uploadFile) | **POST** /files | Upload a File -*LiltNode.JobsApi* | [**archiveJob**](docs/JobsApi.md#archiveJob) | **POST** /jobs/{jobId}/archive | Archive a Job -*LiltNode.JobsApi* | [**createJob**](docs/JobsApi.md#createJob) | **POST** /jobs | Create a Job -*LiltNode.JobsApi* | [**deleteJob**](docs/JobsApi.md#deleteJob) | **DELETE** /jobs/{jobId} | Delete a Job -*LiltNode.JobsApi* | [**deliverJob**](docs/JobsApi.md#deliverJob) | **POST** /jobs/{jobId}/deliver | Deliver a Job -*LiltNode.JobsApi* | [**downloadJob**](docs/JobsApi.md#downloadJob) | **GET** /jobs/{jobId}/downlod | Download a Job -*LiltNode.JobsApi* | [**exportJob**](docs/JobsApi.md#exportJob) | **GET** /jobs/{jobId}/export | Export a Job -*LiltNode.JobsApi* | [**getJob**](docs/JobsApi.md#getJob) | **GET** /jobs/{jobId} | Retrieve a Job -*LiltNode.JobsApi* | [**getJobLeverageStats**](docs/JobsApi.md#getJobLeverageStats) | **POST** /jobs/{jobId}/stats | Retrieve Job Leverage Stats -*LiltNode.JobsApi* | [**reactivateJob**](docs/JobsApi.md#reactivateJob) | **POST** /jobs/{jobId}/reactivate | Reactivate a Job -*LiltNode.JobsApi* | [**retrieveAllJobs**](docs/JobsApi.md#retrieveAllJobs) | **GET** /jobs | Retrieve all Jobs -*LiltNode.JobsApi* | [**unarchiveJob**](docs/JobsApi.md#unarchiveJob) | **POST** /jobs/{jobId}/unarchive | Unarchive a Job -*LiltNode.JobsApi* | [**updateJob**](docs/JobsApi.md#updateJob) | **PUT** /jobs/{jobId} | Update a Job -*LiltNode.LanguagesApi* | [**getLanguages**](docs/LanguagesApi.md#getLanguages) | **GET** /languages | Retrieve supported languages -*LiltNode.LexiconApi* | [**queryLexicon**](docs/LexiconApi.md#queryLexicon) | **GET** /lexicon | Query a Lexicon -*LiltNode.LexiconApi* | [**updateLexicon**](docs/LexiconApi.md#updateLexicon) | **POST** /lexicon | Update a Lexicon -*LiltNode.MemoriesApi* | [**createMemory**](docs/MemoriesApi.md#createMemory) | **POST** /memories | Create a Memory -*LiltNode.MemoriesApi* | [**deleteMemory**](docs/MemoriesApi.md#deleteMemory) | **DELETE** /memories | Delete a Memory -*LiltNode.MemoriesApi* | [**getMemory**](docs/MemoriesApi.md#getMemory) | **GET** /memories | Retrieve a Memory -*LiltNode.MemoriesApi* | [**importMemoryFile**](docs/MemoriesApi.md#importMemoryFile) | **POST** /memories/import | File import for a Memory -*LiltNode.MemoriesApi* | [**queryMemory**](docs/MemoriesApi.md#queryMemory) | **GET** /memories/query | Query a Memory -*LiltNode.MemoriesApi* | [**syncDeleteMemory**](docs/MemoriesApi.md#syncDeleteMemory) | **DELETE** /memories/sync | Delete-sync for a Memory -*LiltNode.MemoriesApi* | [**syncDownMemory**](docs/MemoriesApi.md#syncDownMemory) | **GET** /memories/sync | Get-sync for a Memory -*LiltNode.MemoriesApi* | [**syncInsertMemory**](docs/MemoriesApi.md#syncInsertMemory) | **POST** /memories/sync | Insert-sync for a Memory -*LiltNode.MemoriesApi* | [**syncUpdateMemory**](docs/MemoriesApi.md#syncUpdateMemory) | **PUT** /memories/sync | Update-sync for a Memory -*LiltNode.MemoriesApi* | [**updateMemory**](docs/MemoriesApi.md#updateMemory) | **PUT** /memories | Update the name of a Memory -*LiltNode.ProjectsApi* | [**createProject**](docs/ProjectsApi.md#createProject) | **POST** /projects | Create a Project -*LiltNode.ProjectsApi* | [**deleteProject**](docs/ProjectsApi.md#deleteProject) | **DELETE** /projects | Delete a Project -*LiltNode.ProjectsApi* | [**deliverProjectsBulk**](docs/ProjectsApi.md#deliverProjectsBulk) | **POST** /projects/bulk-deliver | Deliver multiple projects apart from their jobs. -*LiltNode.ProjectsApi* | [**getProjectReport**](docs/ProjectsApi.md#getProjectReport) | **GET** /projects/quote | Retrieve Project report -*LiltNode.ProjectsApi* | [**getProjectRevisionReport**](docs/ProjectsApi.md#getProjectRevisionReport) | **GET** /projects/{id}/revision | Retrieve Project revision report -*LiltNode.ProjectsApi* | [**getProjectStatus**](docs/ProjectsApi.md#getProjectStatus) | **GET** /projects/status | Retrieve Project status -*LiltNode.ProjectsApi* | [**getProjects**](docs/ProjectsApi.md#getProjects) | **GET** /projects | Retrieve a Project -*LiltNode.ProjectsApi* | [**triggerAutoAssignment**](docs/ProjectsApi.md#triggerAutoAssignment) | **POST** /autoAssignment | Auto Assignment -*LiltNode.ProjectsApi* | [**updateProjectsBulk**](docs/ProjectsApi.md#updateProjectsBulk) | **PUT** /projects/bulk-update | Update multiple Projects with a single payload -*LiltNode.QAApi* | [**qaCheck**](docs/QAApi.md#qaCheck) | **GET** /qa | Perform QA check -*LiltNode.RootApi* | [**root**](docs/RootApi.md#root) | **GET** / | Retrieve the REST API root -*LiltNode.SegmentsApi* | [**createSegment**](docs/SegmentsApi.md#createSegment) | **POST** /segments | Create a Segment -*LiltNode.SegmentsApi* | [**deleteSegment**](docs/SegmentsApi.md#deleteSegment) | **DELETE** /segments | Delete a Segment -*LiltNode.SegmentsApi* | [**getSegment**](docs/SegmentsApi.md#getSegment) | **GET** /segments | Retrieve a Segment -*LiltNode.SegmentsApi* | [**tagSegment**](docs/SegmentsApi.md#tagSegment) | **GET** /segments/tag | Tag a Segment -*LiltNode.SegmentsApi* | [**unlockSegments**](docs/SegmentsApi.md#unlockSegments) | **POST** /segments/review/unlock | Unaccept and unlock segments -*LiltNode.SegmentsApi* | [**updateSegment**](docs/SegmentsApi.md#updateSegment) | **PUT** /segments | Update a Segment -*LiltNode.SettingsApi* | [**getOrganizationSettings**](docs/SettingsApi.md#getOrganizationSettings) | **GET** /settings/organization | Get organization-level settings -*LiltNode.SettingsApi* | [**getProjectSettings**](docs/SettingsApi.md#getProjectSettings) | **GET** /settings/project/{projectId} | Get settings for a project -*LiltNode.SettingsApi* | [**getUserSettings**](docs/SettingsApi.md#getUserSettings) | **GET** /settings/user | Get settings for the authenticated user -*LiltNode.SettingsApi* | [**upsertSetting**](docs/SettingsApi.md#upsertSetting) | **POST** /settings | Update or create a setting -*LiltNode.TranslateApi* | [**batchTranslateFile**](docs/TranslateApi.md#batchTranslateFile) | **POST** /translate/file | Translate a File -*LiltNode.TranslateApi* | [**downloadFile**](docs/TranslateApi.md#downloadFile) | **GET** /translate/files | Download translated file -*LiltNode.TranslateApi* | [**monitorFileTranslation**](docs/TranslateApi.md#monitorFileTranslation) | **GET** /translate/file | Monitor file translation -*LiltNode.TranslateApi* | [**registerSegment**](docs/TranslateApi.md#registerSegment) | **GET** /translate/register | Register a segment -*LiltNode.TranslateApi* | [**translateSegment**](docs/TranslateApi.md#translateSegment) | **GET** /translate | Translate a segment -*LiltNode.TranslateApi* | [**translateSegmentPost**](docs/TranslateApi.md#translateSegmentPost) | **POST** /translate | Translate a segment -*LiltNode.WorkflowsApi* | [**advanceWorkflowStage**](docs/WorkflowsApi.md#advanceWorkflowStage) | **POST** /document/{documentId}/task/{taskId}/advance | Advance workflow to the next stage -*LiltNode.WorkflowsApi* | [**getDocumentWorkflow**](docs/WorkflowsApi.md#getDocumentWorkflow) | **GET** /workflows/document/{documentId} | Retrieve document Workflow metadata -*LiltNode.WorkflowsApi* | [**getWorkflowTemplates**](docs/WorkflowsApi.md#getWorkflowTemplates) | **GET** /workflows/templates | Retrieve workflow templates -*LiltNode.WorkflowsApi* | [**rejectWorkflowStage**](docs/WorkflowsApi.md#rejectWorkflowStage) | **POST** /document/{documentId}/task/{taskId}/reject | Move workflow to the previous stage -*LiltNode.WorkflowsApi* | [**setDocumentStage**](docs/WorkflowsApi.md#setDocumentStage) | **PUT** /workflows/{documentId}/stage | Set Workflow stage for a document +*LiltNode.CreateApi* | [**deleteLiltCreateContent**](docs/CreateApi.md#deleteLiltCreateContent) | **DELETE** /v2/create/{contentId} | Delete Lilt Create content +*LiltNode.CreateApi* | [**generateLiltCreateContent**](docs/CreateApi.md#generateLiltCreateContent) | **POST** /v2/create | Generate new Lilt Create content +*LiltNode.CreateApi* | [**getLiltCreateById**](docs/CreateApi.md#getLiltCreateById) | **GET** /v2/create/{contentId} | Get Lilt Create content by ID. +*LiltNode.CreateApi* | [**getLiltCreateContent**](docs/CreateApi.md#getLiltCreateContent) | **GET** /v2/create | Get Lilt Create content +*LiltNode.CreateApi* | [**getLiltCreatePreferences**](docs/CreateApi.md#getLiltCreatePreferences) | **GET** /v2/create/preferences | Get Lilt Create preferences +*LiltNode.CreateApi* | [**regenerateLiltCreateContent**](docs/CreateApi.md#regenerateLiltCreateContent) | **GET** /v2/create/{contentId}/create | Regenerate Lilt Create content +*LiltNode.CreateApi* | [**signLiltCreateTerms**](docs/CreateApi.md#signLiltCreateTerms) | **POST** /v2/create/terms-and-conditions | Sign the Lilt Create terms and conditions +*LiltNode.CreateApi* | [**updateLiltCreateContent**](docs/CreateApi.md#updateLiltCreateContent) | **PUT** /v2/create/{contentId} | Update Lilt Create content +*LiltNode.CreateApi* | [**updateLiltCreatePreferences**](docs/CreateApi.md#updateLiltCreatePreferences) | **PUT** /v2/create/preferences | Update Lilt Create preferences +*LiltNode.DocumentsApi* | [**downloadDocument**](docs/DocumentsApi.md#downloadDocument) | **GET** /v2/documents/files | Download a Document +*LiltNode.DocumentsApi* | [**uploadDocument**](docs/DocumentsApi.md#uploadDocument) | **POST** /v2/documents/files | Upload a File +*LiltNode.FilesApi* | [**addLabel**](docs/FilesApi.md#addLabel) | **POST** /v2/files/labels | Add Label to File +*LiltNode.FilesApi* | [**deleteFile**](docs/FilesApi.md#deleteFile) | **DELETE** /v2/files | Delete a File +*LiltNode.FilesApi* | [**download**](docs/FilesApi.md#download) | **GET** /v2/files/download | Download file +*LiltNode.FilesApi* | [**getFiles**](docs/FilesApi.md#getFiles) | **GET** /v2/files | Retrieve a File +*LiltNode.FilesApi* | [**removeLabel**](docs/FilesApi.md#removeLabel) | **DELETE** /v2/files/labels | Remove Label from File +*LiltNode.FilesApi* | [**uploadFile**](docs/FilesApi.md#uploadFile) | **POST** /v2/files | Upload a File +*LiltNode.JobsApi* | [**archiveJob**](docs/JobsApi.md#archiveJob) | **POST** /v2/jobs/{jobId}/archive | Archive a Job +*LiltNode.JobsApi* | [**createJob**](docs/JobsApi.md#createJob) | **POST** /v2/jobs | Create a Job +*LiltNode.JobsApi* | [**deleteJob**](docs/JobsApi.md#deleteJob) | **DELETE** /v2/jobs/{jobId} | Delete a Job +*LiltNode.JobsApi* | [**deliverJob**](docs/JobsApi.md#deliverJob) | **POST** /v2/jobs/{jobId}/deliver | Deliver a Job +*LiltNode.JobsApi* | [**downloadJob**](docs/JobsApi.md#downloadJob) | **GET** /v2/jobs/{jobId}/downlod | Download a Job +*LiltNode.JobsApi* | [**exportJob**](docs/JobsApi.md#exportJob) | **GET** /v2/jobs/{jobId}/export | Export a Job +*LiltNode.JobsApi* | [**getJob**](docs/JobsApi.md#getJob) | **GET** /v2/jobs/{jobId} | Retrieve a Job +*LiltNode.JobsApi* | [**getJobLeverageStats**](docs/JobsApi.md#getJobLeverageStats) | **POST** /v2/jobs/{jobId}/stats | Retrieve Job Leverage Stats +*LiltNode.JobsApi* | [**reactivateJob**](docs/JobsApi.md#reactivateJob) | **POST** /v2/jobs/{jobId}/reactivate | Reactivate a Job +*LiltNode.JobsApi* | [**retrieveAllJobs**](docs/JobsApi.md#retrieveAllJobs) | **GET** /v2/jobs | Retrieve all Jobs +*LiltNode.JobsApi* | [**unarchiveJob**](docs/JobsApi.md#unarchiveJob) | **POST** /v2/jobs/{jobId}/unarchive | Unarchive a Job +*LiltNode.JobsApi* | [**updateJob**](docs/JobsApi.md#updateJob) | **PUT** /v2/jobs/{jobId} | Update a Job +*LiltNode.LanguagesApi* | [**getLanguages**](docs/LanguagesApi.md#getLanguages) | **GET** /v2/languages | Retrieve supported languages +*LiltNode.MemoriesApi* | [**createMemory**](docs/MemoriesApi.md#createMemory) | **POST** /v2/memories | Create a Memory +*LiltNode.MemoriesApi* | [**deleteMemory**](docs/MemoriesApi.md#deleteMemory) | **DELETE** /v2/memories | Delete a Memory +*LiltNode.MemoriesApi* | [**deleteSegmentFromMemory**](docs/MemoriesApi.md#deleteSegmentFromMemory) | **DELETE** /v2/memories/segment | Delete a segment from a memory. +*LiltNode.MemoriesApi* | [**downloadTermbase**](docs/MemoriesApi.md#downloadTermbase) | **GET** /v2/memories/termbase/download | Termbase download for a Memory +*LiltNode.MemoriesApi* | [**exportTermbase**](docs/MemoriesApi.md#exportTermbase) | **POST** /v2/memories/termbase/export | Termbase export for a Memory +*LiltNode.MemoriesApi* | [**getMemory**](docs/MemoriesApi.md#getMemory) | **GET** /v2/memories | Retrieve a Memory +*LiltNode.MemoriesApi* | [**importMemoryFile**](docs/MemoriesApi.md#importMemoryFile) | **POST** /v2/memories/import | File import for a Memory +*LiltNode.MemoriesApi* | [**queryMemory**](docs/MemoriesApi.md#queryMemory) | **GET** /v2/memories/query | Query a Memory +*LiltNode.MemoriesApi* | [**updateMemory**](docs/MemoriesApi.md#updateMemory) | **PUT** /v2/memories | Update the name of a Memory +*LiltNode.ProjectsApi* | [**createProject**](docs/ProjectsApi.md#createProject) | **POST** /v2/projects | Create a Project +*LiltNode.ProjectsApi* | [**deleteProject**](docs/ProjectsApi.md#deleteProject) | **DELETE** /v2/projects | Delete a Project +*LiltNode.ProjectsApi* | [**getProjects**](docs/ProjectsApi.md#getProjects) | **GET** /v2/projects | Retrieve a Project +*LiltNode.TranslateApi* | [**batchTranslateFile**](docs/TranslateApi.md#batchTranslateFile) | **POST** /v2/translate/file | Translate a File +*LiltNode.TranslateApi* | [**downloadFile**](docs/TranslateApi.md#downloadFile) | **GET** /v2/translate/files | Download translated file +*LiltNode.TranslateApi* | [**monitorFileTranslation**](docs/TranslateApi.md#monitorFileTranslation) | **GET** /v2/translate/file | Monitor file translation +*LiltNode.TranslateApi* | [**translateSegmentPost**](docs/TranslateApi.md#translateSegmentPost) | **POST** /v2/translate | Translate a segment ## Documentation for Models - [LiltNode.AddFileLabelRequest](docs/AddFileLabelRequest.md) - - [LiltNode.Annotation](docs/Annotation.md) - - [LiltNode.ApiRoot](docs/ApiRoot.md) - - [LiltNode.AssignmentDetails](docs/AssignmentDetails.md) - - [LiltNode.AssignmentError](docs/AssignmentError.md) - - [LiltNode.AutoAssignmentParameters](docs/AutoAssignmentParameters.md) - - [LiltNode.AutoAssignmentResponse](docs/AutoAssignmentResponse.md) - - [LiltNode.BadRequest](docs/BadRequest.md) - - [LiltNode.Comment](docs/Comment.md) - - [LiltNode.CommentBody](docs/CommentBody.md) - - [LiltNode.CommentDeleteResponse](docs/CommentDeleteResponse.md) - - [LiltNode.Connector](docs/Connector.md) - - [LiltNode.ConnectorArguments](docs/ConnectorArguments.md) - - [LiltNode.ConnectorDeleteResponse](docs/ConnectorDeleteResponse.md) - - [LiltNode.ConnectorJob](docs/ConnectorJob.md) - - [LiltNode.ConverterConfigUpdateResponse](docs/ConverterConfigUpdateResponse.md) - [LiltNode.CreateConverterConfigParameters](docs/CreateConverterConfigParameters.md) - - [LiltNode.DocumentAssignmentParameters](docs/DocumentAssignmentParameters.md) - - [LiltNode.DocumentAssignmentResponse](docs/DocumentAssignmentResponse.md) - - [LiltNode.DocumentComments](docs/DocumentComments.md) - - [LiltNode.DocumentDeleteResponse](docs/DocumentDeleteResponse.md) - - [LiltNode.DocumentDoneUpdateParameters](docs/DocumentDoneUpdateParameters.md) - - [LiltNode.DocumentDoneUpdateParameters1](docs/DocumentDoneUpdateParameters1.md) - - [LiltNode.DocumentDoneUpdateParameters2](docs/DocumentDoneUpdateParameters2.md) - - [LiltNode.DocumentParameters](docs/DocumentParameters.md) - - [LiltNode.DocumentPretranslateParameters](docs/DocumentPretranslateParameters.md) - - [LiltNode.DocumentPretranslateResponse](docs/DocumentPretranslateResponse.md) - - [LiltNode.DocumentPretranslating](docs/DocumentPretranslating.md) - - [LiltNode.DocumentPretranslatingStatus](docs/DocumentPretranslatingStatus.md) - - [LiltNode.DocumentQuote](docs/DocumentQuote.md) + - [LiltNode.DeleteSegmentFromMemoryResponse](docs/DeleteSegmentFromMemoryResponse.md) - [LiltNode.DocumentWithSegments](docs/DocumentWithSegments.md) - [LiltNode.DocumentWithoutSegments](docs/DocumentWithoutSegments.md) - [LiltNode.DocumentWithoutSegmentsStatus](docs/DocumentWithoutSegmentsStatus.md) - - [LiltNode.DocumentWorkflow](docs/DocumentWorkflow.md) - - [LiltNode.EditFilterMappingParameters](docs/EditFilterMappingParameters.md) - [LiltNode.Error](docs/Error.md) - [LiltNode.FileDeleteResponse](docs/FileDeleteResponse.md) + - [LiltNode.InlineResponse200](docs/InlineResponse200.md) - [LiltNode.Job](docs/Job.md) - [LiltNode.JobCreateParameters](docs/JobCreateParameters.md) - [LiltNode.JobDeleteResponse](docs/JobDeleteResponse.md) @@ -291,66 +218,27 @@ Class | Method | HTTP request | Description - [LiltNode.JobUpdateParameters](docs/JobUpdateParameters.md) - [LiltNode.LanguagePair](docs/LanguagePair.md) - [LiltNode.LanguagesResponse](docs/LanguagesResponse.md) - - [LiltNode.LexiconEntry](docs/LexiconEntry.md) - - [LiltNode.LexiconEntryExamples](docs/LexiconEntryExamples.md) - - [LiltNode.LexiconEntrySourceSpan](docs/LexiconEntrySourceSpan.md) - - [LiltNode.LexiconEntryTargetSpan](docs/LexiconEntryTargetSpan.md) - - [LiltNode.LexiconEntryTranslations](docs/LexiconEntryTranslations.md) - - [LiltNode.LexiconUpdateParameters](docs/LexiconUpdateParameters.md) - - [LiltNode.LexiconUpdateResponse](docs/LexiconUpdateResponse.md) - - [LiltNode.MatchBand](docs/MatchBand.md) + - [LiltNode.LiltCreateContent](docs/LiltCreateContent.md) - [LiltNode.Memory](docs/Memory.md) - [LiltNode.MemoryCreateParameters](docs/MemoryCreateParameters.md) - [LiltNode.MemoryDeleteResponse](docs/MemoryDeleteResponse.md) - [LiltNode.MemoryImportResponse](docs/MemoryImportResponse.md) - - [LiltNode.MemoryInsertResponse](docs/MemoryInsertResponse.md) - [LiltNode.MemoryUpdateParameters](docs/MemoryUpdateParameters.md) - - [LiltNode.MemoryUpdateResponse](docs/MemoryUpdateResponse.md) - - [LiltNode.NextWorkflowTask](docs/NextWorkflowTask.md) - [LiltNode.Project](docs/Project.md) - [LiltNode.ProjectCreateParameters](docs/ProjectCreateParameters.md) - [LiltNode.ProjectDeleteResponse](docs/ProjectDeleteResponse.md) - - [LiltNode.ProjectQuote](docs/ProjectQuote.md) - [LiltNode.ProjectStats](docs/ProjectStats.md) - - [LiltNode.ProjectStatus](docs/ProjectStatus.md) - - [LiltNode.ProjectUpdateResponse](docs/ProjectUpdateResponse.md) - - [LiltNode.ProjectsToDeliver](docs/ProjectsToDeliver.md) - - [LiltNode.ProjectsToUpdate](docs/ProjectsToUpdate.md) - - [LiltNode.QARuleMatches](docs/QARuleMatches.md) - - [LiltNode.QARuleMatchesContext](docs/QARuleMatchesContext.md) - - [LiltNode.QARuleMatchesCustomRules](docs/QARuleMatchesCustomRules.md) - - [LiltNode.QARuleMatchesMatches](docs/QARuleMatchesMatches.md) - - [LiltNode.QARuleMatchesReplacements](docs/QARuleMatchesReplacements.md) - - [LiltNode.QARuleMatchesRule](docs/QARuleMatchesRule.md) - - [LiltNode.QARuleMatchesRuleCategory](docs/QARuleMatchesRuleCategory.md) - - [LiltNode.QARuleMatchesRuleUrls](docs/QARuleMatchesRuleUrls.md) - - [LiltNode.ResourceStatus](docs/ResourceStatus.md) - - [LiltNode.ReviewCompletionTypeError](docs/ReviewCompletionTypeError.md) + - [LiltNode.SDLXLIFFFilter](docs/SDLXLIFFFilter.md) - [LiltNode.Segment](docs/Segment.md) - - [LiltNode.SegmentCreateParameters](docs/SegmentCreateParameters.md) - - [LiltNode.SegmentDeleteResponse](docs/SegmentDeleteResponse.md) - - [LiltNode.SegmentDoneResponse](docs/SegmentDoneResponse.md) - - [LiltNode.SegmentUpdateParameters](docs/SegmentUpdateParameters.md) - - [LiltNode.SegmentWithComments](docs/SegmentWithComments.md) - - [LiltNode.SetDocumentStageRequest](docs/SetDocumentStageRequest.md) - - [LiltNode.Setting](docs/Setting.md) - - [LiltNode.SettingUpsertBody](docs/SettingUpsertBody.md) - - [LiltNode.SettingUpsertResponse](docs/SettingUpsertResponse.md) + - [LiltNode.SignLiltCreateTermsResponse](docs/SignLiltCreateTermsResponse.md) - [LiltNode.SourceFile](docs/SourceFile.md) - - [LiltNode.TaggedSegment](docs/TaggedSegment.md) - - [LiltNode.TranslateCompletionTypeError](docs/TranslateCompletionTypeError.md) - - [LiltNode.TranslateRegisterResponse](docs/TranslateRegisterResponse.md) + - [LiltNode.TermbaseExportResponse](docs/TermbaseExportResponse.md) - [LiltNode.TranslateSegmentBody](docs/TranslateSegmentBody.md) - - [LiltNode.TranslateSegmentBody1](docs/TranslateSegmentBody1.md) - [LiltNode.Translation](docs/Translation.md) - [LiltNode.TranslationInfo](docs/TranslationInfo.md) - [LiltNode.TranslationList](docs/TranslationList.md) - [LiltNode.TranslationMemoryEntry](docs/TranslationMemoryEntry.md) - - [LiltNode.WorkflowStage](docs/WorkflowStage.md) - [LiltNode.WorkflowStageAssignment](docs/WorkflowStageAssignment.md) - - [LiltNode.WorkflowStageTemplate](docs/WorkflowStageTemplate.md) - - [LiltNode.WorkflowTask](docs/WorkflowTask.md) - - [LiltNode.WorkflowTemplate](docs/WorkflowTemplate.md) ## Documentation for Authorization diff --git a/docs/CreateApi.md b/docs/CreateApi.md new file mode 100644 index 0000000..7268258 --- /dev/null +++ b/docs/CreateApi.md @@ -0,0 +1,501 @@ +# LiltNode.CreateApi + +All URIs are relative to *https://api.lilt.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteLiltCreateContent**](CreateApi.md#deleteLiltCreateContent) | **DELETE** /v2/create/{contentId} | Delete Lilt Create content +[**generateLiltCreateContent**](CreateApi.md#generateLiltCreateContent) | **POST** /v2/create | Generate new Lilt Create content +[**getLiltCreateById**](CreateApi.md#getLiltCreateById) | **GET** /v2/create/{contentId} | Get Lilt Create content by ID. +[**getLiltCreateContent**](CreateApi.md#getLiltCreateContent) | **GET** /v2/create | Get Lilt Create content +[**getLiltCreatePreferences**](CreateApi.md#getLiltCreatePreferences) | **GET** /v2/create/preferences | Get Lilt Create preferences +[**regenerateLiltCreateContent**](CreateApi.md#regenerateLiltCreateContent) | **GET** /v2/create/{contentId}/create | Regenerate Lilt Create content +[**signLiltCreateTerms**](CreateApi.md#signLiltCreateTerms) | **POST** /v2/create/terms-and-conditions | Sign the Lilt Create terms and conditions +[**updateLiltCreateContent**](CreateApi.md#updateLiltCreateContent) | **PUT** /v2/create/{contentId} | Update Lilt Create content +[**updateLiltCreatePreferences**](CreateApi.md#updateLiltCreatePreferences) | **PUT** /v2/create/preferences | Update Lilt Create preferences + + + +## deleteLiltCreateContent + +> InlineResponse200 deleteLiltCreateContent(contentId) + +Delete Lilt Create content + +Delete a piece of Lilt Create content. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + +### Example + +```javascript +import LiltNode from 'lilt-node'; +let defaultClient = LiltNode.ApiClient.instance; +// Configure API key authorization: ApiKeyAuth +let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; +ApiKeyAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//ApiKeyAuth.apiKeyPrefix = 'Token'; +// Configure HTTP basic authorization: BasicAuth +let BasicAuth = defaultClient.authentications['BasicAuth']; +BasicAuth.username = 'YOUR USERNAME'; +BasicAuth.password = 'YOUR PASSWORD'; + +let apiInstance = new LiltNode.CreateApi(); +let contentId = 56; // Number | The content ID. +apiInstance.deleteLiltCreateContent(contentId).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentId** | **Number**| The content ID. | + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## generateLiltCreateContent + +> generateLiltCreateContent(templateParams) + +Generate new Lilt Create content + +Generate new Lilt Create content with the given parameters. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"language\":\"en-US\", \"template\":\"blog-post\", \"templateParams\":{ \"contentLength\":\"100\", \"language\":\"en-US\", \"sections\":[], \"summary\":\"a blog post about hiking\" }, \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"} }' ``` + +### Example + +```javascript +import LiltNode from 'lilt-node'; +let defaultClient = LiltNode.ApiClient.instance; +// Configure API key authorization: ApiKeyAuth +let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; +ApiKeyAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//ApiKeyAuth.apiKeyPrefix = 'Token'; +// Configure HTTP basic authorization: BasicAuth +let BasicAuth = defaultClient.authentications['BasicAuth']; +BasicAuth.username = 'YOUR USERNAME'; +BasicAuth.password = 'YOUR PASSWORD'; + +let apiInstance = new LiltNode.CreateApi(); +let templateParams = new LiltNode.LiltCreateContent(); // LiltCreateContent | Input parameters that determine what content will be generated. +apiInstance.generateLiltCreateContent(templateParams).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateParams** | [**LiltCreateContent**](LiltCreateContent.md)| Input parameters that determine what content will be generated. | + +### Return type + +null (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + + +## getLiltCreateById + +> LiltCreateContent getLiltCreateById(contentId) + +Get Lilt Create content by ID. + +Get Lilt Create content by ID. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + +### Example + +```javascript +import LiltNode from 'lilt-node'; +let defaultClient = LiltNode.ApiClient.instance; +// Configure API key authorization: ApiKeyAuth +let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; +ApiKeyAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//ApiKeyAuth.apiKeyPrefix = 'Token'; +// Configure HTTP basic authorization: BasicAuth +let BasicAuth = defaultClient.authentications['BasicAuth']; +BasicAuth.username = 'YOUR USERNAME'; +BasicAuth.password = 'YOUR PASSWORD'; + +let apiInstance = new LiltNode.CreateApi(); +let contentId = 56; // Number | The content ID. +apiInstance.getLiltCreateById(contentId).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentId** | **Number**| The content ID. | + +### Return type + +[**LiltCreateContent**](LiltCreateContent.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## getLiltCreateContent + +> [LiltCreateContent] getLiltCreateContent() + +Get Lilt Create content + +Get a list of all content that has been generated by Lilt Create. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create?key=API_KEY' ``` + +### Example + +```javascript +import LiltNode from 'lilt-node'; +let defaultClient = LiltNode.ApiClient.instance; +// Configure API key authorization: ApiKeyAuth +let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; +ApiKeyAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//ApiKeyAuth.apiKeyPrefix = 'Token'; +// Configure HTTP basic authorization: BasicAuth +let BasicAuth = defaultClient.authentications['BasicAuth']; +BasicAuth.username = 'YOUR USERNAME'; +BasicAuth.password = 'YOUR PASSWORD'; + +let apiInstance = new LiltNode.CreateApi(); +apiInstance.getLiltCreateContent().then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**[LiltCreateContent]**](LiltCreateContent.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## getLiltCreatePreferences + +> getLiltCreatePreferences() + +Get Lilt Create preferences + +Get the stored preferences for Lilt Create. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ``` + +### Example + +```javascript +import LiltNode from 'lilt-node'; +let defaultClient = LiltNode.ApiClient.instance; +// Configure API key authorization: ApiKeyAuth +let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; +ApiKeyAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//ApiKeyAuth.apiKeyPrefix = 'Token'; +// Configure HTTP basic authorization: BasicAuth +let BasicAuth = defaultClient.authentications['BasicAuth']; +BasicAuth.username = 'YOUR USERNAME'; +BasicAuth.password = 'YOUR PASSWORD'; + +let apiInstance = new LiltNode.CreateApi(); +apiInstance.getLiltCreatePreferences().then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## regenerateLiltCreateContent + +> regenerateLiltCreateContent(contentId) + +Regenerate Lilt Create content + +Regenerate the given piece of content with the current parameters. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' ``` + +### Example + +```javascript +import LiltNode from 'lilt-node'; +let defaultClient = LiltNode.ApiClient.instance; +// Configure API key authorization: ApiKeyAuth +let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; +ApiKeyAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//ApiKeyAuth.apiKeyPrefix = 'Token'; +// Configure HTTP basic authorization: BasicAuth +let BasicAuth = defaultClient.authentications['BasicAuth']; +BasicAuth.username = 'YOUR USERNAME'; +BasicAuth.password = 'YOUR PASSWORD'; + +let apiInstance = new LiltNode.CreateApi(); +let contentId = 56; // Number | The content ID. +apiInstance.regenerateLiltCreateContent(contentId).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentId** | **Number**| The content ID. | + +### Return type + +null (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + + +## signLiltCreateTerms + +> SignLiltCreateTermsResponse signLiltCreateTerms(signedAgreement) + +Sign the Lilt Create terms and conditions + +Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"signedAgreement\": true}' ``` + +### Example + +```javascript +import LiltNode from 'lilt-node'; +let defaultClient = LiltNode.ApiClient.instance; +// Configure API key authorization: ApiKeyAuth +let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; +ApiKeyAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//ApiKeyAuth.apiKeyPrefix = 'Token'; +// Configure HTTP basic authorization: BasicAuth +let BasicAuth = defaultClient.authentications['BasicAuth']; +BasicAuth.username = 'YOUR USERNAME'; +BasicAuth.password = 'YOUR PASSWORD'; + +let apiInstance = new LiltNode.CreateApi(); +let signedAgreement = new LiltNode.CreateConverterConfigParameters(); // CreateConverterConfigParameters | +apiInstance.signLiltCreateTerms(signedAgreement).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **signedAgreement** | [**CreateConverterConfigParameters**](CreateConverterConfigParameters.md)| | + +### Return type + +[**SignLiltCreateTermsResponse**](SignLiltCreateTermsResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## updateLiltCreateContent + +> LiltCreateContent updateLiltCreateContent(contentId, opts) + +Update Lilt Create content + +Update a piece of Lilt Create content. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"language\":\"de-DE\"}' ``` + +### Example + +```javascript +import LiltNode from 'lilt-node'; +let defaultClient = LiltNode.ApiClient.instance; +// Configure API key authorization: ApiKeyAuth +let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; +ApiKeyAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//ApiKeyAuth.apiKeyPrefix = 'Token'; +// Configure HTTP basic authorization: BasicAuth +let BasicAuth = defaultClient.authentications['BasicAuth']; +BasicAuth.username = 'YOUR USERNAME'; +BasicAuth.password = 'YOUR PASSWORD'; + +let apiInstance = new LiltNode.CreateApi(); +let contentId = 56; // Number | The content ID. +let opts = { + 'body': new LiltNode.LiltCreateContent() // LiltCreateContent | +}; +apiInstance.updateLiltCreateContent(contentId, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contentId** | **Number**| The content ID. | + **body** | [**LiltCreateContent**](LiltCreateContent.md)| | [optional] + +### Return type + +[**LiltCreateContent**](LiltCreateContent.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## updateLiltCreatePreferences + +> updateLiltCreatePreferences(opts) + +Update Lilt Create preferences + +Update the stored preferences for Lilt Create. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"tone\": \"formal\", \"styleguide\": \"\"}' ``` + +### Example + +```javascript +import LiltNode from 'lilt-node'; +let defaultClient = LiltNode.ApiClient.instance; +// Configure API key authorization: ApiKeyAuth +let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; +ApiKeyAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//ApiKeyAuth.apiKeyPrefix = 'Token'; +// Configure HTTP basic authorization: BasicAuth +let BasicAuth = defaultClient.authentications['BasicAuth']; +BasicAuth.username = 'YOUR USERNAME'; +BasicAuth.password = 'YOUR PASSWORD'; + +let apiInstance = new LiltNode.CreateApi(); +let opts = { + 'styleguide': new LiltNode.LiltCreateContent() // LiltCreateContent | Which styleguide to use. +}; +apiInstance.updateLiltCreatePreferences(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **styleguide** | [**LiltCreateContent**](LiltCreateContent.md)| Which styleguide to use. | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + diff --git a/docs/CreateConverterConfigParameters.md b/docs/CreateConverterConfigParameters.md index 652af70..11a9c56 100644 --- a/docs/CreateConverterConfigParameters.md +++ b/docs/CreateConverterConfigParameters.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**configJson** | **String** | The configuration json blob, string escaped. | -**configName** | **String** | The user defined name of your configuration. | -**configDescription** | **String** | A description for the configuration. | +**signedAgreement** | **Boolean** | Signifies that the Organization has signed the agreement or not. | diff --git a/docs/DeleteSegmentFromMemoryResponse.md b/docs/DeleteSegmentFromMemoryResponse.md new file mode 100644 index 0000000..8b42404 --- /dev/null +++ b/docs/DeleteSegmentFromMemoryResponse.md @@ -0,0 +1,9 @@ +# LiltNode.DeleteSegmentFromMemoryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **Boolean** | | [optional] + + diff --git a/docs/DocumentWithSegments.md b/docs/DocumentWithSegments.md index adc0c5e..db31229 100644 --- a/docs/DocumentWithSegments.md +++ b/docs/DocumentWithSegments.md @@ -21,6 +21,7 @@ Name | Type | Description | Notes **reviewerEmail** | **String** | The email of the assigned reviewer. | [optional] **createdAt** | **Number** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] **updatedAt** | **Number** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] +**isReviewComplete** | **Boolean** | Document review status. | [optional] **segments** | [**[Segment]**](Segment.md) | A list of Segments. | [optional] diff --git a/docs/DocumentWithoutSegments.md b/docs/DocumentWithoutSegments.md index b79c6d3..2df5add 100644 --- a/docs/DocumentWithoutSegments.md +++ b/docs/DocumentWithoutSegments.md @@ -19,7 +19,9 @@ Name | Type | Description | Notes **status** | [**DocumentWithoutSegmentsStatus**](DocumentWithoutSegmentsStatus.md) | | [optional] **translatorEmail** | **String** | The email of the assigned translator. | [optional] **reviewerEmail** | **String** | The email of the assigned reviewer. | [optional] +**customerReviewerEmail** | **String** | The email of the assigned customer reviewer. Only present if the project was request by id. | [optional] **createdAt** | **Number** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] **updatedAt** | **Number** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] +**isReviewComplete** | **Boolean** | Document review status. | [optional] diff --git a/docs/DocumentsApi.md b/docs/DocumentsApi.md index 96be57d..59c524f 100644 --- a/docs/DocumentsApi.md +++ b/docs/DocumentsApi.md @@ -1,193 +1,21 @@ # LiltNode.DocumentsApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**assignDocument**](DocumentsApi.md#assignDocument) | **PUT** /documents/share | Assign a Document -[**createDocument**](DocumentsApi.md#createDocument) | **POST** /documents | Create a Document -[**deleteDocument**](DocumentsApi.md#deleteDocument) | **DELETE** /documents | Delete a Document -[**downloadDocument**](DocumentsApi.md#downloadDocument) | **GET** /documents/files | Download a Document -[**getDocument**](DocumentsApi.md#getDocument) | **GET** /documents | Retrieve a Document -[**markReviewDone**](DocumentsApi.md#markReviewDone) | **POST** /documents/done/review | Mark review done -[**markTranslationDone**](DocumentsApi.md#markTranslationDone) | **POST** /documents/done/translation | Mark translation done -[**pretranslateDocuments**](DocumentsApi.md#pretranslateDocuments) | **POST** /documents/pretranslate | Pretranslate a Document -[**unlockDocuments**](DocumentsApi.md#unlockDocuments) | **POST** /documents/done/unlock | Unlock documents -[**uploadDocument**](DocumentsApi.md#uploadDocument) | **POST** /documents/files | Upload a File +[**downloadDocument**](DocumentsApi.md#downloadDocument) | **GET** /v2/documents/files | Download a Document +[**uploadDocument**](DocumentsApi.md#uploadDocument) | **POST** /v2/documents/files | Upload a File -## assignDocument - -> DocumentAssignmentResponse assignDocument(body) - -Assign a Document - -Assign and unassign a Document for translation and/or review. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.DocumentsApi(); -let body = new LiltNode.DocumentAssignmentParameters(); // DocumentAssignmentParameters | -apiInstance.assignDocument(body).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentAssignmentParameters**](DocumentAssignmentParameters.md)| | - -### Return type - -[**DocumentAssignmentResponse**](DocumentAssignmentResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## createDocument - -> DocumentWithSegments createDocument(opts) - -Create a Document - -Create a new Document. A Document is a collection of one or more Segments. Documents are nested inside of Projects, and appear in the Project details view in the web app. Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.DocumentsApi(); -let opts = { - 'body': new LiltNode.DocumentParameters() // DocumentParameters | -}; -apiInstance.createDocument(opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentParameters**](DocumentParameters.md)| | [optional] - -### Return type - -[**DocumentWithSegments**](DocumentWithSegments.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## deleteDocument - -> DocumentDeleteResponse deleteDocument(id) - -Delete a Document - -Delete a Document. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.DocumentsApi(); -let id = 56; // Number | A unique Document identifier. -apiInstance.deleteDocument(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Number**| A unique Document identifier. | - -### Return type - -[**DocumentDeleteResponse**](DocumentDeleteResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - ## downloadDocument > Blob downloadDocument(id, opts) Download a Document -Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` +Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` ### Example @@ -239,297 +67,13 @@ Name | Type | Description | Notes - **Accept**: application/octet-stream -## getDocument - -> DocumentWithSegments getDocument(id, opts) - -Retrieve a Document - -List a Document. The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.DocumentsApi(); -let id = 56; // Number | A unique Document identifier. -let opts = { - 'withSegments': true // Boolean | Flag indicating whether full segment information should be returned. -}; -apiInstance.getDocument(id, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Number**| A unique Document identifier. | - **withSegments** | **Boolean**| Flag indicating whether full segment information should be returned. | [optional] - -### Return type - -[**DocumentWithSegments**](DocumentWithSegments.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## markReviewDone - -> [Number] markReviewDone(body) - -Mark review done - -Mark the review of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done for review. - Documents must already be marked as done for translation. - This request will also trigger an email notification. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.DocumentsApi(); -let body = new LiltNode.DocumentDoneUpdateParameters2(); // DocumentDoneUpdateParameters2 | -apiInstance.markReviewDone(body).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentDoneUpdateParameters2**](DocumentDoneUpdateParameters2.md)| | - -### Return type - -**[Number]** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## markTranslationDone - -> [Number] markTranslationDone(body) - -Mark translation done - -Mark the translation of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done and all segments must be confirmed. - This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review. When being marked as un-done: - Documents must not be marked as complete for review. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.DocumentsApi(); -let body = new LiltNode.DocumentDoneUpdateParameters1(); // DocumentDoneUpdateParameters1 | -apiInstance.markTranslationDone(body).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentDoneUpdateParameters1**](DocumentDoneUpdateParameters1.md)| | - -### Return type - -**[Number]** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## pretranslateDocuments - -> DocumentPretranslateResponse pretranslateDocuments(body, opts) - -Pretranslate a Document - -Initiate pretranslation of a list of Documents. This request will mark document(s) as being pretranslated. Pretranslation in this context is: - Applying and confirming exact TM matches based on the Memory of the Project; - Translating all other segments via MT without confirming them. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d '{\"id\": [123]}' -H \"Content-Type: application/json\" ``` Document translation is an asynchronous process that, in effect, is performed in the background. To check the status of pretranslation for a document, use the `GET /documents` endpoint. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. Once pretranslation is finished, the document can be downloaded via `GET /documents/files`. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.DocumentsApi(); -let body = new LiltNode.DocumentPretranslateParameters(); // DocumentPretranslateParameters | -let opts = { - 'autoAccept': true, // Boolean | Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. - 'caseSensitive': true, // Boolean | Deprecated, use body param instead. Optional for using case matching against TM hits. - 'attributeToCreator': true, // Boolean | Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. - 'mode': "mode_example" // String | Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. -}; -apiInstance.pretranslateDocuments(body, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentPretranslateParameters**](DocumentPretranslateParameters.md)| | - **autoAccept** | **Boolean**| Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. | [optional] - **caseSensitive** | **Boolean**| Deprecated, use body param instead. Optional for using case matching against TM hits. | [optional] - **attributeToCreator** | **Boolean**| Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. | [optional] - **mode** | **String**| Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. | [optional] - -### Return type - -[**DocumentPretranslateResponse**](DocumentPretranslateResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## unlockDocuments - -> [Number] unlockDocuments(body) - -Unlock documents - -Unlock documents for translation. Sets document \"Translation Done\" and \"Review Done\" to false. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922] }' ``` - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.DocumentsApi(); -let body = new LiltNode.DocumentDoneUpdateParameters(); // DocumentDoneUpdateParameters | -apiInstance.unlockDocuments(body).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentDoneUpdateParameters**](DocumentDoneUpdateParameters.md)| | - -### Return type - -**[Number]** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - ## uploadDocument > DocumentWithSegments uploadDocument(name, projectId, body, opts) Upload a File -Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` +Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` ### Example diff --git a/docs/FilesApi.md b/docs/FilesApi.md index 56aeab8..9cc8e94 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -1,15 +1,15 @@ # LiltNode.FilesApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**addLabel**](FilesApi.md#addLabel) | **POST** /files/labels | Add Label to File -[**deleteFile**](FilesApi.md#deleteFile) | **DELETE** /files | Delete a File -[**download**](FilesApi.md#download) | **GET** /files/download | Download file -[**getFiles**](FilesApi.md#getFiles) | **GET** /files | Retrieve a File -[**removeLabel**](FilesApi.md#removeLabel) | **DELETE** /files/labels | Remove Label from File -[**uploadFile**](FilesApi.md#uploadFile) | **POST** /files | Upload a File +[**addLabel**](FilesApi.md#addLabel) | **POST** /v2/files/labels | Add Label to File +[**deleteFile**](FilesApi.md#deleteFile) | **DELETE** /v2/files | Delete a File +[**download**](FilesApi.md#download) | **GET** /v2/files/download | Download file +[**getFiles**](FilesApi.md#getFiles) | **GET** /v2/files | Retrieve a File +[**removeLabel**](FilesApi.md#removeLabel) | **DELETE** /v2/files/labels | Remove Label from File +[**uploadFile**](FilesApi.md#uploadFile) | **POST** /v2/files | Upload a File @@ -19,7 +19,7 @@ Method | HTTP request | Description Add Label to File -Add a label to a File. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` +Add a label to a File. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` ### Example @@ -75,7 +75,7 @@ null (empty response body) Delete a File -Delete a File. Example CURL command: ``` curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ``` +Delete a File. Example CURL command: ``` curl -X DELETE https://api.lilt.com/v2/files?key=API_KEY&id=123 ``` ### Example @@ -129,7 +129,7 @@ Name | Type | Description | Notes Download file -Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' ``` +Download a File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/files/download?key=API_KEY&id=1' ``` ### Example @@ -183,7 +183,7 @@ Name | Type | Description | Notes Retrieve a File -Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the <strong>id</strong> request parameter. To retrieve all files, omit the <strong>id</strong> request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/files?key=API_KEY&id=274``` +Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the <strong>id</strong> request parameter. To retrieve all files, omit the <strong>id</strong> request parameter. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274``` ### Example @@ -241,7 +241,7 @@ Name | Type | Description | Notes Remove Label from File -Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://lilt.com/2/files/labels?key=API_KEY&id=1&name=label_name' ``` +Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1&name=label_name' ``` ### Example @@ -297,7 +297,7 @@ null (empty response body) Upload a File -Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. +Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. ### Example diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md index 686afc4..553af90 100644 --- a/docs/InlineResponse200.md +++ b/docs/InlineResponse200.md @@ -4,8 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**file** | **File** | | [optional] -**detectedLang** | **String** | Language associated with the file. | [optional] -**detectedLangConfidence** | **Number** | Confidence score for the language associated with the file. | [optional] +**id** | **Number** | The ID of the deleted Lilt Create content. | [optional] diff --git a/docs/JobCreateParameters.md b/docs/JobCreateParameters.md index b1ee332..92bf62c 100644 --- a/docs/JobCreateParameters.md +++ b/docs/JobCreateParameters.md @@ -8,7 +8,10 @@ Name | Type | Description | Notes **languagePairs** | [**[LanguagePair]**](LanguagePair.md) | Language pairs is a set of one or more pairs that includes source language, source locale(optional), target language, target locale(optional), and memoryId. | **fileIds** | **[Number]** | A list of file ids to upload to job creation. | **due** | **String** | An ISO string date representing job due date. | [optional] +**srcLang** | **String** | 2-letter ISO source language code | +**srcLocale** | **String** | 2-letter source language code | **isPlural** | **Boolean** | A boolean value representing if the files have plurals. | [optional] **workflowTemplateId** | **Number** | Identifier of the workflow template to be used when creating a job. If not passed the organization default will be used. | [optional] +**workflowTemplateName** | **Number** | Name of the workflow template to be used, must be passed with teamId or look up will fail. If workflowTemplateId is passed it supercedes any other look up. | [optional] diff --git a/docs/JobUpdateParameters.md b/docs/JobUpdateParameters.md index c8e0f30..4b0b2de 100644 --- a/docs/JobUpdateParameters.md +++ b/docs/JobUpdateParameters.md @@ -6,5 +6,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | A name for the Job. | [optional] **dueDate** | **Number** | An ISO string date. | [optional] +**isProcessing** | **String** | The processing status of the job. Provide one of the following integers to indicate the status. Ok = 0 Started = 1 ExportError = -2 | [optional] +**processingErrorMsg** | **String** | The processing error message. | [optional] + + + +## Enum: IsProcessingEnum + + +* `0` (value: `"0"`) + +* `1` (value: `"1"`) + +* `-2` (value: `"-2"`) + + diff --git a/docs/JobsApi.md b/docs/JobsApi.md index 1b7ca6b..4a4b6dd 100644 --- a/docs/JobsApi.md +++ b/docs/JobsApi.md @@ -1,21 +1,21 @@ # LiltNode.JobsApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**archiveJob**](JobsApi.md#archiveJob) | **POST** /jobs/{jobId}/archive | Archive a Job -[**createJob**](JobsApi.md#createJob) | **POST** /jobs | Create a Job -[**deleteJob**](JobsApi.md#deleteJob) | **DELETE** /jobs/{jobId} | Delete a Job -[**deliverJob**](JobsApi.md#deliverJob) | **POST** /jobs/{jobId}/deliver | Deliver a Job -[**downloadJob**](JobsApi.md#downloadJob) | **GET** /jobs/{jobId}/downlod | Download a Job -[**exportJob**](JobsApi.md#exportJob) | **GET** /jobs/{jobId}/export | Export a Job -[**getJob**](JobsApi.md#getJob) | **GET** /jobs/{jobId} | Retrieve a Job -[**getJobLeverageStats**](JobsApi.md#getJobLeverageStats) | **POST** /jobs/{jobId}/stats | Retrieve Job Leverage Stats -[**reactivateJob**](JobsApi.md#reactivateJob) | **POST** /jobs/{jobId}/reactivate | Reactivate a Job -[**retrieveAllJobs**](JobsApi.md#retrieveAllJobs) | **GET** /jobs | Retrieve all Jobs -[**unarchiveJob**](JobsApi.md#unarchiveJob) | **POST** /jobs/{jobId}/unarchive | Unarchive a Job -[**updateJob**](JobsApi.md#updateJob) | **PUT** /jobs/{jobId} | Update a Job +[**archiveJob**](JobsApi.md#archiveJob) | **POST** /v2/jobs/{jobId}/archive | Archive a Job +[**createJob**](JobsApi.md#createJob) | **POST** /v2/jobs | Create a Job +[**deleteJob**](JobsApi.md#deleteJob) | **DELETE** /v2/jobs/{jobId} | Delete a Job +[**deliverJob**](JobsApi.md#deliverJob) | **POST** /v2/jobs/{jobId}/deliver | Deliver a Job +[**downloadJob**](JobsApi.md#downloadJob) | **GET** /v2/jobs/{jobId}/downlod | Download a Job +[**exportJob**](JobsApi.md#exportJob) | **GET** /v2/jobs/{jobId}/export | Export a Job +[**getJob**](JobsApi.md#getJob) | **GET** /v2/jobs/{jobId} | Retrieve a Job +[**getJobLeverageStats**](JobsApi.md#getJobLeverageStats) | **POST** /v2/jobs/{jobId}/stats | Retrieve Job Leverage Stats +[**reactivateJob**](JobsApi.md#reactivateJob) | **POST** /v2/jobs/{jobId}/reactivate | Reactivate a Job +[**retrieveAllJobs**](JobsApi.md#retrieveAllJobs) | **GET** /v2/jobs | Retrieve all Jobs +[**unarchiveJob**](JobsApi.md#unarchiveJob) | **POST** /v2/jobs/{jobId}/unarchive | Unarchive a Job +[**updateJob**](JobsApi.md#updateJob) | **PUT** /v2/jobs/{jobId} | Update a Job @@ -25,7 +25,7 @@ Method | HTTP request | Description Archive a Job -Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/archive?key=API_KEY' ``` +Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY' ``` ### Example @@ -79,7 +79,7 @@ Name | Type | Description | Notes Create a Job -Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` +Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` ### Example @@ -133,7 +133,7 @@ Name | Type | Description | Notes Delete a Job -Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` +Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` ### Example @@ -187,7 +187,7 @@ Name | Type | Description | Notes Deliver a Job -Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY' ``` +Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY' ``` ### Example @@ -241,7 +241,7 @@ Name | Type | Description | Notes Download a Job -Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY' ``` +Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY' ``` ### Example @@ -295,7 +295,7 @@ null (empty response body) Export a Job -Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. +Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. ### Example @@ -351,7 +351,7 @@ null (empty response body) Retrieve a Job -Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` +Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` ### Example @@ -405,7 +405,7 @@ Name | Type | Description | Notes Retrieve Job Leverage Stats -Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/stats?key=API_KEY' ``` +Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY' ``` ### Example @@ -459,7 +459,7 @@ Name | Type | Description | Notes Reactivate a Job -Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/reactivate?key=API_KEY' ``` +Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY' ``` ### Example @@ -513,7 +513,7 @@ Name | Type | Description | Notes Retrieve all Jobs -Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false' ``` +Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false' ``` ### Example @@ -575,7 +575,7 @@ Name | Type | Description | Notes Unarchive a Job -Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/unarchive?key=API_KEY' ``` +Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY' ``` ### Example @@ -629,7 +629,7 @@ Name | Type | Description | Notes Update a Job -Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://lilt.com/2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` +Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` ### Example diff --git a/docs/LanguagePair.md b/docs/LanguagePair.md index 1f8027e..cba39a3 100644 --- a/docs/LanguagePair.md +++ b/docs/LanguagePair.md @@ -10,12 +10,14 @@ Name | Type | Description | Notes **trgLocale** | **String** | A locale identifier, supported for target language. | [optional] **dueDate** | **String** | An ISO date. | [optional] **memoryId** | **Number** | A unique number identifying the associated Memory. | +**externalModelId** | **Number** | A unique identifier for working with a third party model in the Lilt Platform | [optional] **pretranslate** | **Boolean** | Attribute translation authorship of exact matches to the creator of the document being pretranslated. | [optional] **autoAccept** | **Boolean** | Accept and lock exact matches. | [optional] **caseSensitive** | **Boolean** | Use case sensitive translation memory matching. | [optional] **takeMatchAttribution** | **Boolean** | Use MT for unmatched segments. | [optional] **configId** | **Number** | Configuration id | [optional] **workflowTemplateId** | **Number** | Workflow Template id, to assign a specific Workflow to the project created out of this Language Pair. WorkflowTemplateIds can be retrieved via the /workflows/templates endpoint. If not specified then the Job level workflowTemplateId will be used. | [optional] +**workflowTemplateName** | **Number** | Workflow Template Name, when passed with TeamId it allows for an on the fly look up of the correct WorkflowTemplate to use. If workflowTemplateId is passed the workflowTemplateId supercedes other lookups. | [optional] **workflowStageAssignments** | [**[WorkflowStageAssignment]**](WorkflowStageAssignment.md) | | [optional] diff --git a/docs/LanguagesApi.md b/docs/LanguagesApi.md index 737362d..0963235 100644 --- a/docs/LanguagesApi.md +++ b/docs/LanguagesApi.md @@ -1,10 +1,10 @@ # LiltNode.LanguagesApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getLanguages**](LanguagesApi.md#getLanguages) | **GET** /languages | Retrieve supported languages +[**getLanguages**](LanguagesApi.md#getLanguages) | **GET** /v2/languages | Retrieve supported languages diff --git a/docs/LiltCreateContent.md b/docs/LiltCreateContent.md new file mode 100644 index 0000000..011e95a --- /dev/null +++ b/docs/LiltCreateContent.md @@ -0,0 +1,14 @@ +# LiltNode.LiltCreateContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tone** | **String** | The tone of the content. | [optional] +**terms** | **String** | The terms of the content. | [optional] +**summary** | **String** | The summary of the content. | [optional] +**language** | **String** | The language of the content. | [optional] +**memoryId** | **String** | The memory ID of the content. | [optional] +**sections** | **[String]** | The sections of the content. | [optional] + + diff --git a/docs/MemoriesApi.md b/docs/MemoriesApi.md index 5319370..4fbfaf3 100644 --- a/docs/MemoriesApi.md +++ b/docs/MemoriesApi.md @@ -1,19 +1,18 @@ # LiltNode.MemoriesApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**createMemory**](MemoriesApi.md#createMemory) | **POST** /memories | Create a Memory -[**deleteMemory**](MemoriesApi.md#deleteMemory) | **DELETE** /memories | Delete a Memory -[**getMemory**](MemoriesApi.md#getMemory) | **GET** /memories | Retrieve a Memory -[**importMemoryFile**](MemoriesApi.md#importMemoryFile) | **POST** /memories/import | File import for a Memory -[**queryMemory**](MemoriesApi.md#queryMemory) | **GET** /memories/query | Query a Memory -[**syncDeleteMemory**](MemoriesApi.md#syncDeleteMemory) | **DELETE** /memories/sync | Delete-sync for a Memory -[**syncDownMemory**](MemoriesApi.md#syncDownMemory) | **GET** /memories/sync | Get-sync for a Memory -[**syncInsertMemory**](MemoriesApi.md#syncInsertMemory) | **POST** /memories/sync | Insert-sync for a Memory -[**syncUpdateMemory**](MemoriesApi.md#syncUpdateMemory) | **PUT** /memories/sync | Update-sync for a Memory -[**updateMemory**](MemoriesApi.md#updateMemory) | **PUT** /memories | Update the name of a Memory +[**createMemory**](MemoriesApi.md#createMemory) | **POST** /v2/memories | Create a Memory +[**deleteMemory**](MemoriesApi.md#deleteMemory) | **DELETE** /v2/memories | Delete a Memory +[**deleteSegmentFromMemory**](MemoriesApi.md#deleteSegmentFromMemory) | **DELETE** /v2/memories/segment | Delete a segment from a memory. +[**downloadTermbase**](MemoriesApi.md#downloadTermbase) | **GET** /v2/memories/termbase/download | Termbase download for a Memory +[**exportTermbase**](MemoriesApi.md#exportTermbase) | **POST** /v2/memories/termbase/export | Termbase export for a Memory +[**getMemory**](MemoriesApi.md#getMemory) | **GET** /v2/memories | Retrieve a Memory +[**importMemoryFile**](MemoriesApi.md#importMemoryFile) | **POST** /v2/memories/import | File import for a Memory +[**queryMemory**](MemoriesApi.md#queryMemory) | **GET** /v2/memories/query | Query a Memory +[**updateMemory**](MemoriesApi.md#updateMemory) | **PUT** /v2/memories | Update the name of a Memory @@ -125,13 +124,13 @@ Name | Type | Description | Notes - **Accept**: application/json -## getMemory +## deleteSegmentFromMemory -> [Memory] getMemory(opts) +> DeleteSegmentFromMemoryResponse deleteSegmentFromMemory(id, segmentId) -Retrieve a Memory +Delete a segment from a memory. -Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). +Delete a segment from a memory. ``` curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID ``` ### Example @@ -149,10 +148,9 @@ BasicAuth.username = 'YOUR USERNAME'; BasicAuth.password = 'YOUR PASSWORD'; let apiInstance = new LiltNode.MemoriesApi(); -let opts = { - 'id': 56 // Number | An optional Memory identifier. -}; -apiInstance.getMemory(opts).then((data) => { +let id = 56; // Number | A unique Memory identifier. +let segmentId = 56; // Number | A unique Segment identifier. +apiInstance.deleteSegmentFromMemory(id, segmentId).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); @@ -165,11 +163,12 @@ apiInstance.getMemory(opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Number**| An optional Memory identifier. | [optional] + **id** | **Number**| A unique Memory identifier. | + **segmentId** | **Number**| A unique Segment identifier. | ### Return type -[**[Memory]**](Memory.md) +[**DeleteSegmentFromMemoryResponse**](DeleteSegmentFromMemoryResponse.md) ### Authorization @@ -181,77 +180,13 @@ Name | Type | Description | Notes - **Accept**: application/json -## importMemoryFile +## downloadTermbase -> MemoryImportResponse importMemoryFile(memoryId, name, body, opts) +> Blob downloadTermbase(id) -File import for a Memory +Termbase download for a Memory -Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm` and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://lilt.com/2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.MemoriesApi(); -let memoryId = 56; // Number | A unique Memory identifier. -let name = "name_example"; // String | Name of the TM or termbase file. -let body = "/path/to/file"; // File | The file contents to be uploaded. The entire POST body will be treated as the file. -let opts = { - 'hasHeaderRow': true, // Boolean | A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). - 'skipDuplicates': true // Boolean | A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). -}; -apiInstance.importMemoryFile(memoryId, name, body, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **memoryId** | **Number**| A unique Memory identifier. | - **name** | **String**| Name of the TM or termbase file. | - **body** | **File**| The file contents to be uploaded. The entire POST body will be treated as the file. | - **hasHeaderRow** | **Boolean**| A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). | [optional] - **skipDuplicates** | **Boolean**| A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). | [optional] - -### Return type - -[**MemoryImportResponse**](MemoryImportResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/octet-stream -- **Accept**: application/json - - -## queryMemory - -> [TranslationMemoryEntry] queryMemory(id, query, opts) - -Query a Memory - -Perform a translation memory query. +Downloads the termbase export for the given memory as a CSV file. Ensure you first call the `/2/memories/termbase/export` endpoint to start the export process before you try to download it. ``` curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID ``` ### Example @@ -270,11 +205,7 @@ BasicAuth.password = 'YOUR PASSWORD'; let apiInstance = new LiltNode.MemoriesApi(); let id = 56; // Number | A unique Memory identifier. -let query = "query_example"; // String | A source query. -let opts = { - 'n': 10 // Number | Maximum number of results to return. -}; -apiInstance.queryMemory(id, query, opts).then((data) => { +apiInstance.downloadTermbase(id).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); @@ -288,12 +219,10 @@ apiInstance.queryMemory(id, query, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| A unique Memory identifier. | - **query** | **String**| A source query. | - **n** | **Number**| Maximum number of results to return. | [optional] [default to 10] ### Return type -[**[TranslationMemoryEntry]**](TranslationMemoryEntry.md) +**Blob** ### Authorization @@ -305,13 +234,13 @@ Name | Type | Description | Notes - **Accept**: application/json -## syncDeleteMemory +## exportTermbase -> MemoryInsertResponse syncDeleteMemory(id, opts) +> TermbaseExportResponse exportTermbase(id) -Delete-sync for a Memory +Termbase export for a Memory -Deletes segments in the Memory matching the `from_time`, `to_time` and `when` parameters. Example CURL command: ``` curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created ``` +Exports the termbase entries for the given memory into a CSV file. Calling this endpoint will begin the export process in the background. Check that the processing is complete by polling the `GET /2/memories` endpoint. When the `is_processing` value is 0 then call the `POST /2/memories/termbase/download` endpoint. ``` curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID ``` ### Example @@ -330,12 +259,7 @@ BasicAuth.password = 'YOUR PASSWORD'; let apiInstance = new LiltNode.MemoriesApi(); let id = 56; // Number | A unique Memory identifier. -let opts = { - 'fromTime': 56, // Number | Unix time stamp (epoch, in seconds) of the start of the Memory section. - 'toTime': 56, // Number | Unix time stamp (epoch, in seconds) of the end of the Memory section. - 'when': "when_example" // String | The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. -}; -apiInstance.syncDeleteMemory(id, opts).then((data) => { +apiInstance.exportTermbase(id).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); @@ -349,13 +273,10 @@ apiInstance.syncDeleteMemory(id, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| A unique Memory identifier. | - **fromTime** | **Number**| Unix time stamp (epoch, in seconds) of the start of the Memory section. | [optional] - **toTime** | **Number**| Unix time stamp (epoch, in seconds) of the end of the Memory section. | [optional] - **when** | **String**| The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. | [optional] ### Return type -[**MemoryInsertResponse**](MemoryInsertResponse.md) +[**TermbaseExportResponse**](TermbaseExportResponse.md) ### Authorization @@ -367,13 +288,13 @@ Name | Type | Description | Notes - **Accept**: application/json -## syncDownMemory +## getMemory -> Blob syncDownMemory(id, opts) +> [Memory] getMemory(opts) -Get-sync for a Memory +Retrieve a Memory -Get all or part of a memory in TMX 1.4b format. If the `from_time` and/or `to_time` are omitted, then all segments are returned. The parameter `when` specifies on which date field `from_time` and `to_time` are matched. Possible values are `created` (when the segment was originally created in the memory), `updated` (when the segment was lastly updated), and `deleted` (when the segment was deleted). Example CURL command: ``` curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx ``` +Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). ### Example @@ -391,13 +312,10 @@ BasicAuth.username = 'YOUR USERNAME'; BasicAuth.password = 'YOUR PASSWORD'; let apiInstance = new LiltNode.MemoriesApi(); -let id = 56; // Number | A unique Memory identifier. let opts = { - 'fromTime': 56, // Number | Unix time stamp (epoch, in seconds) of the start of the Memory section. - 'toTime': 56, // Number | Unix time stamp (epoch, in seconds) of the end of the Memory section. - 'when': "when_example" // String | The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. + 'id': 56 // Number | An optional Memory identifier. }; -apiInstance.syncDownMemory(id, opts).then((data) => { +apiInstance.getMemory(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); @@ -410,14 +328,11 @@ apiInstance.syncDownMemory(id, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Number**| A unique Memory identifier. | - **fromTime** | **Number**| Unix time stamp (epoch, in seconds) of the start of the Memory section. | [optional] - **toTime** | **Number**| Unix time stamp (epoch, in seconds) of the end of the Memory section. | [optional] - **when** | **String**| The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. | [optional] + **id** | **Number**| An optional Memory identifier. | [optional] ### Return type -**Blob** +[**[Memory]**](Memory.md) ### Authorization @@ -426,16 +341,16 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/x-tmx +- **Accept**: application/json -## syncInsertMemory +## importMemoryFile -> MemoryInsertResponse syncInsertMemory(id, body, opts) +> MemoryImportResponse importMemoryFile(memoryId, name, body, opts) -Insert-sync for a Memory +File import for a Memory -Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command: ``` curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\",\\\"id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` +Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm`, `*.sdlxliff`(With custom Filters), '*.xliff', and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` Example CURL command to upload a translation memory file named `my_memory.sdlxliff` in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments. ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdlxliff\\\",\\\"memory_id\\\": 12,\\\"sdlxliff_filters\\\":[{\\\"conf_name\\\": \\\"Translated\\\", \\\"percentage\\\": 100, \\\"allow_unlocked\\\": false}]\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdlxliff ### Example @@ -453,12 +368,15 @@ BasicAuth.username = 'YOUR USERNAME'; BasicAuth.password = 'YOUR PASSWORD'; let apiInstance = new LiltNode.MemoriesApi(); -let id = 56; // Number | A unique Memory identifier. -let body = "body_example"; // String | The file contents to be uploaded. The entire POST body will be treated as the file. +let memoryId = 56; // Number | A unique Memory identifier. +let name = "name_example"; // String | Name of the TM or termbase file. +let body = "/path/to/file"; // File | The file contents to be uploaded. The entire POST body will be treated as the file. let opts = { - 'name': "name_example" // String | Name of the TMX file. + 'sdlxliffFilters': [new LiltNode.SDLXLIFFFilter()], // [SDLXLIFFFilter] | Contains Filter information Unique to SDLXLIFF + 'hasHeaderRow': true, // Boolean | A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). + 'skipDuplicates': true // Boolean | A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). }; -apiInstance.syncInsertMemory(id, body, opts).then((data) => { +apiInstance.importMemoryFile(memoryId, name, body, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); @@ -471,13 +389,16 @@ apiInstance.syncInsertMemory(id, body, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Number**| A unique Memory identifier. | - **body** | **String**| The file contents to be uploaded. The entire POST body will be treated as the file. | - **name** | **String**| Name of the TMX file. | [optional] + **memoryId** | **Number**| A unique Memory identifier. | + **name** | **String**| Name of the TM or termbase file. | + **body** | **File**| The file contents to be uploaded. The entire POST body will be treated as the file. | + **sdlxliffFilters** | [**[SDLXLIFFFilter]**](SDLXLIFFFilter.md)| Contains Filter information Unique to SDLXLIFF | [optional] + **hasHeaderRow** | **Boolean**| A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). | [optional] + **skipDuplicates** | **Boolean**| A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). | [optional] ### Return type -[**MemoryInsertResponse**](MemoryInsertResponse.md) +[**MemoryImportResponse**](MemoryImportResponse.md) ### Authorization @@ -489,13 +410,13 @@ Name | Type | Description | Notes - **Accept**: application/json -## syncUpdateMemory +## queryMemory -> MemoryUpdateResponse syncUpdateMemory(id, body, opts) +> [TranslationMemoryEntry] queryMemory(id, query, opts) -Update-sync for a Memory +Query a Memory -Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field `LILT-API`. The number of segments returned by the `from_time`, `to_time`, `when` parameters and the number of segments in the TMX file need to be identical. Example CURL command: ``` curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\", \\\"id\\\": 42, \\\"from_time\\\": 1491048000, \\\"to_time\\\": 1491049800, \"when\": \"Updated\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` +Perform a translation memory query. ### Example @@ -514,13 +435,11 @@ BasicAuth.password = 'YOUR PASSWORD'; let apiInstance = new LiltNode.MemoriesApi(); let id = 56; // Number | A unique Memory identifier. -let body = "body_example"; // String | The file contents to be uploaded. The entire PUT body will be treated as the file. +let query = "query_example"; // String | A source query. let opts = { - 'fromTime': 56, // Number | Unix time stamp (epoch, in seconds) of the start of the Memory section. - 'toTime': 56, // Number | Unix time stamp (epoch, in seconds) of the end of the Memory section. - 'when': "when_example" // String | The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. + 'n': 10 // Number | Maximum number of results to return. }; -apiInstance.syncUpdateMemory(id, body, opts).then((data) => { +apiInstance.queryMemory(id, query, opts).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { console.error(error); @@ -534,14 +453,12 @@ apiInstance.syncUpdateMemory(id, body, opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Number**| A unique Memory identifier. | - **body** | **String**| The file contents to be uploaded. The entire PUT body will be treated as the file. | - **fromTime** | **Number**| Unix time stamp (epoch, in seconds) of the start of the Memory section. | [optional] - **toTime** | **Number**| Unix time stamp (epoch, in seconds) of the end of the Memory section. | [optional] - **when** | **String**| The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. | [optional] + **query** | **String**| A source query. | + **n** | **Number**| Maximum number of results to return. | [optional] [default to 10] ### Return type -[**MemoryUpdateResponse**](MemoryUpdateResponse.md) +[**[TranslationMemoryEntry]**](TranslationMemoryEntry.md) ### Authorization @@ -549,7 +466,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json diff --git a/docs/Memory.md b/docs/Memory.md index f15219e..0c1e612 100644 --- a/docs/Memory.md +++ b/docs/Memory.md @@ -10,10 +10,10 @@ Name | Type | Description | Notes **srclocale** | **String** | An ISO 639-1 language identifier. | [optional] **trglocale** | **String** | An ISO 639-1 language identifier. | [optional] **name** | **String** | A name for the Memory. | [optional] +**isProcessing** | **Boolean** | Indicates the memory is being processed. | [optional] **version** | **Number** | The current version of the Memory, which is the number of updates since the memory was created. | [optional] **createdAt** | **Number** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] **updatedAt** | **Number** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] -**numSegments** | **Number** | The number of confirmed Segments incorporated into this Memory. | [optional] **resources** | **[String]** | The resource files (translation memories and termbases) associated with this Memory. | [optional] diff --git a/docs/ProjectsApi.md b/docs/ProjectsApi.md index ed37f87..859d859 100644 --- a/docs/ProjectsApi.md +++ b/docs/ProjectsApi.md @@ -1,18 +1,12 @@ # LiltNode.ProjectsApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**createProject**](ProjectsApi.md#createProject) | **POST** /projects | Create a Project -[**deleteProject**](ProjectsApi.md#deleteProject) | **DELETE** /projects | Delete a Project -[**deliverProjectsBulk**](ProjectsApi.md#deliverProjectsBulk) | **POST** /projects/bulk-deliver | Deliver multiple projects apart from their jobs. -[**getProjectReport**](ProjectsApi.md#getProjectReport) | **GET** /projects/quote | Retrieve Project report -[**getProjectRevisionReport**](ProjectsApi.md#getProjectRevisionReport) | **GET** /projects/{id}/revision | Retrieve Project revision report -[**getProjectStatus**](ProjectsApi.md#getProjectStatus) | **GET** /projects/status | Retrieve Project status -[**getProjects**](ProjectsApi.md#getProjects) | **GET** /projects | Retrieve a Project -[**triggerAutoAssignment**](ProjectsApi.md#triggerAutoAssignment) | **POST** /autoAssignment | Auto Assignment -[**updateProjectsBulk**](ProjectsApi.md#updateProjectsBulk) | **PUT** /projects/bulk-update | Update multiple Projects with a single payload +[**createProject**](ProjectsApi.md#createProject) | **POST** /v2/projects | Create a Project +[**deleteProject**](ProjectsApi.md#deleteProject) | **DELETE** /v2/projects | Delete a Project +[**getProjects**](ProjectsApi.md#getProjects) | **GET** /v2/projects | Retrieve a Project @@ -126,226 +120,6 @@ Name | Type | Description | Notes - **Accept**: application/json -## deliverProjectsBulk - -> deliverProjectsBulk(body, opts) - -Deliver multiple projects apart from their jobs. - -Deliver mulitple projects apart from their jobs. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.ProjectsApi(); -let body = new LiltNode.ProjectsToDeliver(); // ProjectsToDeliver | -let opts = { - 'workflowEnabled': true // Boolean | Whether the project has or not workflows enabled. (not used) -}; -apiInstance.deliverProjectsBulk(body, opts).then(() => { - console.log('API called successfully.'); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ProjectsToDeliver**](ProjectsToDeliver.md)| | - **workflowEnabled** | **Boolean**| Whether the project has or not workflows enabled. (not used) | [optional] - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## getProjectReport - -> ProjectQuote getProjectReport(id) - -Retrieve Project report - -Get information about a project that can be used for quoting. This includes: * A translation memory leverage report * Word count * Segment count - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.ProjectsApi(); -let id = 56; // Number | A unique Project identifier. -apiInstance.getProjectReport(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Number**| A unique Project identifier. | - -### Return type - -[**ProjectQuote**](ProjectQuote.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getProjectRevisionReport - -> getProjectRevisionReport(id) - -Retrieve Project revision report - -Get information about a project's revision report. This includes: * Stats on accepted segments * reviewer details * Error rate - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.ProjectsApi(); -let id = 56; // Number | A unique Project identifier. -apiInstance.getProjectRevisionReport(id).then(() => { - console.log('API called successfully.'); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Number**| A unique Project identifier. | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## getProjectStatus - -> ProjectStatus getProjectStatus(id) - -Retrieve Project status - -Retrieve the status of a Project. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.ProjectsApi(); -let id = 56; // Number | A unique Project identifier. -apiInstance.getProjectStatus(id).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **Number**| A unique Project identifier. | - -### Return type - -[**ProjectStatus**](ProjectStatus.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - ## getProjects > [Project] getProjects(opts) @@ -415,115 +189,3 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json - -## triggerAutoAssignment - -> [AutoAssignmentResponse] triggerAutoAssignment(projectIds, opts) - -Auto Assignment - -Trigger automatic assignment of linguists. Requires auto-assignment to be enabled as a setting on the origanization level. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.ProjectsApi(); -let projectIds = "projectIds_example"; // String | The comma separated list of project ids to auto-assign. Can be sent in the body as an alternative but if both are specified the query has precedence. -let opts = { - 'body': new LiltNode.AutoAssignmentParameters() // AutoAssignmentParameters | -}; -apiInstance.triggerAutoAssignment(projectIds, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **projectIds** | **String**| The comma separated list of project ids to auto-assign. Can be sent in the body as an alternative but if both are specified the query has precedence. | - **body** | [**AutoAssignmentParameters**](AutoAssignmentParameters.md)| | [optional] - -### Return type - -[**[AutoAssignmentResponse]**](AutoAssignmentResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -## updateProjectsBulk - -> [Project] updateProjectsBulk(body) - -Update multiple Projects with a single payload - -Update multiple Projects with a single payload. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.ProjectsApi(); -let body = new LiltNode.ProjectsToUpdate(); // ProjectsToUpdate | -apiInstance.updateProjectsBulk(body).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ProjectsToUpdate**](ProjectsToUpdate.md)| | - -### Return type - -[**[Project]**](Project.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/docs/SDLXLIFFFilter.md b/docs/SDLXLIFFFilter.md new file mode 100644 index 0000000..d7f45df --- /dev/null +++ b/docs/SDLXLIFFFilter.md @@ -0,0 +1,28 @@ +# LiltNode.SDLXLIFFFilter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**confName** | **String** | the current state of the SDLXLIFF Trans Unit. | +**allowablePercentage** | **Number** | This represents for the current conf_name what percentage the filter applies to. If you pass -1 it will take any value for this field and won't ignore blank values. If you pass 50, Lilt will only import Segments that have a 50 percent match or better. | [optional] +**allowUnlockedSegments** | **Boolean** | Boolean that tells Lilt whether we should allow unlocked Segments for this conf_name. | [optional] + + + +## Enum: ConfNameEnum + + +* `Translated` (value: `"Translated"`) + +* `Draft` (value: `"Draft"`) + +* `ApprovedTranslation` (value: `"ApprovedTranslation"`) + +* `Locked` (value: `"Locked"`) + +* `SignedOff` (value: `"SignedOff"`) + + + + diff --git a/docs/SignLiltCreateTermsResponse.md b/docs/SignLiltCreateTermsResponse.md new file mode 100644 index 0000000..6454dde --- /dev/null +++ b/docs/SignLiltCreateTermsResponse.md @@ -0,0 +1,9 @@ +# LiltNode.SignLiltCreateTermsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**signedAgreement** | **Boolean** | Whether or not the agreement has been signed. | [optional] + + diff --git a/docs/TermbaseExportResponse.md b/docs/TermbaseExportResponse.md new file mode 100644 index 0000000..2d1a980 --- /dev/null +++ b/docs/TermbaseExportResponse.md @@ -0,0 +1,10 @@ +# LiltNode.TermbaseExportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Number** | A unique Memory identifier. | [optional] +**isProcessing** | **Number** | The current state of the import. | [optional] + + diff --git a/docs/TranslateApi.md b/docs/TranslateApi.md index ab55ef9..f521426 100644 --- a/docs/TranslateApi.md +++ b/docs/TranslateApi.md @@ -1,15 +1,13 @@ # LiltNode.TranslateApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**batchTranslateFile**](TranslateApi.md#batchTranslateFile) | **POST** /translate/file | Translate a File -[**downloadFile**](TranslateApi.md#downloadFile) | **GET** /translate/files | Download translated file -[**monitorFileTranslation**](TranslateApi.md#monitorFileTranslation) | **GET** /translate/file | Monitor file translation -[**registerSegment**](TranslateApi.md#registerSegment) | **GET** /translate/register | Register a segment -[**translateSegment**](TranslateApi.md#translateSegment) | **GET** /translate | Translate a segment -[**translateSegmentPost**](TranslateApi.md#translateSegmentPost) | **POST** /translate | Translate a segment +[**batchTranslateFile**](TranslateApi.md#batchTranslateFile) | **POST** /v2/translate/file | Translate a File +[**downloadFile**](TranslateApi.md#downloadFile) | **GET** /v2/translate/files | Download translated file +[**monitorFileTranslation**](TranslateApi.md#monitorFileTranslation) | **GET** /v2/translate/file | Monitor file translation +[**translateSegmentPost**](TranslateApi.md#translateSegmentPost) | **POST** /v2/translate | Translate a segment @@ -19,7 +17,7 @@ Method | HTTP request | Description Translate a File -Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` +Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` ### Example @@ -81,7 +79,7 @@ Name | Type | Description | Notes Download translated file -Download a translated File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/files?key=API_KEY&id=1' ``` +Download a translated File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/files?key=API_KEY&id=1' ``` ### Example @@ -135,7 +133,7 @@ Name | Type | Description | Notes Monitor file translation -Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` +Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` ### Example @@ -191,136 +189,6 @@ Name | Type | Description | Notes - **Accept**: application/json -## registerSegment - -> TranslateRegisterResponse registerSegment(source, srclang, trglang) - -Register a segment - -Register a source string for interactive translation. The `source_hash` value that is returned by this request is required by the `prefix` parameter for the translation endpoint. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.TranslateApi(); -let source = "source_example"; // String | A source string to be registered. -let srclang = "srclang_example"; // String | An ISO 639-1 language code. -let trglang = "trglang_example"; // String | An ISO 639-1 language code. -apiInstance.registerSegment(source, srclang, trglang).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **source** | **String**| A source string to be registered. | - **srclang** | **String**| An ISO 639-1 language code. | - **trglang** | **String**| An ISO 639-1 language code. | - -### Return type - -[**TranslateRegisterResponse**](TranslateRegisterResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -## translateSegment - -> TranslationList translateSegment(memoryId, opts) - -Translate a segment - -Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The `source` parameter may be supplied in the query or in the request body. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - -### Example - -```javascript -import LiltNode from 'lilt-node'; -let defaultClient = LiltNode.ApiClient.instance; -// Configure API key authorization: ApiKeyAuth -let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth']; -ApiKeyAuth.apiKey = 'YOUR API KEY'; -// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) -//ApiKeyAuth.apiKeyPrefix = 'Token'; -// Configure HTTP basic authorization: BasicAuth -let BasicAuth = defaultClient.authentications['BasicAuth']; -BasicAuth.username = 'YOUR USERNAME'; -BasicAuth.password = 'YOUR PASSWORD'; - -let apiInstance = new LiltNode.TranslateApi(); -let memoryId = 56; // Number | A unique Memory identifier. -let opts = { - 'source': "source_example", // String | The source text to be translated. - 'sourceHash': 56, // Number | A source hash code. - 'prefix': "prefix_example", // String | A target prefix. - 'n': 1, // Number | Return top n translations (deprecated). - 'rich': false, // Boolean | Returns rich translation information (e.g., with word alignments). - 'tmMatches': true, // Boolean | Include translation memory fuzzy matches. - 'projectTags': false, // Boolean | Project tags. Projects tags in source to target if set to true. - 'body': new LiltNode.TranslateSegmentBody() // TranslateSegmentBody | -}; -apiInstance.translateSegment(memoryId, opts).then((data) => { - console.log('API called successfully. Returned data: ' + data); -}, (error) => { - console.error(error); -}); - -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **memoryId** | **Number**| A unique Memory identifier. | - **source** | **String**| The source text to be translated. | [optional] - **sourceHash** | **Number**| A source hash code. | [optional] - **prefix** | **String**| A target prefix. | [optional] - **n** | **Number**| Return top n translations (deprecated). | [optional] [default to 1] - **rich** | **Boolean**| Returns rich translation information (e.g., with word alignments). | [optional] [default to false] - **tmMatches** | **Boolean**| Include translation memory fuzzy matches. | [optional] [default to true] - **projectTags** | **Boolean**| Project tags. Projects tags in source to target if set to true. | [optional] [default to false] - **body** | [**TranslateSegmentBody**](TranslateSegmentBody.md)| | [optional] - -### Return type - -[**TranslationList**](TranslationList.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - ## translateSegmentPost > TranslationList translateSegmentPost(opts) @@ -346,7 +214,7 @@ BasicAuth.password = 'YOUR PASSWORD'; let apiInstance = new LiltNode.TranslateApi(); let opts = { - 'body': new LiltNode.TranslateSegmentBody1() // TranslateSegmentBody1 | + 'body': new LiltNode.TranslateSegmentBody() // TranslateSegmentBody | }; apiInstance.translateSegmentPost(opts).then((data) => { console.log('API called successfully. Returned data: ' + data); @@ -361,7 +229,7 @@ apiInstance.translateSegmentPost(opts).then((data) => { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**TranslateSegmentBody1**](TranslateSegmentBody1.md)| | [optional] + **body** | [**TranslateSegmentBody**](TranslateSegmentBody.md)| | [optional] ### Return type diff --git a/docs/TranslateSegmentBody.md b/docs/TranslateSegmentBody.md index 9483110..1960b98 100644 --- a/docs/TranslateSegmentBody.md +++ b/docs/TranslateSegmentBody.md @@ -5,5 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **source** | **String** | A unique Segment identifier. | [optional] +**memoryId** | **Number** | A unique Memory identifier. | +**sourceHash** | **Number** | A source hash code. | [optional] +**n** | **Number** | Return top n translations (deprecated). | [optional] +**prefix** | **String** | A target prefix | [optional] +**rich** | **Boolean** | Returns rich translation information (e.g., with word alignments). | [optional] [default to false] +**tmMatches** | **Boolean** | Include translation memory fuzzy matches. | [optional] [default to true] +**projectTags** | **Boolean** | Project tags. Projects tags in source to target if set to true. | [optional] [default to false] +**containsICUData** | **Boolean** | Contains ICU data. If true then tags in the source following the ICU standard will be parsed and retained. | [optional] [default to false] diff --git a/package.json b/package.json index 12f6a12..b62ae0b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lilt-node", "version": "0.6.3", - "description": "The_Lilt_REST_API_enables_programmatic_access_to_the_full_range_of_Lilt_backend_services_including___Training_of_and_translating_with_interactive_adaptive_machine_translation___Large_scale_translation_memory___The_Lexicon__a_large_scale_termbase___Programmatic_control_of_the_Lilt_CAT_environment___Translation_memory_synchronizationRequests_and_responses_are_in_JSON_format__The_REST_API_only_responds_to_HTTPS___SSL_requests__AuthenticationRequests_are_authenticated_via_REST_API_key_which_requires_the_Business_plan_Requests_are_authenticated_using__HTTP_Basic_Auth_https__en_wikipedia_org_wiki_Basic_access_authentication__Add_your_REST_API_key_as_both_the_username_and_password_For_development_you_may_also_pass_the_REST_API_key_via_the_key_query_parameter__This_is_less_secure_than_HTTP_Basic_Auth_and_is_not_recommended_for_production_use__QuotasOur_services_have_a_general_quota_of_4000_requests_per_minute__Should_you_hit_the_maximum_requests_per_minute_you_will_need_to_wait_60_seconds_before_you_can_send_another_request_", + "description": "Lilt_REST_API_Support_https__lilt_atlassian_net_servicedesk_customer_portals___The_Lilt_REST_API_enables_programmatic_access_to_the_full_range_of_Lilt_backend_services_including___Training_of_and_translating_with_interactive_adaptive_machine_translation___Large_scale_translation_memory___The_Lexicon__a_large_scale_termbase___Programmatic_control_of_the_Lilt_CAT_environment___Translation_memory_synchronizationRequests_and_responses_are_in_JSON_format__The_REST_API_only_responds_to_HTTPS___SSL_requests__The_base_url_for_this_REST_API_is_https__api_lilt_com___AuthenticationRequests_are_authenticated_via_REST_API_key_which_requires_the_Business_plan_Requests_are_authenticated_using__HTTP_Basic_Auth_https__en_wikipedia_org_wiki_Basic_access_authentication__Add_your_REST_API_key_as_both_the_username_and_password_For_development_you_may_also_pass_the_REST_API_key_via_the_key_query_parameter__This_is_less_secure_than_HTTP_Basic_Auth_and_is_not_recommended_for_production_use__QuotasOur_services_have_a_general_quota_of_4000_requests_per_minute__Should_you_hit_the_maximum_requests_per_minute_you_will_need_to_wait_60_seconds_before_you_can_send_another_request_", "license": "Unlicense", "main": "dist/index.js", "scripts": { diff --git a/src/ApiClient.js b/src/ApiClient.js index 8e9e032..e6170d8 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,7 +17,7 @@ import querystring from "querystring"; /** * @module ApiClient -* @version 0.5.0 +* @version 0.6.3 */ /** @@ -32,9 +32,9 @@ class ApiClient { /** * The base URL against which to resolve every API call's (relative) path. * @type {String} - * @default https://lilt.com/2 + * @default https://api.lilt.com */ - this.basePath = 'https://lilt.com/2'.replace(/\/+$/, ''); + this.basePath = 'https://api.lilt.com'.replace(/\/+$/, ''); /** * The authentication methods to be included for all API calls. @@ -556,7 +556,7 @@ class ApiClient { hostSettings() { return [ { - 'url': "https://lilt.com/2", + 'url': "https://api.lilt.com/", 'description': "No description provided", } ]; diff --git a/src/api/CreateApi.js b/src/api/CreateApi.js new file mode 100644 index 0000000..60b2f00 --- /dev/null +++ b/src/api/CreateApi.js @@ -0,0 +1,460 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import CreateConverterConfigParameters from '../model/CreateConverterConfigParameters'; +import InlineResponse200 from '../model/InlineResponse200'; +import LiltCreateContent from '../model/LiltCreateContent'; +import SignLiltCreateTermsResponse from '../model/SignLiltCreateTermsResponse'; + +/** +* Create service. +* @module api/CreateApi +* @version 0.6.3 +*/ +export default class CreateApi { + + /** + * Constructs a new CreateApi. + * @alias module:api/CreateApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * Delete Lilt Create content + * Delete a piece of Lilt Create content. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param {Number} contentId The content ID. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse200} and HTTP response + */ + deleteLiltCreateContentWithHttpInfo(contentId) { + let postBody = null; + // verify the required parameter 'contentId' is set + if (contentId === undefined || contentId === null) { + throw new Error("Missing the required parameter 'contentId' when calling deleteLiltCreateContent"); + } + + let pathParams = { + 'contentId': contentId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['ApiKeyAuth', 'BasicAuth']; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = InlineResponse200; + return this.apiClient.callApi( + '/v2/create/{contentId}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Delete Lilt Create content + * Delete a piece of Lilt Create content. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param {Number} contentId The content ID. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse200} + */ + deleteLiltCreateContent(contentId) { + return this.deleteLiltCreateContentWithHttpInfo(contentId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Generate new Lilt Create content + * Generate new Lilt Create content with the given parameters. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"language\":\"en-US\", \"template\":\"blog-post\", \"templateParams\":{ \"contentLength\":\"100\", \"language\":\"en-US\", \"sections\":[], \"summary\":\"a blog post about hiking\" }, \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"} }' ``` + * @param {module:model/LiltCreateContent} templateParams Input parameters that determine what content will be generated. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + generateLiltCreateContentWithHttpInfo(templateParams) { + let postBody = templateParams; + // verify the required parameter 'templateParams' is set + if (templateParams === undefined || templateParams === null) { + throw new Error("Missing the required parameter 'templateParams' when calling generateLiltCreateContent"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['ApiKeyAuth', 'BasicAuth']; + let contentTypes = ['application/json']; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/v2/create', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Generate new Lilt Create content + * Generate new Lilt Create content with the given parameters. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"language\":\"en-US\", \"template\":\"blog-post\", \"templateParams\":{ \"contentLength\":\"100\", \"language\":\"en-US\", \"sections\":[], \"summary\":\"a blog post about hiking\" }, \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"} }' ``` + * @param {module:model/LiltCreateContent} templateParams Input parameters that determine what content will be generated. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + generateLiltCreateContent(templateParams) { + return this.generateLiltCreateContentWithHttpInfo(templateParams) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Get Lilt Create content by ID. + * Get Lilt Create content by ID. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param {Number} contentId The content ID. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LiltCreateContent} and HTTP response + */ + getLiltCreateByIdWithHttpInfo(contentId) { + let postBody = null; + // verify the required parameter 'contentId' is set + if (contentId === undefined || contentId === null) { + throw new Error("Missing the required parameter 'contentId' when calling getLiltCreateById"); + } + + let pathParams = { + 'contentId': contentId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['ApiKeyAuth', 'BasicAuth']; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = LiltCreateContent; + return this.apiClient.callApi( + '/v2/create/{contentId}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Get Lilt Create content by ID. + * Get Lilt Create content by ID. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param {Number} contentId The content ID. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LiltCreateContent} + */ + getLiltCreateById(contentId) { + return this.getLiltCreateByIdWithHttpInfo(contentId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Get Lilt Create content + * Get a list of all content that has been generated by Lilt Create. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create?key=API_KEY' ``` + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + getLiltCreateContentWithHttpInfo() { + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['ApiKeyAuth', 'BasicAuth']; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = [LiltCreateContent]; + return this.apiClient.callApi( + '/v2/create', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Get Lilt Create content + * Get a list of all content that has been generated by Lilt Create. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create?key=API_KEY' ``` + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + getLiltCreateContent() { + return this.getLiltCreateContentWithHttpInfo() + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Get Lilt Create preferences + * Get the stored preferences for Lilt Create. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ``` + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + getLiltCreatePreferencesWithHttpInfo() { + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['ApiKeyAuth', 'BasicAuth']; + let contentTypes = []; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/v2/create/preferences', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Get Lilt Create preferences + * Get the stored preferences for Lilt Create. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ``` + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + getLiltCreatePreferences() { + return this.getLiltCreatePreferencesWithHttpInfo() + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Regenerate Lilt Create content + * Regenerate the given piece of content with the current parameters. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' ``` + * @param {Number} contentId The content ID. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + regenerateLiltCreateContentWithHttpInfo(contentId) { + let postBody = null; + // verify the required parameter 'contentId' is set + if (contentId === undefined || contentId === null) { + throw new Error("Missing the required parameter 'contentId' when calling regenerateLiltCreateContent"); + } + + let pathParams = { + 'contentId': contentId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['ApiKeyAuth', 'BasicAuth']; + let contentTypes = []; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/v2/create/{contentId}/create', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Regenerate Lilt Create content + * Regenerate the given piece of content with the current parameters. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' ``` + * @param {Number} contentId The content ID. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + regenerateLiltCreateContent(contentId) { + return this.regenerateLiltCreateContentWithHttpInfo(contentId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Sign the Lilt Create terms and conditions + * Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"signedAgreement\": true}' ``` + * @param {module:model/CreateConverterConfigParameters} signedAgreement + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignLiltCreateTermsResponse} and HTTP response + */ + signLiltCreateTermsWithHttpInfo(signedAgreement) { + let postBody = signedAgreement; + // verify the required parameter 'signedAgreement' is set + if (signedAgreement === undefined || signedAgreement === null) { + throw new Error("Missing the required parameter 'signedAgreement' when calling signLiltCreateTerms"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['ApiKeyAuth', 'BasicAuth']; + let contentTypes = ['application/json']; + let accepts = ['application/json']; + let returnType = SignLiltCreateTermsResponse; + return this.apiClient.callApi( + '/v2/create/terms-and-conditions', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Sign the Lilt Create terms and conditions + * Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"signedAgreement\": true}' ``` + * @param {module:model/CreateConverterConfigParameters} signedAgreement + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignLiltCreateTermsResponse} + */ + signLiltCreateTerms(signedAgreement) { + return this.signLiltCreateTermsWithHttpInfo(signedAgreement) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Update Lilt Create content + * Update a piece of Lilt Create content. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"language\":\"de-DE\"}' ``` + * @param {Number} contentId The content ID. + * @param {Object} opts Optional parameters + * @param {module:model/LiltCreateContent} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LiltCreateContent} and HTTP response + */ + updateLiltCreateContentWithHttpInfo(contentId, opts) { + opts = opts || {}; + let postBody = opts['body']; + // verify the required parameter 'contentId' is set + if (contentId === undefined || contentId === null) { + throw new Error("Missing the required parameter 'contentId' when calling updateLiltCreateContent"); + } + + let pathParams = { + 'contentId': contentId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['ApiKeyAuth', 'BasicAuth']; + let contentTypes = ['application/json']; + let accepts = ['application/json']; + let returnType = LiltCreateContent; + return this.apiClient.callApi( + '/v2/create/{contentId}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Update Lilt Create content + * Update a piece of Lilt Create content. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"language\":\"de-DE\"}' ``` + * @param {Number} contentId The content ID. + * @param {Object} opts Optional parameters + * @param {module:model/LiltCreateContent} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LiltCreateContent} + */ + updateLiltCreateContent(contentId, opts) { + return this.updateLiltCreateContentWithHttpInfo(contentId, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Update Lilt Create preferences + * Update the stored preferences for Lilt Create. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"tone\": \"formal\", \"styleguide\": \"\"}' ``` + * @param {Object} opts Optional parameters + * @param {module:model/LiltCreateContent} opts.styleguide Which styleguide to use. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + updateLiltCreatePreferencesWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['styleguide']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['ApiKeyAuth', 'BasicAuth']; + let contentTypes = ['application/json']; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/v2/create/preferences', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Update Lilt Create preferences + * Update the stored preferences for Lilt Create. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"tone\": \"formal\", \"styleguide\": \"\"}' ``` + * @param {Object} opts Optional parameters + * @param {module:model/LiltCreateContent} opts.styleguide Which styleguide to use. + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + updateLiltCreatePreferences(opts) { + return this.updateLiltCreatePreferencesWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/src/api/DocumentsApi.js b/src/api/DocumentsApi.js index 0fce6ef..73e1fb5 100644 --- a/src/api/DocumentsApi.js +++ b/src/api/DocumentsApi.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,24 +13,13 @@ import ApiClient from "../ApiClient"; -import DocumentAssignmentParameters from '../model/DocumentAssignmentParameters'; -import DocumentAssignmentResponse from '../model/DocumentAssignmentResponse'; -import DocumentDeleteResponse from '../model/DocumentDeleteResponse'; -import DocumentDoneUpdateParameters from '../model/DocumentDoneUpdateParameters'; -import DocumentDoneUpdateParameters1 from '../model/DocumentDoneUpdateParameters1'; -import DocumentDoneUpdateParameters2 from '../model/DocumentDoneUpdateParameters2'; -import DocumentParameters from '../model/DocumentParameters'; -import DocumentPretranslateParameters from '../model/DocumentPretranslateParameters'; -import DocumentPretranslateResponse from '../model/DocumentPretranslateResponse'; import DocumentWithSegments from '../model/DocumentWithSegments'; import Error from '../model/Error'; -import ReviewCompletionTypeError from '../model/ReviewCompletionTypeError'; -import TranslateCompletionTypeError from '../model/TranslateCompletionTypeError'; /** * Documents service. * @module api/DocumentsApi -* @version 0.5.0 +* @version 0.6.3 */ export default class DocumentsApi { @@ -47,150 +36,9 @@ export default class DocumentsApi { - /** - * Assign a Document - * Assign and unassign a Document for translation and/or review. - * @param {module:model/DocumentAssignmentParameters} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DocumentAssignmentResponse} and HTTP response - */ - assignDocumentWithHttpInfo(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling assignDocument"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = DocumentAssignmentResponse; - return this.apiClient.callApi( - '/documents/share', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Assign a Document - * Assign and unassign a Document for translation and/or review. - * @param {module:model/DocumentAssignmentParameters} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DocumentAssignmentResponse} - */ - assignDocument(body) { - return this.assignDocumentWithHttpInfo(body) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Create a Document - * Create a new Document. A Document is a collection of one or more Segments. Documents are nested inside of Projects, and appear in the Project details view in the web app. Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality. - * @param {Object} opts Optional parameters - * @param {module:model/DocumentParameters} opts.body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DocumentWithSegments} and HTTP response - */ - createDocumentWithHttpInfo(opts) { - opts = opts || {}; - let postBody = opts['body']; - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = DocumentWithSegments; - return this.apiClient.callApi( - '/documents', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Create a Document - * Create a new Document. A Document is a collection of one or more Segments. Documents are nested inside of Projects, and appear in the Project details view in the web app. Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality. - * @param {Object} opts Optional parameters - * @param {module:model/DocumentParameters} opts.body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DocumentWithSegments} - */ - createDocument(opts) { - return this.createDocumentWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Delete a Document - * Delete a Document. - * @param {Number} id A unique Document identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DocumentDeleteResponse} and HTTP response - */ - deleteDocumentWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deleteDocument"); - } - - let pathParams = { - }; - let queryParams = { - 'id': id - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = DocumentDeleteResponse; - return this.apiClient.callApi( - '/documents', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Delete a Document - * Delete a Document. - * @param {Number} id A unique Document identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DocumentDeleteResponse} - */ - deleteDocument(id) { - return this.deleteDocumentWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - /** * Download a Document - * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` + * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` * @param {Number} id An unique Document identifier. * @param {Object} opts Optional parameters * @param {Boolean} opts.isXliff Download the document in XLIFF 1.2 format. (default to true) @@ -220,7 +68,7 @@ export default class DocumentsApi { let accepts = ['application/octet-stream']; let returnType = 'Blob'; return this.apiClient.callApi( - '/documents/files', 'GET', + '/v2/documents/files', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -228,7 +76,7 @@ export default class DocumentsApi { /** * Download a Document - * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` + * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` * @param {Number} id An unique Document identifier. * @param {Object} opts Optional parameters * @param {Boolean} opts.isXliff Download the document in XLIFF 1.2 format. (default to true) @@ -242,266 +90,9 @@ export default class DocumentsApi { } - /** - * Retrieve a Document - * List a Document. The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. - * @param {Number} id A unique Document identifier. - * @param {Object} opts Optional parameters - * @param {Boolean} opts.withSegments Flag indicating whether full segment information should be returned. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DocumentWithSegments} and HTTP response - */ - getDocumentWithHttpInfo(id, opts) { - opts = opts || {}; - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getDocument"); - } - - let pathParams = { - }; - let queryParams = { - 'id': id, - 'with_segments': opts['withSegments'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = DocumentWithSegments; - return this.apiClient.callApi( - '/documents', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Retrieve a Document - * List a Document. The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. - * @param {Number} id A unique Document identifier. - * @param {Object} opts Optional parameters - * @param {Boolean} opts.withSegments Flag indicating whether full segment information should be returned. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DocumentWithSegments} - */ - getDocument(id, opts) { - return this.getDocumentWithHttpInfo(id, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Mark review done - * Mark the review of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done for review. - Documents must already be marked as done for translation. - This request will also trigger an email notification. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param {module:model/DocumentDoneUpdateParameters2} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response - */ - markReviewDoneWithHttpInfo(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling markReviewDone"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = ['Number']; - return this.apiClient.callApi( - '/documents/done/review', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Mark review done - * Mark the review of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done for review. - Documents must already be marked as done for translation. - This request will also trigger an email notification. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param {module:model/DocumentDoneUpdateParameters2} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} - */ - markReviewDone(body) { - return this.markReviewDoneWithHttpInfo(body) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Mark translation done - * Mark the translation of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done and all segments must be confirmed. - This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review. When being marked as un-done: - Documents must not be marked as complete for review. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param {module:model/DocumentDoneUpdateParameters1} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response - */ - markTranslationDoneWithHttpInfo(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling markTranslationDone"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = ['Number']; - return this.apiClient.callApi( - '/documents/done/translation', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Mark translation done - * Mark the translation of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done and all segments must be confirmed. - This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review. When being marked as un-done: - Documents must not be marked as complete for review. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param {module:model/DocumentDoneUpdateParameters1} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} - */ - markTranslationDone(body) { - return this.markTranslationDoneWithHttpInfo(body) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Pretranslate a Document - * Initiate pretranslation of a list of Documents. This request will mark document(s) as being pretranslated. Pretranslation in this context is: - Applying and confirming exact TM matches based on the Memory of the Project; - Translating all other segments via MT without confirming them. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d '{\"id\": [123]}' -H \"Content-Type: application/json\" ``` Document translation is an asynchronous process that, in effect, is performed in the background. To check the status of pretranslation for a document, use the `GET /documents` endpoint. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. Once pretranslation is finished, the document can be downloaded via `GET /documents/files`. - * @param {module:model/DocumentPretranslateParameters} body - * @param {Object} opts Optional parameters - * @param {Boolean} opts.autoAccept Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. - * @param {Boolean} opts.caseSensitive Deprecated, use body param instead. Optional for using case matching against TM hits. - * @param {Boolean} opts.attributeToCreator Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. - * @param {String} opts.mode Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DocumentPretranslateResponse} and HTTP response - */ - pretranslateDocumentsWithHttpInfo(body, opts) { - opts = opts || {}; - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling pretranslateDocuments"); - } - - let pathParams = { - }; - let queryParams = { - 'auto_accept': opts['autoAccept'], - 'case_sensitive': opts['caseSensitive'], - 'attribute_to_creator': opts['attributeToCreator'], - 'mode': opts['mode'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = DocumentPretranslateResponse; - return this.apiClient.callApi( - '/documents/pretranslate', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Pretranslate a Document - * Initiate pretranslation of a list of Documents. This request will mark document(s) as being pretranslated. Pretranslation in this context is: - Applying and confirming exact TM matches based on the Memory of the Project; - Translating all other segments via MT without confirming them. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d '{\"id\": [123]}' -H \"Content-Type: application/json\" ``` Document translation is an asynchronous process that, in effect, is performed in the background. To check the status of pretranslation for a document, use the `GET /documents` endpoint. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. Once pretranslation is finished, the document can be downloaded via `GET /documents/files`. - * @param {module:model/DocumentPretranslateParameters} body - * @param {Object} opts Optional parameters - * @param {Boolean} opts.autoAccept Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. - * @param {Boolean} opts.caseSensitive Deprecated, use body param instead. Optional for using case matching against TM hits. - * @param {Boolean} opts.attributeToCreator Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. - * @param {String} opts.mode Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DocumentPretranslateResponse} - */ - pretranslateDocuments(body, opts) { - return this.pretranslateDocumentsWithHttpInfo(body, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Unlock documents - * Unlock documents for translation. Sets document \"Translation Done\" and \"Review Done\" to false. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922] }' ``` - * @param {module:model/DocumentDoneUpdateParameters} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response - */ - unlockDocumentsWithHttpInfo(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling unlockDocuments"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = ['Number']; - return this.apiClient.callApi( - '/documents/done/unlock', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Unlock documents - * Unlock documents for translation. Sets document \"Translation Done\" and \"Review Done\" to false. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922] }' ``` - * @param {module:model/DocumentDoneUpdateParameters} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} - */ - unlockDocuments(body) { - return this.unlockDocumentsWithHttpInfo(body) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - /** * Upload a File - * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` + * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` * @param {String} name A file name. * @param {Number} projectId A unique Project identifier. * @param {File} body The file contents to be uploaded. The entire POST body will be treated as the file. @@ -550,7 +141,7 @@ export default class DocumentsApi { let accepts = ['application/json']; let returnType = DocumentWithSegments; return this.apiClient.callApi( - '/documents/files', 'POST', + '/v2/documents/files', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -558,7 +149,7 @@ export default class DocumentsApi { /** * Upload a File - * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` + * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` * @param {String} name A file name. * @param {Number} projectId A unique Project identifier. * @param {File} body The file contents to be uploaded. The entire POST body will be treated as the file. diff --git a/src/api/FilesApi.js b/src/api/FilesApi.js index 2033aef..778e9b9 100644 --- a/src/api/FilesApi.js +++ b/src/api/FilesApi.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -21,7 +21,7 @@ import SourceFile from '../model/SourceFile'; /** * Files service. * @module api/FilesApi -* @version 0.5.0 +* @version 0.6.3 */ export default class FilesApi { @@ -40,7 +40,7 @@ export default class FilesApi { /** * Add Label to File - * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` + * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` * @param {String} id A File id. * @param {module:model/AddFileLabelRequest} name * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response @@ -71,7 +71,7 @@ export default class FilesApi { let accepts = []; let returnType = null; return this.apiClient.callApi( - '/files/labels', 'POST', + '/v2/files/labels', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -79,7 +79,7 @@ export default class FilesApi { /** * Add Label to File - * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` + * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` * @param {String} id A File id. * @param {module:model/AddFileLabelRequest} name * @return {Promise} a {@link https://www.promisejs.org/|Promise} @@ -94,7 +94,7 @@ export default class FilesApi { /** * Delete a File - * Delete a File. Example CURL command: ``` curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ``` + * Delete a File. Example CURL command: ``` curl -X DELETE https://api.lilt.com/v2/files?key=API_KEY&id=123 ``` * @param {Number} id A unique File identifier. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FileDeleteResponse} and HTTP response */ @@ -120,7 +120,7 @@ export default class FilesApi { let accepts = ['application/json']; let returnType = FileDeleteResponse; return this.apiClient.callApi( - '/files', 'DELETE', + '/v2/files', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -128,7 +128,7 @@ export default class FilesApi { /** * Delete a File - * Delete a File. Example CURL command: ``` curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ``` + * Delete a File. Example CURL command: ``` curl -X DELETE https://api.lilt.com/v2/files?key=API_KEY&id=123 ``` * @param {Number} id A unique File identifier. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/FileDeleteResponse} */ @@ -142,7 +142,7 @@ export default class FilesApi { /** * Download file - * Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' ``` + * Download a File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/files/download?key=API_KEY&id=1' ``` * @param {String} id A File id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response */ @@ -168,7 +168,7 @@ export default class FilesApi { let accepts = ['application/octet-stream']; let returnType = 'Blob'; return this.apiClient.callApi( - '/files/download', 'GET', + '/v2/files/download', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -176,7 +176,7 @@ export default class FilesApi { /** * Download file - * Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' ``` + * Download a File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/files/download?key=API_KEY&id=1' ``` * @param {String} id A File id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob} */ @@ -190,7 +190,7 @@ export default class FilesApi { /** * Retrieve a File - * Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the id request parameter. To retrieve all files, omit the id request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/files?key=API_KEY&id=274``` + * Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the id request parameter. To retrieve all files, omit the id request parameter. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274``` * @param {Object} opts Optional parameters * @param {Number} opts.id A unique File identifier. * @param {Array.} opts.labels One or more labels. This will return the files which contain all of the given labels. @@ -216,7 +216,7 @@ export default class FilesApi { let accepts = ['application/json']; let returnType = [SourceFile]; return this.apiClient.callApi( - '/files', 'GET', + '/v2/files', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -224,7 +224,7 @@ export default class FilesApi { /** * Retrieve a File - * Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the id request parameter. To retrieve all files, omit the id request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/files?key=API_KEY&id=274``` + * Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the id request parameter. To retrieve all files, omit the id request parameter. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274``` * @param {Object} opts Optional parameters * @param {Number} opts.id A unique File identifier. * @param {Array.} opts.labels One or more labels. This will return the files which contain all of the given labels. @@ -240,7 +240,7 @@ export default class FilesApi { /** * Remove Label from File - * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://lilt.com/2/files/labels?key=API_KEY&id=1&name=label_name' ``` + * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1&name=label_name' ``` * @param {String} id A File id. * @param {String} name A label name. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response @@ -272,7 +272,7 @@ export default class FilesApi { let accepts = []; let returnType = null; return this.apiClient.callApi( - '/files/labels', 'DELETE', + '/v2/files/labels', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -280,7 +280,7 @@ export default class FilesApi { /** * Remove Label from File - * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://lilt.com/2/files/labels?key=API_KEY&id=1&name=label_name' ``` + * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1&name=label_name' ``` * @param {String} id A File id. * @param {String} name A label name. * @return {Promise} a {@link https://www.promisejs.org/|Promise} @@ -295,7 +295,7 @@ export default class FilesApi { /** * Upload a File - * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. + * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. * @param {String} name A file name. * @param {File} body The file contents to be uploaded. The entire POST body will be treated as the file. * @param {Object} opts Optional parameters @@ -338,7 +338,7 @@ export default class FilesApi { let accepts = ['application/json']; let returnType = SourceFile; return this.apiClient.callApi( - '/files', 'POST', + '/v2/files', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -346,7 +346,7 @@ export default class FilesApi { /** * Upload a File - * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. + * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. * @param {String} name A file name. * @param {File} body The file contents to be uploaded. The entire POST body will be treated as the file. * @param {Object} opts Optional parameters diff --git a/src/api/JobsApi.js b/src/api/JobsApi.js index 82e1a88..aacb5a7 100644 --- a/src/api/JobsApi.js +++ b/src/api/JobsApi.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,7 +23,7 @@ import JobUpdateParameters from '../model/JobUpdateParameters'; /** * Jobs service. * @module api/JobsApi -* @version 0.5.0 +* @version 0.6.3 */ export default class JobsApi { @@ -42,7 +42,7 @@ export default class JobsApi { /** * Archive a Job - * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/archive?key=API_KEY' ``` + * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response */ @@ -68,7 +68,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = Job; return this.apiClient.callApi( - '/jobs/{jobId}/archive', 'POST', + '/v2/jobs/{jobId}/archive', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -76,7 +76,7 @@ export default class JobsApi { /** * Archive a Job - * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/archive?key=API_KEY' ``` + * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job} */ @@ -90,7 +90,7 @@ export default class JobsApi { /** * Create a Job - * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` + * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` * @param {module:model/JobCreateParameters} body * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response */ @@ -115,7 +115,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = Job; return this.apiClient.callApi( - '/jobs', 'POST', + '/v2/jobs', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -123,7 +123,7 @@ export default class JobsApi { /** * Create a Job - * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` + * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` * @param {module:model/JobCreateParameters} body * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job} */ @@ -137,7 +137,7 @@ export default class JobsApi { /** * Delete a Job - * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/JobDeleteResponse} and HTTP response */ @@ -163,7 +163,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = JobDeleteResponse; return this.apiClient.callApi( - '/jobs/{jobId}', 'DELETE', + '/v2/jobs/{jobId}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -171,7 +171,7 @@ export default class JobsApi { /** * Delete a Job - * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/JobDeleteResponse} */ @@ -185,7 +185,7 @@ export default class JobsApi { /** * Deliver a Job - * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY' ``` + * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response */ @@ -211,7 +211,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = Job; return this.apiClient.callApi( - '/jobs/{jobId}/deliver', 'POST', + '/v2/jobs/{jobId}/deliver', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -219,7 +219,7 @@ export default class JobsApi { /** * Deliver a Job - * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY' ``` + * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job} */ @@ -233,7 +233,7 @@ export default class JobsApi { /** * Download a Job - * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY' ``` + * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response */ @@ -259,7 +259,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = null; return this.apiClient.callApi( - '/jobs/{jobId}/downlod', 'GET', + '/v2/jobs/{jobId}/downlod', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -267,7 +267,7 @@ export default class JobsApi { /** * Download a Job - * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY' ``` + * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise} */ @@ -281,7 +281,7 @@ export default class JobsApi { /** * Export a Job - * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. + * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. * @param {Number} jobId A job id. * @param {String} type category for files and memory. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response @@ -313,7 +313,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = null; return this.apiClient.callApi( - '/jobs/{jobId}/export', 'GET', + '/v2/jobs/{jobId}/export', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -321,7 +321,7 @@ export default class JobsApi { /** * Export a Job - * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. + * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. * @param {Number} jobId A job id. * @param {String} type category for files and memory. * @return {Promise} a {@link https://www.promisejs.org/|Promise} @@ -336,7 +336,7 @@ export default class JobsApi { /** * Retrieve a Job - * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response */ @@ -362,7 +362,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = Job; return this.apiClient.callApi( - '/jobs/{jobId}', 'GET', + '/v2/jobs/{jobId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -370,7 +370,7 @@ export default class JobsApi { /** * Retrieve a Job - * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job} */ @@ -384,7 +384,7 @@ export default class JobsApi { /** * Retrieve Job Leverage Stats - * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/stats?key=API_KEY' ``` + * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/JobLeverageStats} and HTTP response */ @@ -410,7 +410,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = JobLeverageStats; return this.apiClient.callApi( - '/jobs/{jobId}/stats', 'POST', + '/v2/jobs/{jobId}/stats', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -418,7 +418,7 @@ export default class JobsApi { /** * Retrieve Job Leverage Stats - * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/stats?key=API_KEY' ``` + * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/JobLeverageStats} */ @@ -432,7 +432,7 @@ export default class JobsApi { /** * Reactivate a Job - * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/reactivate?key=API_KEY' ``` + * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response */ @@ -458,7 +458,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = Job; return this.apiClient.callApi( - '/jobs/{jobId}/reactivate', 'POST', + '/v2/jobs/{jobId}/reactivate', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -466,7 +466,7 @@ export default class JobsApi { /** * Reactivate a Job - * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/reactivate?key=API_KEY' ``` + * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job} */ @@ -480,7 +480,7 @@ export default class JobsApi { /** * Retrieve all Jobs - * Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false' ``` + * Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false' ``` * @param {Object} opts Optional parameters * @param {Boolean} opts.isArchived Retrieves all jobs that are archived. * @param {Boolean} opts.isDelivered Retrieves all jobs that are delivered. @@ -510,7 +510,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = [Job]; return this.apiClient.callApi( - '/jobs', 'GET', + '/v2/jobs', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -518,7 +518,7 @@ export default class JobsApi { /** * Retrieve all Jobs - * Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false' ``` + * Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false' ``` * @param {Object} opts Optional parameters * @param {Boolean} opts.isArchived Retrieves all jobs that are archived. * @param {Boolean} opts.isDelivered Retrieves all jobs that are delivered. @@ -536,7 +536,7 @@ export default class JobsApi { /** * Unarchive a Job - * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/unarchive?key=API_KEY' ``` + * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Job} and HTTP response */ @@ -562,7 +562,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = Job; return this.apiClient.callApi( - '/jobs/{jobId}/unarchive', 'POST', + '/v2/jobs/{jobId}/unarchive', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -570,7 +570,7 @@ export default class JobsApi { /** * Unarchive a Job - * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/unarchive?key=API_KEY' ``` + * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY' ``` * @param {Number} jobId A job id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Job} */ @@ -584,7 +584,7 @@ export default class JobsApi { /** * Update a Job - * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://lilt.com/2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` + * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` * @param {Number} jobId A job id. * @param {Object} opts Optional parameters * @param {module:model/JobUpdateParameters} opts.body @@ -613,7 +613,7 @@ export default class JobsApi { let accepts = ['application/json']; let returnType = Job; return this.apiClient.callApi( - '/jobs/{jobId}', 'PUT', + '/v2/jobs/{jobId}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -621,7 +621,7 @@ export default class JobsApi { /** * Update a Job - * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://lilt.com/2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` + * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` * @param {Number} jobId A job id. * @param {Object} opts Optional parameters * @param {module:model/JobUpdateParameters} opts.body diff --git a/src/api/LanguagesApi.js b/src/api/LanguagesApi.js index 2efc465..98ba11e 100644 --- a/src/api/LanguagesApi.js +++ b/src/api/LanguagesApi.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -19,7 +19,7 @@ import LanguagesResponse from '../model/LanguagesResponse'; /** * Languages service. * @module api/LanguagesApi -* @version 0.5.0 +* @version 0.6.3 */ export default class LanguagesApi { @@ -58,7 +58,7 @@ export default class LanguagesApi { let accepts = ['application/json']; let returnType = LanguagesResponse; return this.apiClient.callApi( - '/languages', 'GET', + '/v2/languages', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); diff --git a/src/api/MemoriesApi.js b/src/api/MemoriesApi.js index 5cf1e9c..f39a684 100644 --- a/src/api/MemoriesApi.js +++ b/src/api/MemoriesApi.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,20 +13,21 @@ import ApiClient from "../ApiClient"; +import DeleteSegmentFromMemoryResponse from '../model/DeleteSegmentFromMemoryResponse'; import Error from '../model/Error'; import Memory from '../model/Memory'; import MemoryCreateParameters from '../model/MemoryCreateParameters'; import MemoryDeleteResponse from '../model/MemoryDeleteResponse'; import MemoryImportResponse from '../model/MemoryImportResponse'; -import MemoryInsertResponse from '../model/MemoryInsertResponse'; import MemoryUpdateParameters from '../model/MemoryUpdateParameters'; -import MemoryUpdateResponse from '../model/MemoryUpdateResponse'; +import SDLXLIFFFilter from '../model/SDLXLIFFFilter'; +import TermbaseExportResponse from '../model/TermbaseExportResponse'; import TranslationMemoryEntry from '../model/TranslationMemoryEntry'; /** * Memories service. * @module api/MemoriesApi -* @version 0.5.0 +* @version 0.6.3 */ export default class MemoriesApi { @@ -70,7 +71,7 @@ export default class MemoriesApi { let accepts = ['application/json']; let returnType = Memory; return this.apiClient.callApi( - '/memories', 'POST', + '/v2/memories', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -118,7 +119,7 @@ export default class MemoriesApi { let accepts = ['application/json']; let returnType = MemoryDeleteResponse; return this.apiClient.callApi( - '/memories', 'DELETE', + '/v2/memories', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -139,116 +140,54 @@ export default class MemoriesApi { /** - * Retrieve a Memory - * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). - * @param {Object} opts Optional parameters - * @param {Number} opts.id An optional Memory identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + * Delete a segment from a memory. + * Delete a segment from a memory. ``` curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID ``` + * @param {Number} id A unique Memory identifier. + * @param {Number} segmentId A unique Segment identifier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DeleteSegmentFromMemoryResponse} and HTTP response */ - getMemoryWithHttpInfo(opts) { - opts = opts || {}; + deleteSegmentFromMemoryWithHttpInfo(id, segmentId) { let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'id': opts['id'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = [Memory]; - return this.apiClient.callApi( - '/memories', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Retrieve a Memory - * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). - * @param {Object} opts Optional parameters - * @param {Number} opts.id An optional Memory identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} - */ - getMemory(opts) { - return this.getMemoryWithHttpInfo(opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * File import for a Memory - * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm` and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://lilt.com/2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` - * @param {Number} memoryId A unique Memory identifier. - * @param {String} name Name of the TM or termbase file. - * @param {File} body The file contents to be uploaded. The entire POST body will be treated as the file. - * @param {Object} opts Optional parameters - * @param {Boolean} opts.hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). - * @param {Boolean} opts.skipDuplicates A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemoryImportResponse} and HTTP response - */ - importMemoryFileWithHttpInfo(memoryId, name, body, opts) { - opts = opts || {}; - let postBody = body; - // verify the required parameter 'memoryId' is set - if (memoryId === undefined || memoryId === null) { - throw new Error("Missing the required parameter 'memoryId' when calling importMemoryFile"); - } - // verify the required parameter 'name' is set - if (name === undefined || name === null) { - throw new Error("Missing the required parameter 'name' when calling importMemoryFile"); + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling deleteSegmentFromMemory"); } - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling importMemoryFile"); + // verify the required parameter 'segmentId' is set + if (segmentId === undefined || segmentId === null) { + throw new Error("Missing the required parameter 'segmentId' when calling deleteSegmentFromMemory"); } let pathParams = { }; let queryParams = { + 'id': id, + 'segment_id': segmentId }; let headerParams = { - 'memory_id': memoryId, - 'name': name, - 'has_header_row': opts['hasHeaderRow'], - 'skip_duplicates': opts['skipDuplicates'] }; let formParams = { }; let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/octet-stream']; + let contentTypes = []; let accepts = ['application/json']; - let returnType = MemoryImportResponse; + let returnType = DeleteSegmentFromMemoryResponse; return this.apiClient.callApi( - '/memories/import', 'POST', + '/v2/memories/segment', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); } /** - * File import for a Memory - * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm` and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://lilt.com/2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` - * @param {Number} memoryId A unique Memory identifier. - * @param {String} name Name of the TM or termbase file. - * @param {File} body The file contents to be uploaded. The entire POST body will be treated as the file. - * @param {Object} opts Optional parameters - * @param {Boolean} opts.hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). - * @param {Boolean} opts.skipDuplicates A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemoryImportResponse} + * Delete a segment from a memory. + * Delete a segment from a memory. ``` curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID ``` + * @param {Number} id A unique Memory identifier. + * @param {Number} segmentId A unique Segment identifier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DeleteSegmentFromMemoryResponse} */ - importMemoryFile(memoryId, name, body, opts) { - return this.importMemoryFileWithHttpInfo(memoryId, name, body, opts) + deleteSegmentFromMemory(id, segmentId) { + return this.deleteSegmentFromMemoryWithHttpInfo(id, segmentId) .then(function(response_and_data) { return response_and_data.data; }); @@ -256,32 +195,22 @@ export default class MemoriesApi { /** - * Query a Memory - * Perform a translation memory query. + * Termbase download for a Memory + * Downloads the termbase export for the given memory as a CSV file. Ensure you first call the `/2/memories/termbase/export` endpoint to start the export process before you try to download it. ``` curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID ``` * @param {Number} id A unique Memory identifier. - * @param {String} query A source query. - * @param {Object} opts Optional parameters - * @param {Number} opts.n Maximum number of results to return. (default to 10) - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response */ - queryMemoryWithHttpInfo(id, query, opts) { - opts = opts || {}; + downloadTermbaseWithHttpInfo(id) { let postBody = null; // verify the required parameter 'id' is set if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling queryMemory"); - } - // verify the required parameter 'query' is set - if (query === undefined || query === null) { - throw new Error("Missing the required parameter 'query' when calling queryMemory"); + throw new Error("Missing the required parameter 'id' when calling downloadTermbase"); } let pathParams = { }; let queryParams = { - 'id': id, - 'query': query, - 'n': opts['n'] + 'id': id }; let headerParams = { }; @@ -291,25 +220,22 @@ export default class MemoriesApi { let authNames = ['ApiKeyAuth', 'BasicAuth']; let contentTypes = []; let accepts = ['application/json']; - let returnType = [TranslationMemoryEntry]; + let returnType = 'Blob'; return this.apiClient.callApi( - '/memories/query', 'GET', + '/v2/memories/termbase/download', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); } /** - * Query a Memory - * Perform a translation memory query. + * Termbase download for a Memory + * Downloads the termbase export for the given memory as a CSV file. Ensure you first call the `/2/memories/termbase/export` endpoint to start the export process before you try to download it. ``` curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID ``` * @param {Number} id A unique Memory identifier. - * @param {String} query A source query. - * @param {Object} opts Optional parameters - * @param {Number} opts.n Maximum number of results to return. (default to 10) - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob} */ - queryMemory(id, query, opts) { - return this.queryMemoryWithHttpInfo(id, query, opts) + downloadTermbase(id) { + return this.downloadTermbaseWithHttpInfo(id) .then(function(response_and_data) { return response_and_data.data; }); @@ -317,30 +243,22 @@ export default class MemoriesApi { /** - * Delete-sync for a Memory - * Deletes segments in the Memory matching the `from_time`, `to_time` and `when` parameters. Example CURL command: ``` curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created ``` + * Termbase export for a Memory + * Exports the termbase entries for the given memory into a CSV file. Calling this endpoint will begin the export process in the background. Check that the processing is complete by polling the `GET /2/memories` endpoint. When the `is_processing` value is 0 then call the `POST /2/memories/termbase/download` endpoint. ``` curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID ``` * @param {Number} id A unique Memory identifier. - * @param {Object} opts Optional parameters - * @param {Number} opts.fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. - * @param {Number} opts.toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. - * @param {String} opts.when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemoryInsertResponse} and HTTP response + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TermbaseExportResponse} and HTTP response */ - syncDeleteMemoryWithHttpInfo(id, opts) { - opts = opts || {}; + exportTermbaseWithHttpInfo(id) { let postBody = null; // verify the required parameter 'id' is set if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling syncDeleteMemory"); + throw new Error("Missing the required parameter 'id' when calling exportTermbase"); } let pathParams = { }; let queryParams = { - 'id': id, - 'from_time': opts['fromTime'], - 'to_time': opts['toTime'], - 'when': opts['when'] + 'id': id }; let headerParams = { }; @@ -350,26 +268,22 @@ export default class MemoriesApi { let authNames = ['ApiKeyAuth', 'BasicAuth']; let contentTypes = []; let accepts = ['application/json']; - let returnType = MemoryInsertResponse; + let returnType = TermbaseExportResponse; return this.apiClient.callApi( - '/memories/sync', 'DELETE', + '/v2/memories/termbase/export', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); } /** - * Delete-sync for a Memory - * Deletes segments in the Memory matching the `from_time`, `to_time` and `when` parameters. Example CURL command: ``` curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created ``` + * Termbase export for a Memory + * Exports the termbase entries for the given memory into a CSV file. Calling this endpoint will begin the export process in the background. Check that the processing is complete by polling the `GET /2/memories` endpoint. When the `is_processing` value is 0 then call the `POST /2/memories/termbase/download` endpoint. ``` curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID ``` * @param {Number} id A unique Memory identifier. - * @param {Object} opts Optional parameters - * @param {Number} opts.fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. - * @param {Number} opts.toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. - * @param {String} opts.when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemoryInsertResponse} + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TermbaseExportResponse} */ - syncDeleteMemory(id, opts) { - return this.syncDeleteMemoryWithHttpInfo(id, opts) + exportTermbase(id) { + return this.exportTermbaseWithHttpInfo(id) .then(function(response_and_data) { return response_and_data.data; }); @@ -377,30 +291,20 @@ export default class MemoriesApi { /** - * Get-sync for a Memory - * Get all or part of a memory in TMX 1.4b format. If the `from_time` and/or `to_time` are omitted, then all segments are returned. The parameter `when` specifies on which date field `from_time` and `to_time` are matched. Possible values are `created` (when the segment was originally created in the memory), `updated` (when the segment was lastly updated), and `deleted` (when the segment was deleted). Example CURL command: ``` curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx ``` - * @param {Number} id A unique Memory identifier. + * Retrieve a Memory + * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). * @param {Object} opts Optional parameters - * @param {Number} opts.fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. - * @param {Number} opts.toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. - * @param {String} opts.when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response + * @param {Number} opts.id An optional Memory identifier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response */ - syncDownMemoryWithHttpInfo(id, opts) { + getMemoryWithHttpInfo(opts) { opts = opts || {}; let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling syncDownMemory"); - } let pathParams = { }; let queryParams = { - 'id': id, - 'from_time': opts['fromTime'], - 'to_time': opts['toTime'], - 'when': opts['when'] + 'id': opts['id'] }; let headerParams = { }; @@ -409,27 +313,24 @@ export default class MemoriesApi { let authNames = ['ApiKeyAuth', 'BasicAuth']; let contentTypes = []; - let accepts = ['application/x-tmx']; - let returnType = 'Blob'; + let accepts = ['application/json']; + let returnType = [Memory]; return this.apiClient.callApi( - '/memories/sync', 'GET', + '/v2/memories', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); } /** - * Get-sync for a Memory - * Get all or part of a memory in TMX 1.4b format. If the `from_time` and/or `to_time` are omitted, then all segments are returned. The parameter `when` specifies on which date field `from_time` and `to_time` are matched. Possible values are `created` (when the segment was originally created in the memory), `updated` (when the segment was lastly updated), and `deleted` (when the segment was deleted). Example CURL command: ``` curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx ``` - * @param {Number} id A unique Memory identifier. + * Retrieve a Memory + * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). * @param {Object} opts Optional parameters - * @param {Number} opts.fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. - * @param {Number} opts.toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. - * @param {String} opts.when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob} + * @param {Number} opts.id An optional Memory identifier. + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} */ - syncDownMemory(id, opts) { - return this.syncDownMemoryWithHttpInfo(id, opts) + getMemory(opts) { + return this.getMemoryWithHttpInfo(opts) .then(function(response_and_data) { return response_and_data.data; }); @@ -437,24 +338,31 @@ export default class MemoriesApi { /** - * Insert-sync for a Memory - * Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command: ``` curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\",\\\"id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` - * @param {Number} id A unique Memory identifier. - * @param {String} body The file contents to be uploaded. The entire POST body will be treated as the file. + * File import for a Memory + * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm`, `*.sdlxliff`(With custom Filters), '*.xliff', and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` Example CURL command to upload a translation memory file named `my_memory.sdlxliff` in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments. ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdlxliff\\\",\\\"memory_id\\\": 12,\\\"sdlxliff_filters\\\":[{\\\"conf_name\\\": \\\"Translated\\\", \\\"percentage\\\": 100, \\\"allow_unlocked\\\": false}]\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdlxliff + * @param {Number} memoryId A unique Memory identifier. + * @param {String} name Name of the TM or termbase file. + * @param {File} body The file contents to be uploaded. The entire POST body will be treated as the file. * @param {Object} opts Optional parameters - * @param {String} opts.name Name of the TMX file. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemoryInsertResponse} and HTTP response + * @param {Array.} opts.sdlxliffFilters Contains Filter information Unique to SDLXLIFF + * @param {Boolean} opts.hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). + * @param {Boolean} opts.skipDuplicates A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemoryImportResponse} and HTTP response */ - syncInsertMemoryWithHttpInfo(id, body, opts) { + importMemoryFileWithHttpInfo(memoryId, name, body, opts) { opts = opts || {}; let postBody = body; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling syncInsertMemory"); + // verify the required parameter 'memoryId' is set + if (memoryId === undefined || memoryId === null) { + throw new Error("Missing the required parameter 'memoryId' when calling importMemoryFile"); + } + // verify the required parameter 'name' is set + if (name === undefined || name === null) { + throw new Error("Missing the required parameter 'name' when calling importMemoryFile"); } // verify the required parameter 'body' is set if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling syncInsertMemory"); + throw new Error("Missing the required parameter 'body' when calling importMemoryFile"); } let pathParams = { @@ -462,8 +370,11 @@ export default class MemoriesApi { let queryParams = { }; let headerParams = { - 'id': id, - 'name': opts['name'] + 'memory_id': memoryId, + 'name': name, + 'sdlxliff_filters': opts['sdlxliffFilters'], + 'has_header_row': opts['hasHeaderRow'], + 'skip_duplicates': opts['skipDuplicates'] }; let formParams = { }; @@ -471,25 +382,28 @@ export default class MemoriesApi { let authNames = ['ApiKeyAuth', 'BasicAuth']; let contentTypes = ['application/octet-stream']; let accepts = ['application/json']; - let returnType = MemoryInsertResponse; + let returnType = MemoryImportResponse; return this.apiClient.callApi( - '/memories/sync', 'POST', + '/v2/memories/import', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); } /** - * Insert-sync for a Memory - * Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command: ``` curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\",\\\"id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` - * @param {Number} id A unique Memory identifier. - * @param {String} body The file contents to be uploaded. The entire POST body will be treated as the file. + * File import for a Memory + * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm`, `*.sdlxliff`(With custom Filters), '*.xliff', and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` Example CURL command to upload a translation memory file named `my_memory.sdlxliff` in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments. ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdlxliff\\\",\\\"memory_id\\\": 12,\\\"sdlxliff_filters\\\":[{\\\"conf_name\\\": \\\"Translated\\\", \\\"percentage\\\": 100, \\\"allow_unlocked\\\": false}]\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdlxliff + * @param {Number} memoryId A unique Memory identifier. + * @param {String} name Name of the TM or termbase file. + * @param {File} body The file contents to be uploaded. The entire POST body will be treated as the file. * @param {Object} opts Optional parameters - * @param {String} opts.name Name of the TMX file. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemoryInsertResponse} + * @param {Array.} opts.sdlxliffFilters Contains Filter information Unique to SDLXLIFF + * @param {Boolean} opts.hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). + * @param {Boolean} opts.skipDuplicates A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemoryImportResponse} */ - syncInsertMemory(id, body, opts) { - return this.syncInsertMemoryWithHttpInfo(id, body, opts) + importMemoryFile(memoryId, name, body, opts) { + return this.importMemoryFileWithHttpInfo(memoryId, name, body, opts) .then(function(response_and_data) { return response_and_data.data; }); @@ -497,65 +411,60 @@ export default class MemoriesApi { /** - * Update-sync for a Memory - * Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field `LILT-API`. The number of segments returned by the `from_time`, `to_time`, `when` parameters and the number of segments in the TMX file need to be identical. Example CURL command: ``` curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\", \\\"id\\\": 42, \\\"from_time\\\": 1491048000, \\\"to_time\\\": 1491049800, \"when\": \"Updated\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` + * Query a Memory + * Perform a translation memory query. * @param {Number} id A unique Memory identifier. - * @param {String} body The file contents to be uploaded. The entire PUT body will be treated as the file. + * @param {String} query A source query. * @param {Object} opts Optional parameters - * @param {Number} opts.fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. - * @param {Number} opts.toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. - * @param {String} opts.when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemoryUpdateResponse} and HTTP response + * @param {Number} opts.n Maximum number of results to return. (default to 10) + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response */ - syncUpdateMemoryWithHttpInfo(id, body, opts) { + queryMemoryWithHttpInfo(id, query, opts) { opts = opts || {}; - let postBody = body; + let postBody = null; // verify the required parameter 'id' is set if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling syncUpdateMemory"); + throw new Error("Missing the required parameter 'id' when calling queryMemory"); } - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling syncUpdateMemory"); + // verify the required parameter 'query' is set + if (query === undefined || query === null) { + throw new Error("Missing the required parameter 'query' when calling queryMemory"); } let pathParams = { }; let queryParams = { + 'id': id, + 'query': query, + 'n': opts['n'] }; let headerParams = { - 'id': id, - 'from_time': opts['fromTime'], - 'to_time': opts['toTime'], - 'when': opts['when'] }; let formParams = { }; let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; + let contentTypes = []; let accepts = ['application/json']; - let returnType = MemoryUpdateResponse; + let returnType = [TranslationMemoryEntry]; return this.apiClient.callApi( - '/memories/sync', 'PUT', + '/v2/memories/query', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); } /** - * Update-sync for a Memory - * Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field `LILT-API`. The number of segments returned by the `from_time`, `to_time`, `when` parameters and the number of segments in the TMX file need to be identical. Example CURL command: ``` curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\", \\\"id\\\": 42, \\\"from_time\\\": 1491048000, \\\"to_time\\\": 1491049800, \"when\": \"Updated\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` + * Query a Memory + * Perform a translation memory query. * @param {Number} id A unique Memory identifier. - * @param {String} body The file contents to be uploaded. The entire PUT body will be treated as the file. + * @param {String} query A source query. * @param {Object} opts Optional parameters - * @param {Number} opts.fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. - * @param {Number} opts.toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. - * @param {String} opts.when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemoryUpdateResponse} + * @param {Number} opts.n Maximum number of results to return. (default to 10) + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} */ - syncUpdateMemory(id, body, opts) { - return this.syncUpdateMemoryWithHttpInfo(id, body, opts) + queryMemory(id, query, opts) { + return this.queryMemoryWithHttpInfo(id, query, opts) .then(function(response_and_data) { return response_and_data.data; }); @@ -589,7 +498,7 @@ export default class MemoriesApi { let accepts = ['application/json']; let returnType = Memory; return this.apiClient.callApi( - '/memories', 'PUT', + '/v2/memories', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); diff --git a/src/api/ProjectsApi.js b/src/api/ProjectsApi.js index 347f764..956bbcb 100644 --- a/src/api/ProjectsApi.js +++ b/src/api/ProjectsApi.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -13,22 +13,15 @@ import ApiClient from "../ApiClient"; -import AutoAssignmentParameters from '../model/AutoAssignmentParameters'; -import AutoAssignmentResponse from '../model/AutoAssignmentResponse'; -import BadRequest from '../model/BadRequest'; import Error from '../model/Error'; import Project from '../model/Project'; import ProjectCreateParameters from '../model/ProjectCreateParameters'; import ProjectDeleteResponse from '../model/ProjectDeleteResponse'; -import ProjectQuote from '../model/ProjectQuote'; -import ProjectStatus from '../model/ProjectStatus'; -import ProjectsToDeliver from '../model/ProjectsToDeliver'; -import ProjectsToUpdate from '../model/ProjectsToUpdate'; /** * Projects service. * @module api/ProjectsApi -* @version 0.5.0 +* @version 0.6.3 */ export default class ProjectsApi { @@ -72,7 +65,7 @@ export default class ProjectsApi { let accepts = ['application/json']; let returnType = Project; return this.apiClient.callApi( - '/projects', 'POST', + '/v2/projects', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -118,7 +111,7 @@ export default class ProjectsApi { let accepts = ['application/json']; let returnType = ProjectDeleteResponse; return this.apiClient.callApi( - '/projects', 'DELETE', + '/v2/projects', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -139,203 +132,6 @@ export default class ProjectsApi { } - /** - * Deliver multiple projects apart from their jobs. - * Deliver mulitple projects apart from their jobs. - * @param {module:model/ProjectsToDeliver} body - * @param {Object} opts Optional parameters - * @param {Boolean} opts.workflowEnabled Whether the project has or not workflows enabled. (not used) - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response - */ - deliverProjectsBulkWithHttpInfo(body, opts) { - opts = opts || {}; - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling deliverProjectsBulk"); - } - - let pathParams = { - }; - let queryParams = { - 'workflowEnabled': opts['workflowEnabled'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = null; - return this.apiClient.callApi( - '/projects/bulk-deliver', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Deliver multiple projects apart from their jobs. - * Deliver mulitple projects apart from their jobs. - * @param {module:model/ProjectsToDeliver} body - * @param {Object} opts Optional parameters - * @param {Boolean} opts.workflowEnabled Whether the project has or not workflows enabled. (not used) - * @return {Promise} a {@link https://www.promisejs.org/|Promise} - */ - deliverProjectsBulk(body, opts) { - return this.deliverProjectsBulkWithHttpInfo(body, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Retrieve Project report - * Get information about a project that can be used for quoting. This includes: * A translation memory leverage report * Word count * Segment count - * @param {Number} id A unique Project identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ProjectQuote} and HTTP response - */ - getProjectReportWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getProjectReport"); - } - - let pathParams = { - }; - let queryParams = { - 'id': id - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ProjectQuote; - return this.apiClient.callApi( - '/projects/quote', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Retrieve Project report - * Get information about a project that can be used for quoting. This includes: * A translation memory leverage report * Word count * Segment count - * @param {Number} id A unique Project identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ProjectQuote} - */ - getProjectReport(id) { - return this.getProjectReportWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Retrieve Project revision report - * Get information about a project's revision report. This includes: * Stats on accepted segments * reviewer details * Error rate - * @param {Number} id A unique Project identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response - */ - getProjectRevisionReportWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getProjectRevisionReport"); - } - - let pathParams = { - 'id': id - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = null; - return this.apiClient.callApi( - '/projects/{id}/revision', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Retrieve Project revision report - * Get information about a project's revision report. This includes: * Stats on accepted segments * reviewer details * Error rate - * @param {Number} id A unique Project identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise} - */ - getProjectRevisionReport(id) { - return this.getProjectRevisionReportWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Retrieve Project status - * Retrieve the status of a Project. - * @param {Number} id A unique Project identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ProjectStatus} and HTTP response - */ - getProjectStatusWithHttpInfo(id) { - let postBody = null; - // verify the required parameter 'id' is set - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling getProjectStatus"); - } - - let pathParams = { - }; - let queryParams = { - 'id': id - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = ProjectStatus; - return this.apiClient.callApi( - '/projects/status', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Retrieve Project status - * Retrieve the status of a Project. - * @param {Number} id A unique Project identifier. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ProjectStatus} - */ - getProjectStatus(id) { - return this.getProjectStatusWithHttpInfo(id) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - /** * Retrieve a Project * Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project, multiple projects or a list of all available projects. To retrieve a specific project, specify the `id` request parameter or you can retrieve multiple projects by adding comma (,) between ids eg. `?id=1234,5678`. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. @@ -376,7 +172,7 @@ export default class ProjectsApi { let accepts = ['application/json']; let returnType = [Project]; return this.apiClient.callApi( - '/projects', 'GET', + '/v2/projects', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -404,104 +200,4 @@ export default class ProjectsApi { } - /** - * Auto Assignment - * Trigger automatic assignment of linguists. Requires auto-assignment to be enabled as a setting on the origanization level. - * @param {String} projectIds The comma separated list of project ids to auto-assign. Can be sent in the body as an alternative but if both are specified the query has precedence. - * @param {Object} opts Optional parameters - * @param {module:model/AutoAssignmentParameters} opts.body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response - */ - triggerAutoAssignmentWithHttpInfo(projectIds, opts) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'projectIds' is set - if (projectIds === undefined || projectIds === null) { - throw new Error("Missing the required parameter 'projectIds' when calling triggerAutoAssignment"); - } - - let pathParams = { - }; - let queryParams = { - 'projectIds': projectIds - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = [AutoAssignmentResponse]; - return this.apiClient.callApi( - '/autoAssignment', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Auto Assignment - * Trigger automatic assignment of linguists. Requires auto-assignment to be enabled as a setting on the origanization level. - * @param {String} projectIds The comma separated list of project ids to auto-assign. Can be sent in the body as an alternative but if both are specified the query has precedence. - * @param {Object} opts Optional parameters - * @param {module:model/AutoAssignmentParameters} opts.body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} - */ - triggerAutoAssignment(projectIds, opts) { - return this.triggerAutoAssignmentWithHttpInfo(projectIds, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Update multiple Projects with a single payload - * Update multiple Projects with a single payload. - * @param {module:model/ProjectsToUpdate} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response - */ - updateProjectsBulkWithHttpInfo(body) { - let postBody = body; - // verify the required parameter 'body' is set - if (body === undefined || body === null) { - throw new Error("Missing the required parameter 'body' when calling updateProjectsBulk"); - } - - let pathParams = { - }; - let queryParams = { - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = [Project]; - return this.apiClient.callApi( - '/projects/bulk-update', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Update multiple Projects with a single payload - * Update multiple Projects with a single payload. - * @param {module:model/ProjectsToUpdate} body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} - */ - updateProjectsBulk(body) { - return this.updateProjectsBulkWithHttpInfo(body) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - } diff --git a/src/api/TranslateApi.js b/src/api/TranslateApi.js index 8c9644f..f91a931 100644 --- a/src/api/TranslateApi.js +++ b/src/api/TranslateApi.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,16 +14,14 @@ import ApiClient from "../ApiClient"; import Error from '../model/Error'; -import TranslateRegisterResponse from '../model/TranslateRegisterResponse'; import TranslateSegmentBody from '../model/TranslateSegmentBody'; -import TranslateSegmentBody1 from '../model/TranslateSegmentBody1'; import TranslationInfo from '../model/TranslationInfo'; import TranslationList from '../model/TranslationList'; /** * Translate service. * @module api/TranslateApi -* @version 0.5.0 +* @version 0.6.3 */ export default class TranslateApi { @@ -42,7 +40,7 @@ export default class TranslateApi { /** * Translate a File - * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` + * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` * @param {String} fileId List of File ids to be translated, comma separated. * @param {String} memoryId Id of Memory to use in translation. * @param {Object} opts Optional parameters @@ -80,7 +78,7 @@ export default class TranslateApi { let accepts = ['application/json']; let returnType = TranslationInfo; return this.apiClient.callApi( - '/translate/file', 'POST', + '/v2/translate/file', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -88,7 +86,7 @@ export default class TranslateApi { /** * Translate a File - * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` + * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` * @param {String} fileId List of File ids to be translated, comma separated. * @param {String} memoryId Id of Memory to use in translation. * @param {Object} opts Optional parameters @@ -106,7 +104,7 @@ export default class TranslateApi { /** * Download translated file - * Download a translated File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/files?key=API_KEY&id=1' ``` + * Download a translated File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/files?key=API_KEY&id=1' ``` * @param {String} id A translation id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Blob} and HTTP response */ @@ -132,7 +130,7 @@ export default class TranslateApi { let accepts = ['application/octet-stream']; let returnType = 'Blob'; return this.apiClient.callApi( - '/translate/files', 'GET', + '/v2/translate/files', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -140,7 +138,7 @@ export default class TranslateApi { /** * Download translated file - * Download a translated File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/files?key=API_KEY&id=1' ``` + * Download a translated File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/files?key=API_KEY&id=1' ``` * @param {String} id A translation id. * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Blob} */ @@ -154,7 +152,7 @@ export default class TranslateApi { /** * Monitor file translation - * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` + * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` * @param {Object} opts Optional parameters * @param {String} opts.translationIds List of translation ids, comma separated * @param {String} opts.status One of the translation statuses - `InProgress`, `Completed`, `Failed`, `ReadyForDownload` @@ -184,7 +182,7 @@ export default class TranslateApi { let accepts = ['application/json']; let returnType = TranslationInfo; return this.apiClient.callApi( - '/translate/file', 'GET', + '/v2/translate/file', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -192,7 +190,7 @@ export default class TranslateApi { /** * Monitor file translation - * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` + * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` * @param {Object} opts Optional parameters * @param {String} opts.translationIds List of translation ids, comma separated * @param {String} opts.status One of the translation statuses - `InProgress`, `Completed`, `Failed`, `ReadyForDownload` @@ -208,147 +206,11 @@ export default class TranslateApi { } - /** - * Register a segment - * Register a source string for interactive translation. The `source_hash` value that is returned by this request is required by the `prefix` parameter for the translation endpoint. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param {String} source A source string to be registered. - * @param {String} srclang An ISO 639-1 language code. - * @param {String} trglang An ISO 639-1 language code. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TranslateRegisterResponse} and HTTP response - */ - registerSegmentWithHttpInfo(source, srclang, trglang) { - let postBody = null; - // verify the required parameter 'source' is set - if (source === undefined || source === null) { - throw new Error("Missing the required parameter 'source' when calling registerSegment"); - } - // verify the required parameter 'srclang' is set - if (srclang === undefined || srclang === null) { - throw new Error("Missing the required parameter 'srclang' when calling registerSegment"); - } - // verify the required parameter 'trglang' is set - if (trglang === undefined || trglang === null) { - throw new Error("Missing the required parameter 'trglang' when calling registerSegment"); - } - - let pathParams = { - }; - let queryParams = { - 'source': source, - 'srclang': srclang, - 'trglang': trglang - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = TranslateRegisterResponse; - return this.apiClient.callApi( - '/translate/register', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Register a segment - * Register a source string for interactive translation. The `source_hash` value that is returned by this request is required by the `prefix` parameter for the translation endpoint. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param {String} source A source string to be registered. - * @param {String} srclang An ISO 639-1 language code. - * @param {String} trglang An ISO 639-1 language code. - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TranslateRegisterResponse} - */ - registerSegment(source, srclang, trglang) { - return this.registerSegmentWithHttpInfo(source, srclang, trglang) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - - /** - * Translate a segment - * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The `source` parameter may be supplied in the query or in the request body. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param {Number} memoryId A unique Memory identifier. - * @param {Object} opts Optional parameters - * @param {String} opts.source The source text to be translated. - * @param {Number} opts.sourceHash A source hash code. - * @param {String} opts.prefix A target prefix. - * @param {Number} opts.n Return top n translations (deprecated). (default to 1) - * @param {Boolean} opts.rich Returns rich translation information (e.g., with word alignments). (default to false) - * @param {Boolean} opts.tmMatches Include translation memory fuzzy matches. (default to true) - * @param {Boolean} opts.projectTags Project tags. Projects tags in source to target if set to true. (default to false) - * @param {module:model/TranslateSegmentBody} opts.body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TranslationList} and HTTP response - */ - translateSegmentWithHttpInfo(memoryId, opts) { - opts = opts || {}; - let postBody = opts['body']; - // verify the required parameter 'memoryId' is set - if (memoryId === undefined || memoryId === null) { - throw new Error("Missing the required parameter 'memoryId' when calling translateSegment"); - } - - let pathParams = { - }; - let queryParams = { - 'memory_id': memoryId, - 'source': opts['source'], - 'source_hash': opts['sourceHash'], - 'prefix': opts['prefix'], - 'n': opts['n'], - 'rich': opts['rich'], - 'tm_matches': opts['tmMatches'], - 'project_tags': opts['projectTags'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['ApiKeyAuth', 'BasicAuth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = TranslationList; - return this.apiClient.callApi( - '/translate', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null - ); - } - - /** - * Translate a segment - * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The `source` parameter may be supplied in the query or in the request body. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param {Number} memoryId A unique Memory identifier. - * @param {Object} opts Optional parameters - * @param {String} opts.source The source text to be translated. - * @param {Number} opts.sourceHash A source hash code. - * @param {String} opts.prefix A target prefix. - * @param {Number} opts.n Return top n translations (deprecated). (default to 1) - * @param {Boolean} opts.rich Returns rich translation information (e.g., with word alignments). (default to false) - * @param {Boolean} opts.tmMatches Include translation memory fuzzy matches. (default to true) - * @param {Boolean} opts.projectTags Project tags. Projects tags in source to target if set to true. (default to false) - * @param {module:model/TranslateSegmentBody} opts.body - * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TranslationList} - */ - translateSegment(memoryId, opts) { - return this.translateSegmentWithHttpInfo(memoryId, opts) - .then(function(response_and_data) { - return response_and_data.data; - }); - } - - /** * Translate a segment * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. * @param {Object} opts Optional parameters - * @param {module:model/TranslateSegmentBody1} opts.body + * @param {module:model/TranslateSegmentBody} opts.body * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TranslationList} and HTTP response */ translateSegmentPostWithHttpInfo(opts) { @@ -369,7 +231,7 @@ export default class TranslateApi { let accepts = ['application/json']; let returnType = TranslationList; return this.apiClient.callApi( - '/translate', 'POST', + '/v2/translate', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null ); @@ -379,7 +241,7 @@ export default class TranslateApi { * Translate a segment * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. * @param {Object} opts Optional parameters - * @param {module:model/TranslateSegmentBody1} opts.body + * @param {module:model/TranslateSegmentBody} opts.body * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TranslationList} */ translateSegmentPost(opts) { diff --git a/src/index.js b/src/index.js index b2160fa..dd36044 100644 --- a/src/index.js +++ b/src/index.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,42 +14,14 @@ import ApiClient from './ApiClient'; import AddFileLabelRequest from './model/AddFileLabelRequest'; -import Annotation from './model/Annotation'; -import ApiRoot from './model/ApiRoot'; -import AssignmentDetails from './model/AssignmentDetails'; -import AssignmentError from './model/AssignmentError'; -import AutoAssignmentParameters from './model/AutoAssignmentParameters'; -import AutoAssignmentResponse from './model/AutoAssignmentResponse'; -import BadRequest from './model/BadRequest'; -import Comment from './model/Comment'; -import CommentBody from './model/CommentBody'; -import CommentDeleteResponse from './model/CommentDeleteResponse'; -import Connector from './model/Connector'; -import ConnectorArguments from './model/ConnectorArguments'; -import ConnectorDeleteResponse from './model/ConnectorDeleteResponse'; -import ConnectorJob from './model/ConnectorJob'; -import ConverterConfigUpdateResponse from './model/ConverterConfigUpdateResponse'; import CreateConverterConfigParameters from './model/CreateConverterConfigParameters'; -import DocumentAssignmentParameters from './model/DocumentAssignmentParameters'; -import DocumentAssignmentResponse from './model/DocumentAssignmentResponse'; -import DocumentComments from './model/DocumentComments'; -import DocumentDeleteResponse from './model/DocumentDeleteResponse'; -import DocumentDoneUpdateParameters from './model/DocumentDoneUpdateParameters'; -import DocumentDoneUpdateParameters1 from './model/DocumentDoneUpdateParameters1'; -import DocumentDoneUpdateParameters2 from './model/DocumentDoneUpdateParameters2'; -import DocumentParameters from './model/DocumentParameters'; -import DocumentPretranslateParameters from './model/DocumentPretranslateParameters'; -import DocumentPretranslateResponse from './model/DocumentPretranslateResponse'; -import DocumentPretranslating from './model/DocumentPretranslating'; -import DocumentPretranslatingStatus from './model/DocumentPretranslatingStatus'; -import DocumentQuote from './model/DocumentQuote'; +import DeleteSegmentFromMemoryResponse from './model/DeleteSegmentFromMemoryResponse'; import DocumentWithSegments from './model/DocumentWithSegments'; import DocumentWithoutSegments from './model/DocumentWithoutSegments'; import DocumentWithoutSegmentsStatus from './model/DocumentWithoutSegmentsStatus'; -import DocumentWorkflow from './model/DocumentWorkflow'; -import EditFilterMappingParameters from './model/EditFilterMappingParameters'; import Error from './model/Error'; import FileDeleteResponse from './model/FileDeleteResponse'; +import InlineResponse200 from './model/InlineResponse200'; import Job from './model/Job'; import JobCreateParameters from './model/JobCreateParameters'; import JobDeleteResponse from './model/JobDeleteResponse'; @@ -59,86 +31,39 @@ import JobStats from './model/JobStats'; import JobUpdateParameters from './model/JobUpdateParameters'; import LanguagePair from './model/LanguagePair'; import LanguagesResponse from './model/LanguagesResponse'; -import LexiconEntry from './model/LexiconEntry'; -import LexiconEntryExamples from './model/LexiconEntryExamples'; -import LexiconEntrySourceSpan from './model/LexiconEntrySourceSpan'; -import LexiconEntryTargetSpan from './model/LexiconEntryTargetSpan'; -import LexiconEntryTranslations from './model/LexiconEntryTranslations'; -import LexiconUpdateParameters from './model/LexiconUpdateParameters'; -import LexiconUpdateResponse from './model/LexiconUpdateResponse'; -import MatchBand from './model/MatchBand'; +import LiltCreateContent from './model/LiltCreateContent'; import Memory from './model/Memory'; import MemoryCreateParameters from './model/MemoryCreateParameters'; import MemoryDeleteResponse from './model/MemoryDeleteResponse'; import MemoryImportResponse from './model/MemoryImportResponse'; -import MemoryInsertResponse from './model/MemoryInsertResponse'; import MemoryUpdateParameters from './model/MemoryUpdateParameters'; -import MemoryUpdateResponse from './model/MemoryUpdateResponse'; -import NextWorkflowTask from './model/NextWorkflowTask'; import Project from './model/Project'; import ProjectCreateParameters from './model/ProjectCreateParameters'; import ProjectDeleteResponse from './model/ProjectDeleteResponse'; -import ProjectQuote from './model/ProjectQuote'; import ProjectStats from './model/ProjectStats'; -import ProjectStatus from './model/ProjectStatus'; -import ProjectUpdateResponse from './model/ProjectUpdateResponse'; -import ProjectsToDeliver from './model/ProjectsToDeliver'; -import ProjectsToUpdate from './model/ProjectsToUpdate'; -import QARuleMatches from './model/QARuleMatches'; -import QARuleMatchesContext from './model/QARuleMatchesContext'; -import QARuleMatchesCustomRules from './model/QARuleMatchesCustomRules'; -import QARuleMatchesMatches from './model/QARuleMatchesMatches'; -import QARuleMatchesReplacements from './model/QARuleMatchesReplacements'; -import QARuleMatchesRule from './model/QARuleMatchesRule'; -import QARuleMatchesRuleCategory from './model/QARuleMatchesRuleCategory'; -import QARuleMatchesRuleUrls from './model/QARuleMatchesRuleUrls'; -import ResourceStatus from './model/ResourceStatus'; -import ReviewCompletionTypeError from './model/ReviewCompletionTypeError'; +import SDLXLIFFFilter from './model/SDLXLIFFFilter'; import Segment from './model/Segment'; -import SegmentCreateParameters from './model/SegmentCreateParameters'; -import SegmentDeleteResponse from './model/SegmentDeleteResponse'; -import SegmentDoneResponse from './model/SegmentDoneResponse'; -import SegmentUpdateParameters from './model/SegmentUpdateParameters'; -import SegmentWithComments from './model/SegmentWithComments'; -import SetDocumentStageRequest from './model/SetDocumentStageRequest'; -import Setting from './model/Setting'; -import SettingUpsertBody from './model/SettingUpsertBody'; -import SettingUpsertResponse from './model/SettingUpsertResponse'; +import SignLiltCreateTermsResponse from './model/SignLiltCreateTermsResponse'; import SourceFile from './model/SourceFile'; -import TaggedSegment from './model/TaggedSegment'; -import TranslateCompletionTypeError from './model/TranslateCompletionTypeError'; -import TranslateRegisterResponse from './model/TranslateRegisterResponse'; +import TermbaseExportResponse from './model/TermbaseExportResponse'; import TranslateSegmentBody from './model/TranslateSegmentBody'; -import TranslateSegmentBody1 from './model/TranslateSegmentBody1'; import Translation from './model/Translation'; import TranslationInfo from './model/TranslationInfo'; import TranslationList from './model/TranslationList'; import TranslationMemoryEntry from './model/TranslationMemoryEntry'; -import WorkflowStage from './model/WorkflowStage'; import WorkflowStageAssignment from './model/WorkflowStageAssignment'; -import WorkflowStageTemplate from './model/WorkflowStageTemplate'; -import WorkflowTask from './model/WorkflowTask'; -import WorkflowTemplate from './model/WorkflowTemplate'; -import CommentsApi from './api/CommentsApi'; -import ConnectorsApi from './api/ConnectorsApi'; -import ConverterConfigApi from './api/ConverterConfigApi'; +import CreateApi from './api/CreateApi'; import DocumentsApi from './api/DocumentsApi'; import FilesApi from './api/FilesApi'; import JobsApi from './api/JobsApi'; import LanguagesApi from './api/LanguagesApi'; -import LexiconApi from './api/LexiconApi'; import MemoriesApi from './api/MemoriesApi'; import ProjectsApi from './api/ProjectsApi'; -import QAApi from './api/QAApi'; -import RootApi from './api/RootApi'; -import SegmentsApi from './api/SegmentsApi'; -import SettingsApi from './api/SettingsApi'; import TranslateApi from './api/TranslateApi'; -import WorkflowsApi from './api/WorkflowsApi'; /** -* The_Lilt_REST_API_enables_programmatic_access_to_the_full_range_of_Lilt_backend_services_including___Training_of_and_translating_with_interactive_adaptive_machine_translation___Large_scale_translation_memory___The_Lexicon__a_large_scale_termbase___Programmatic_control_of_the_Lilt_CAT_environment___Translation_memory_synchronizationRequests_and_responses_are_in_JSON_format__The_REST_API_only_responds_to_HTTPS___SSL_requests__AuthenticationRequests_are_authenticated_via_REST_API_key_which_requires_the_Business_plan_Requests_are_authenticated_using__HTTP_Basic_Auth_https__en_wikipedia_org_wiki_Basic_access_authentication__Add_your_REST_API_key_as_both_the_username_and_password_For_development_you_may_also_pass_the_REST_API_key_via_the_key_query_parameter__This_is_less_secure_than_HTTP_Basic_Auth_and_is_not_recommended_for_production_use__QuotasOur_services_have_a_general_quota_of_4000_requests_per_minute__Should_you_hit_the_maximum_requests_per_minute_you_will_need_to_wait_60_seconds_before_you_can_send_another_request_.
+* Lilt_REST_API_Support_https__lilt_atlassian_net_servicedesk_customer_portals___The_Lilt_REST_API_enables_programmatic_access_to_the_full_range_of_Lilt_backend_services_including___Training_of_and_translating_with_interactive_adaptive_machine_translation___Large_scale_translation_memory___The_Lexicon__a_large_scale_termbase___Programmatic_control_of_the_Lilt_CAT_environment___Translation_memory_synchronizationRequests_and_responses_are_in_JSON_format__The_REST_API_only_responds_to_HTTPS___SSL_requests__The_base_url_for_this_REST_API_is_https__api_lilt_com___AuthenticationRequests_are_authenticated_via_REST_API_key_which_requires_the_Business_plan_Requests_are_authenticated_using__HTTP_Basic_Auth_https__en_wikipedia_org_wiki_Basic_access_authentication__Add_your_REST_API_key_as_both_the_username_and_password_For_development_you_may_also_pass_the_REST_API_key_via_the_key_query_parameter__This_is_less_secure_than_HTTP_Basic_Auth_and_is_not_recommended_for_production_use__QuotasOur_services_have_a_general_quota_of_4000_requests_per_minute__Should_you_hit_the_maximum_requests_per_minute_you_will_need_to_wait_60_seconds_before_you_can_send_another_request_.
* The index module provides access to constructors for all the classes which comprise the public API. *

* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: @@ -166,7 +91,7 @@ import WorkflowsApi from './api/WorkflowsApi'; * *

* @module index -* @version 0.5.0 +* @version 0.6.3 */ export { /** @@ -181,96 +106,6 @@ export { */ AddFileLabelRequest, - /** - * The Annotation model constructor. - * @property {module:model/Annotation} - */ - Annotation, - - /** - * The ApiRoot model constructor. - * @property {module:model/ApiRoot} - */ - ApiRoot, - - /** - * The AssignmentDetails model constructor. - * @property {module:model/AssignmentDetails} - */ - AssignmentDetails, - - /** - * The AssignmentError model constructor. - * @property {module:model/AssignmentError} - */ - AssignmentError, - - /** - * The AutoAssignmentParameters model constructor. - * @property {module:model/AutoAssignmentParameters} - */ - AutoAssignmentParameters, - - /** - * The AutoAssignmentResponse model constructor. - * @property {module:model/AutoAssignmentResponse} - */ - AutoAssignmentResponse, - - /** - * The BadRequest model constructor. - * @property {module:model/BadRequest} - */ - BadRequest, - - /** - * The Comment model constructor. - * @property {module:model/Comment} - */ - Comment, - - /** - * The CommentBody model constructor. - * @property {module:model/CommentBody} - */ - CommentBody, - - /** - * The CommentDeleteResponse model constructor. - * @property {module:model/CommentDeleteResponse} - */ - CommentDeleteResponse, - - /** - * The Connector model constructor. - * @property {module:model/Connector} - */ - Connector, - - /** - * The ConnectorArguments model constructor. - * @property {module:model/ConnectorArguments} - */ - ConnectorArguments, - - /** - * The ConnectorDeleteResponse model constructor. - * @property {module:model/ConnectorDeleteResponse} - */ - ConnectorDeleteResponse, - - /** - * The ConnectorJob model constructor. - * @property {module:model/ConnectorJob} - */ - ConnectorJob, - - /** - * The ConverterConfigUpdateResponse model constructor. - * @property {module:model/ConverterConfigUpdateResponse} - */ - ConverterConfigUpdateResponse, - /** * The CreateConverterConfigParameters model constructor. * @property {module:model/CreateConverterConfigParameters} @@ -278,82 +113,10 @@ export { CreateConverterConfigParameters, /** - * The DocumentAssignmentParameters model constructor. - * @property {module:model/DocumentAssignmentParameters} - */ - DocumentAssignmentParameters, - - /** - * The DocumentAssignmentResponse model constructor. - * @property {module:model/DocumentAssignmentResponse} - */ - DocumentAssignmentResponse, - - /** - * The DocumentComments model constructor. - * @property {module:model/DocumentComments} - */ - DocumentComments, - - /** - * The DocumentDeleteResponse model constructor. - * @property {module:model/DocumentDeleteResponse} - */ - DocumentDeleteResponse, - - /** - * The DocumentDoneUpdateParameters model constructor. - * @property {module:model/DocumentDoneUpdateParameters} - */ - DocumentDoneUpdateParameters, - - /** - * The DocumentDoneUpdateParameters1 model constructor. - * @property {module:model/DocumentDoneUpdateParameters1} - */ - DocumentDoneUpdateParameters1, - - /** - * The DocumentDoneUpdateParameters2 model constructor. - * @property {module:model/DocumentDoneUpdateParameters2} - */ - DocumentDoneUpdateParameters2, - - /** - * The DocumentParameters model constructor. - * @property {module:model/DocumentParameters} + * The DeleteSegmentFromMemoryResponse model constructor. + * @property {module:model/DeleteSegmentFromMemoryResponse} */ - DocumentParameters, - - /** - * The DocumentPretranslateParameters model constructor. - * @property {module:model/DocumentPretranslateParameters} - */ - DocumentPretranslateParameters, - - /** - * The DocumentPretranslateResponse model constructor. - * @property {module:model/DocumentPretranslateResponse} - */ - DocumentPretranslateResponse, - - /** - * The DocumentPretranslating model constructor. - * @property {module:model/DocumentPretranslating} - */ - DocumentPretranslating, - - /** - * The DocumentPretranslatingStatus model constructor. - * @property {module:model/DocumentPretranslatingStatus} - */ - DocumentPretranslatingStatus, - - /** - * The DocumentQuote model constructor. - * @property {module:model/DocumentQuote} - */ - DocumentQuote, + DeleteSegmentFromMemoryResponse, /** * The DocumentWithSegments model constructor. @@ -373,18 +136,6 @@ export { */ DocumentWithoutSegmentsStatus, - /** - * The DocumentWorkflow model constructor. - * @property {module:model/DocumentWorkflow} - */ - DocumentWorkflow, - - /** - * The EditFilterMappingParameters model constructor. - * @property {module:model/EditFilterMappingParameters} - */ - EditFilterMappingParameters, - /** * The Error model constructor. * @property {module:model/Error} @@ -397,6 +148,12 @@ export { */ FileDeleteResponse, + /** + * The InlineResponse200 model constructor. + * @property {module:model/InlineResponse200} + */ + InlineResponse200, + /** * The Job model constructor. * @property {module:model/Job} @@ -452,52 +209,10 @@ export { LanguagesResponse, /** - * The LexiconEntry model constructor. - * @property {module:model/LexiconEntry} - */ - LexiconEntry, - - /** - * The LexiconEntryExamples model constructor. - * @property {module:model/LexiconEntryExamples} - */ - LexiconEntryExamples, - - /** - * The LexiconEntrySourceSpan model constructor. - * @property {module:model/LexiconEntrySourceSpan} - */ - LexiconEntrySourceSpan, - - /** - * The LexiconEntryTargetSpan model constructor. - * @property {module:model/LexiconEntryTargetSpan} - */ - LexiconEntryTargetSpan, - - /** - * The LexiconEntryTranslations model constructor. - * @property {module:model/LexiconEntryTranslations} + * The LiltCreateContent model constructor. + * @property {module:model/LiltCreateContent} */ - LexiconEntryTranslations, - - /** - * The LexiconUpdateParameters model constructor. - * @property {module:model/LexiconUpdateParameters} - */ - LexiconUpdateParameters, - - /** - * The LexiconUpdateResponse model constructor. - * @property {module:model/LexiconUpdateResponse} - */ - LexiconUpdateResponse, - - /** - * The MatchBand model constructor. - * @property {module:model/MatchBand} - */ - MatchBand, + LiltCreateContent, /** * The Memory model constructor. @@ -523,30 +238,12 @@ export { */ MemoryImportResponse, - /** - * The MemoryInsertResponse model constructor. - * @property {module:model/MemoryInsertResponse} - */ - MemoryInsertResponse, - /** * The MemoryUpdateParameters model constructor. * @property {module:model/MemoryUpdateParameters} */ MemoryUpdateParameters, - /** - * The MemoryUpdateResponse model constructor. - * @property {module:model/MemoryUpdateResponse} - */ - MemoryUpdateResponse, - - /** - * The NextWorkflowTask model constructor. - * @property {module:model/NextWorkflowTask} - */ - NextWorkflowTask, - /** * The Project model constructor. * @property {module:model/Project} @@ -565,12 +262,6 @@ export { */ ProjectDeleteResponse, - /** - * The ProjectQuote model constructor. - * @property {module:model/ProjectQuote} - */ - ProjectQuote, - /** * The ProjectStats model constructor. * @property {module:model/ProjectStats} @@ -578,88 +269,10 @@ export { ProjectStats, /** - * The ProjectStatus model constructor. - * @property {module:model/ProjectStatus} - */ - ProjectStatus, - - /** - * The ProjectUpdateResponse model constructor. - * @property {module:model/ProjectUpdateResponse} - */ - ProjectUpdateResponse, - - /** - * The ProjectsToDeliver model constructor. - * @property {module:model/ProjectsToDeliver} - */ - ProjectsToDeliver, - - /** - * The ProjectsToUpdate model constructor. - * @property {module:model/ProjectsToUpdate} - */ - ProjectsToUpdate, - - /** - * The QARuleMatches model constructor. - * @property {module:model/QARuleMatches} - */ - QARuleMatches, - - /** - * The QARuleMatchesContext model constructor. - * @property {module:model/QARuleMatchesContext} - */ - QARuleMatchesContext, - - /** - * The QARuleMatchesCustomRules model constructor. - * @property {module:model/QARuleMatchesCustomRules} - */ - QARuleMatchesCustomRules, - - /** - * The QARuleMatchesMatches model constructor. - * @property {module:model/QARuleMatchesMatches} - */ - QARuleMatchesMatches, - - /** - * The QARuleMatchesReplacements model constructor. - * @property {module:model/QARuleMatchesReplacements} - */ - QARuleMatchesReplacements, - - /** - * The QARuleMatchesRule model constructor. - * @property {module:model/QARuleMatchesRule} - */ - QARuleMatchesRule, - - /** - * The QARuleMatchesRuleCategory model constructor. - * @property {module:model/QARuleMatchesRuleCategory} + * The SDLXLIFFFilter model constructor. + * @property {module:model/SDLXLIFFFilter} */ - QARuleMatchesRuleCategory, - - /** - * The QARuleMatchesRuleUrls model constructor. - * @property {module:model/QARuleMatchesRuleUrls} - */ - QARuleMatchesRuleUrls, - - /** - * The ResourceStatus model constructor. - * @property {module:model/ResourceStatus} - */ - ResourceStatus, - - /** - * The ReviewCompletionTypeError model constructor. - * @property {module:model/ReviewCompletionTypeError} - */ - ReviewCompletionTypeError, + SDLXLIFFFilter, /** * The Segment model constructor. @@ -668,58 +281,10 @@ export { Segment, /** - * The SegmentCreateParameters model constructor. - * @property {module:model/SegmentCreateParameters} - */ - SegmentCreateParameters, - - /** - * The SegmentDeleteResponse model constructor. - * @property {module:model/SegmentDeleteResponse} - */ - SegmentDeleteResponse, - - /** - * The SegmentDoneResponse model constructor. - * @property {module:model/SegmentDoneResponse} - */ - SegmentDoneResponse, - - /** - * The SegmentUpdateParameters model constructor. - * @property {module:model/SegmentUpdateParameters} - */ - SegmentUpdateParameters, - - /** - * The SegmentWithComments model constructor. - * @property {module:model/SegmentWithComments} + * The SignLiltCreateTermsResponse model constructor. + * @property {module:model/SignLiltCreateTermsResponse} */ - SegmentWithComments, - - /** - * The SetDocumentStageRequest model constructor. - * @property {module:model/SetDocumentStageRequest} - */ - SetDocumentStageRequest, - - /** - * The Setting model constructor. - * @property {module:model/Setting} - */ - Setting, - - /** - * The SettingUpsertBody model constructor. - * @property {module:model/SettingUpsertBody} - */ - SettingUpsertBody, - - /** - * The SettingUpsertResponse model constructor. - * @property {module:model/SettingUpsertResponse} - */ - SettingUpsertResponse, + SignLiltCreateTermsResponse, /** * The SourceFile model constructor. @@ -728,22 +293,10 @@ export { SourceFile, /** - * The TaggedSegment model constructor. - * @property {module:model/TaggedSegment} - */ - TaggedSegment, - - /** - * The TranslateCompletionTypeError model constructor. - * @property {module:model/TranslateCompletionTypeError} + * The TermbaseExportResponse model constructor. + * @property {module:model/TermbaseExportResponse} */ - TranslateCompletionTypeError, - - /** - * The TranslateRegisterResponse model constructor. - * @property {module:model/TranslateRegisterResponse} - */ - TranslateRegisterResponse, + TermbaseExportResponse, /** * The TranslateSegmentBody model constructor. @@ -751,12 +304,6 @@ export { */ TranslateSegmentBody, - /** - * The TranslateSegmentBody1 model constructor. - * @property {module:model/TranslateSegmentBody1} - */ - TranslateSegmentBody1, - /** * The Translation model constructor. * @property {module:model/Translation} @@ -781,12 +328,6 @@ export { */ TranslationMemoryEntry, - /** - * The WorkflowStage model constructor. - * @property {module:model/WorkflowStage} - */ - WorkflowStage, - /** * The WorkflowStageAssignment model constructor. * @property {module:model/WorkflowStageAssignment} @@ -794,40 +335,10 @@ export { WorkflowStageAssignment, /** - * The WorkflowStageTemplate model constructor. - * @property {module:model/WorkflowStageTemplate} - */ - WorkflowStageTemplate, - - /** - * The WorkflowTask model constructor. - * @property {module:model/WorkflowTask} - */ - WorkflowTask, - - /** - * The WorkflowTemplate model constructor. - * @property {module:model/WorkflowTemplate} - */ - WorkflowTemplate, - - /** - * The CommentsApi service constructor. - * @property {module:api/CommentsApi} - */ - CommentsApi, - - /** - * The ConnectorsApi service constructor. - * @property {module:api/ConnectorsApi} + * The CreateApi service constructor. + * @property {module:api/CreateApi} */ - ConnectorsApi, - - /** - * The ConverterConfigApi service constructor. - * @property {module:api/ConverterConfigApi} - */ - ConverterConfigApi, + CreateApi, /** * The DocumentsApi service constructor. @@ -853,12 +364,6 @@ export { */ LanguagesApi, - /** - * The LexiconApi service constructor. - * @property {module:api/LexiconApi} - */ - LexiconApi, - /** * The MemoriesApi service constructor. * @property {module:api/MemoriesApi} @@ -871,39 +376,9 @@ export { */ ProjectsApi, - /** - * The QAApi service constructor. - * @property {module:api/QAApi} - */ - QAApi, - - /** - * The RootApi service constructor. - * @property {module:api/RootApi} - */ - RootApi, - - /** - * The SegmentsApi service constructor. - * @property {module:api/SegmentsApi} - */ - SegmentsApi, - - /** - * The SettingsApi service constructor. - * @property {module:api/SettingsApi} - */ - SettingsApi, - /** * The TranslateApi service constructor. * @property {module:api/TranslateApi} */ - TranslateApi, - - /** - * The WorkflowsApi service constructor. - * @property {module:api/WorkflowsApi} - */ - WorkflowsApi + TranslateApi }; diff --git a/src/model/AddFileLabelRequest.js b/src/model/AddFileLabelRequest.js index f356c78..b67ca26 100644 --- a/src/model/AddFileLabelRequest.js +++ b/src/model/AddFileLabelRequest.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The AddFileLabelRequest model module. * @module model/AddFileLabelRequest - * @version 0.5.0 + * @version 0.6.3 */ class AddFileLabelRequest { /** diff --git a/src/model/CreateConverterConfigParameters.js b/src/model/CreateConverterConfigParameters.js index c5f553a..0c9c123 100644 --- a/src/model/CreateConverterConfigParameters.js +++ b/src/model/CreateConverterConfigParameters.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,19 +16,17 @@ import ApiClient from '../ApiClient'; /** * The CreateConverterConfigParameters model module. * @module model/CreateConverterConfigParameters - * @version 0.5.0 + * @version 0.6.3 */ class CreateConverterConfigParameters { /** * Constructs a new CreateConverterConfigParameters. * @alias module:model/CreateConverterConfigParameters - * @param configJson {String} The configuration json blob, string escaped. - * @param configName {String} The user defined name of your configuration. - * @param configDescription {String} A description for the configuration. + * @param signedAgreement {Boolean} Signifies that the Organization has signed the agreement or not. */ - constructor(configJson, configName, configDescription) { + constructor(signedAgreement) { - CreateConverterConfigParameters.initialize(this, configJson, configName, configDescription); + CreateConverterConfigParameters.initialize(this, signedAgreement); } /** @@ -36,10 +34,8 @@ class CreateConverterConfigParameters { * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ - static initialize(obj, configJson, configName, configDescription) { - obj['configJson'] = configJson; - obj['configName'] = configName; - obj['configDescription'] = configDescription; + static initialize(obj, signedAgreement) { + obj['signedAgreement'] = signedAgreement; } /** @@ -53,14 +49,8 @@ class CreateConverterConfigParameters { if (data) { obj = obj || new CreateConverterConfigParameters(); - if (data.hasOwnProperty('configJson')) { - obj['configJson'] = ApiClient.convertToType(data['configJson'], 'String'); - } - if (data.hasOwnProperty('configName')) { - obj['configName'] = ApiClient.convertToType(data['configName'], 'String'); - } - if (data.hasOwnProperty('configDescription')) { - obj['configDescription'] = ApiClient.convertToType(data['configDescription'], 'String'); + if (data.hasOwnProperty('signedAgreement')) { + obj['signedAgreement'] = ApiClient.convertToType(data['signedAgreement'], 'Boolean'); } } return obj; @@ -70,22 +60,10 @@ class CreateConverterConfigParameters { } /** - * The configuration json blob, string escaped. - * @member {String} configJson - */ -CreateConverterConfigParameters.prototype['configJson'] = undefined; - -/** - * The user defined name of your configuration. - * @member {String} configName - */ -CreateConverterConfigParameters.prototype['configName'] = undefined; - -/** - * A description for the configuration. - * @member {String} configDescription + * Signifies that the Organization has signed the agreement or not. + * @member {Boolean} signedAgreement */ -CreateConverterConfigParameters.prototype['configDescription'] = undefined; +CreateConverterConfigParameters.prototype['signedAgreement'] = undefined; diff --git a/src/model/DeleteSegmentFromMemoryResponse.js b/src/model/DeleteSegmentFromMemoryResponse.js new file mode 100644 index 0000000..68bb8d2 --- /dev/null +++ b/src/model/DeleteSegmentFromMemoryResponse.js @@ -0,0 +1,71 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The DeleteSegmentFromMemoryResponse model module. + * @module model/DeleteSegmentFromMemoryResponse + * @version 0.6.3 + */ +class DeleteSegmentFromMemoryResponse { + /** + * Constructs a new DeleteSegmentFromMemoryResponse. + * @alias module:model/DeleteSegmentFromMemoryResponse + */ + constructor() { + + DeleteSegmentFromMemoryResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a DeleteSegmentFromMemoryResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/DeleteSegmentFromMemoryResponse} obj Optional instance to populate. + * @return {module:model/DeleteSegmentFromMemoryResponse} The populated DeleteSegmentFromMemoryResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new DeleteSegmentFromMemoryResponse(); + + if (data.hasOwnProperty('success')) { + obj['success'] = ApiClient.convertToType(data['success'], 'Boolean'); + } + } + return obj; + } + + +} + +/** + * @member {Boolean} success + */ +DeleteSegmentFromMemoryResponse.prototype['success'] = undefined; + + + + + + +export default DeleteSegmentFromMemoryResponse; + diff --git a/src/model/DocumentWithSegments.js b/src/model/DocumentWithSegments.js index 5b93351..3d5fc66 100644 --- a/src/model/DocumentWithSegments.js +++ b/src/model/DocumentWithSegments.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,7 +18,7 @@ import Segment from './Segment'; /** * The DocumentWithSegments model module. * @module model/DocumentWithSegments - * @version 0.5.0 + * @version 0.6.3 */ class DocumentWithSegments { /** @@ -101,6 +101,9 @@ class DocumentWithSegments { if (data.hasOwnProperty('updated_at')) { obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'Number'); } + if (data.hasOwnProperty('is_review_complete')) { + obj['is_review_complete'] = ApiClient.convertToType(data['is_review_complete'], 'Boolean'); + } if (data.hasOwnProperty('segments')) { obj['segments'] = ApiClient.convertToType(data['segments'], [Segment]); } @@ -212,6 +215,12 @@ DocumentWithSegments.prototype['created_at'] = undefined; */ DocumentWithSegments.prototype['updated_at'] = undefined; +/** + * Document review status. + * @member {Boolean} is_review_complete + */ +DocumentWithSegments.prototype['is_review_complete'] = undefined; + /** * A list of Segments. * @member {Array.} segments diff --git a/src/model/DocumentWithoutSegments.js b/src/model/DocumentWithoutSegments.js index fbfed64..f9de196 100644 --- a/src/model/DocumentWithoutSegments.js +++ b/src/model/DocumentWithoutSegments.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,7 +17,7 @@ import DocumentWithoutSegmentsStatus from './DocumentWithoutSegmentsStatus'; /** * The DocumentWithoutSegments model module. * @module model/DocumentWithoutSegments - * @version 0.5.0 + * @version 0.6.3 */ class DocumentWithoutSegments { /** @@ -94,12 +94,18 @@ class DocumentWithoutSegments { if (data.hasOwnProperty('reviewer_email')) { obj['reviewer_email'] = ApiClient.convertToType(data['reviewer_email'], 'String'); } + if (data.hasOwnProperty('customer_reviewer_email')) { + obj['customer_reviewer_email'] = ApiClient.convertToType(data['customer_reviewer_email'], 'String'); + } if (data.hasOwnProperty('created_at')) { obj['created_at'] = ApiClient.convertToType(data['created_at'], 'Number'); } if (data.hasOwnProperty('updated_at')) { obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'Number'); } + if (data.hasOwnProperty('is_review_complete')) { + obj['is_review_complete'] = ApiClient.convertToType(data['is_review_complete'], 'Boolean'); + } } return obj; } @@ -196,6 +202,12 @@ DocumentWithoutSegments.prototype['translator_email'] = undefined; */ DocumentWithoutSegments.prototype['reviewer_email'] = undefined; +/** + * The email of the assigned customer reviewer. Only present if the project was request by id. + * @member {String} customer_reviewer_email + */ +DocumentWithoutSegments.prototype['customer_reviewer_email'] = undefined; + /** * Time at which the object was created. Measured in seconds since the Unix epoch. * @member {Number} created_at @@ -208,6 +220,12 @@ DocumentWithoutSegments.prototype['created_at'] = undefined; */ DocumentWithoutSegments.prototype['updated_at'] = undefined; +/** + * Document review status. + * @member {Boolean} is_review_complete + */ +DocumentWithoutSegments.prototype['is_review_complete'] = undefined; + diff --git a/src/model/DocumentWithoutSegmentsStatus.js b/src/model/DocumentWithoutSegmentsStatus.js index 2542ef6..75a6edc 100644 --- a/src/model/DocumentWithoutSegmentsStatus.js +++ b/src/model/DocumentWithoutSegmentsStatus.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The DocumentWithoutSegmentsStatus model module. * @module model/DocumentWithoutSegmentsStatus - * @version 0.5.0 + * @version 0.6.3 */ class DocumentWithoutSegmentsStatus { /** @@ -59,7 +59,6 @@ class DocumentWithoutSegmentsStatus { } /** - * * @member {module:model/DocumentWithoutSegmentsStatus.PretranslationEnum} pretranslation */ DocumentWithoutSegmentsStatus.prototype['pretranslation'] = undefined; diff --git a/src/model/Error.js b/src/model/Error.js index 90fff94..924e564 100644 --- a/src/model/Error.js +++ b/src/model/Error.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Error model module. * @module model/Error - * @version 0.5.0 + * @version 0.6.3 */ class Error { /** diff --git a/src/model/FileDeleteResponse.js b/src/model/FileDeleteResponse.js index 507f15c..e038891 100644 --- a/src/model/FileDeleteResponse.js +++ b/src/model/FileDeleteResponse.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The FileDeleteResponse model module. * @module model/FileDeleteResponse - * @version 0.5.0 + * @version 0.6.3 */ class FileDeleteResponse { /** diff --git a/src/model/InlineResponse200.js b/src/model/InlineResponse200.js index f574294..2bbfdf9 100644 --- a/src/model/InlineResponse200.js +++ b/src/model/InlineResponse200.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The InlineResponse200 model module. * @module model/InlineResponse200 - * @version v2.0 + * @version 0.6.3 */ class InlineResponse200 { /** @@ -47,14 +47,8 @@ class InlineResponse200 { if (data) { obj = obj || new InlineResponse200(); - if (data.hasOwnProperty('File')) { - obj['File'] = File.constructFromObject(data['File']); - } - if (data.hasOwnProperty('detected_lang')) { - obj['detected_lang'] = ApiClient.convertToType(data['detected_lang'], 'String'); - } - if (data.hasOwnProperty('detected_lang_confidence')) { - obj['detected_lang_confidence'] = ApiClient.convertToType(data['detected_lang_confidence'], 'Number'); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); } } return obj; @@ -64,21 +58,10 @@ class InlineResponse200 { } /** - * @member {File} File - */ -InlineResponse200.prototype['File'] = undefined; - -/** - * Language associated with the file. - * @member {String} detected_lang - */ -InlineResponse200.prototype['detected_lang'] = undefined; - -/** - * Confidence score for the language associated with the file. - * @member {Number} detected_lang_confidence + * The ID of the deleted Lilt Create content. + * @member {Number} id */ -InlineResponse200.prototype['detected_lang_confidence'] = undefined; +InlineResponse200.prototype['id'] = undefined; diff --git a/src/model/Job.js b/src/model/Job.js index 39efce4..d05b69c 100644 --- a/src/model/Job.js +++ b/src/model/Job.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,7 +17,7 @@ import JobStats from './JobStats'; /** * The Job model module. * @module model/Job - * @version 0.5.0 + * @version 0.6.3 */ class Job { /** diff --git a/src/model/JobCreateParameters.js b/src/model/JobCreateParameters.js index 7a98a5e..7a927fa 100644 --- a/src/model/JobCreateParameters.js +++ b/src/model/JobCreateParameters.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,7 +17,7 @@ import LanguagePair from './LanguagePair'; /** * The JobCreateParameters model module. * @module model/JobCreateParameters - * @version 0.5.0 + * @version 0.6.3 */ class JobCreateParameters { /** @@ -26,10 +26,12 @@ class JobCreateParameters { * @param name {String} A name for the Job. * @param languagePairs {Array.} Language pairs is a set of one or more pairs that includes source language, source locale(optional), target language, target locale(optional), and memoryId. * @param fileIds {Array.} A list of file ids to upload to job creation. + * @param srcLang {String} 2-letter ISO source language code + * @param srcLocale {String} 2-letter source language code */ - constructor(name, languagePairs, fileIds) { + constructor(name, languagePairs, fileIds, srcLang, srcLocale) { - JobCreateParameters.initialize(this, name, languagePairs, fileIds); + JobCreateParameters.initialize(this, name, languagePairs, fileIds, srcLang, srcLocale); } /** @@ -37,10 +39,12 @@ class JobCreateParameters { * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ - static initialize(obj, name, languagePairs, fileIds) { + static initialize(obj, name, languagePairs, fileIds, srcLang, srcLocale) { obj['name'] = name; obj['languagePairs'] = languagePairs; obj['fileIds'] = fileIds; + obj['srcLang'] = srcLang; + obj['srcLocale'] = srcLocale; } /** @@ -66,12 +70,21 @@ class JobCreateParameters { if (data.hasOwnProperty('due')) { obj['due'] = ApiClient.convertToType(data['due'], 'String'); } + if (data.hasOwnProperty('srcLang')) { + obj['srcLang'] = ApiClient.convertToType(data['srcLang'], 'String'); + } + if (data.hasOwnProperty('srcLocale')) { + obj['srcLocale'] = ApiClient.convertToType(data['srcLocale'], 'String'); + } if (data.hasOwnProperty('isPlural')) { obj['isPlural'] = ApiClient.convertToType(data['isPlural'], 'Boolean'); } if (data.hasOwnProperty('workflowTemplateId')) { obj['workflowTemplateId'] = ApiClient.convertToType(data['workflowTemplateId'], 'Number'); } + if (data.hasOwnProperty('workflowTemplateName')) { + obj['workflowTemplateName'] = ApiClient.convertToType(data['workflowTemplateName'], 'Number'); + } } return obj; } @@ -103,6 +116,18 @@ JobCreateParameters.prototype['fileIds'] = undefined; */ JobCreateParameters.prototype['due'] = undefined; +/** + * 2-letter ISO source language code + * @member {String} srcLang + */ +JobCreateParameters.prototype['srcLang'] = undefined; + +/** + * 2-letter source language code + * @member {String} srcLocale + */ +JobCreateParameters.prototype['srcLocale'] = undefined; + /** * A boolean value representing if the files have plurals. * @member {Boolean} isPlural @@ -115,6 +140,12 @@ JobCreateParameters.prototype['isPlural'] = undefined; */ JobCreateParameters.prototype['workflowTemplateId'] = undefined; +/** + * Name of the workflow template to be used, must be passed with teamId or look up will fail. If workflowTemplateId is passed it supercedes any other look up. + * @member {Number} workflowTemplateName + */ +JobCreateParameters.prototype['workflowTemplateName'] = undefined; + diff --git a/src/model/JobDeleteResponse.js b/src/model/JobDeleteResponse.js index a8af367..038b61b 100644 --- a/src/model/JobDeleteResponse.js +++ b/src/model/JobDeleteResponse.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The JobDeleteResponse model module. * @module model/JobDeleteResponse - * @version 0.5.0 + * @version 0.6.3 */ class JobDeleteResponse { /** diff --git a/src/model/JobLeverageStats.js b/src/model/JobLeverageStats.js index 5d828a6..71e8cc1 100644 --- a/src/model/JobLeverageStats.js +++ b/src/model/JobLeverageStats.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,7 +17,7 @@ import ProjectStats from './ProjectStats'; /** * The JobLeverageStats model module. * @module model/JobLeverageStats - * @version 0.5.0 + * @version 0.6.3 */ class JobLeverageStats { /** diff --git a/src/model/JobProject.js b/src/model/JobProject.js index b5dd79e..566ebd8 100644 --- a/src/model/JobProject.js +++ b/src/model/JobProject.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The JobProject model module. * @module model/JobProject - * @version 0.5.0 + * @version 0.6.3 */ class JobProject { /** diff --git a/src/model/JobStats.js b/src/model/JobStats.js index 3d84844..dd02428 100644 --- a/src/model/JobStats.js +++ b/src/model/JobStats.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,7 +17,7 @@ import JobProject from './JobProject'; /** * The JobStats model module. * @module model/JobStats - * @version 0.5.0 + * @version 0.6.3 */ class JobStats { /** diff --git a/src/model/JobUpdateParameters.js b/src/model/JobUpdateParameters.js index 167e78d..b2ae29d 100644 --- a/src/model/JobUpdateParameters.js +++ b/src/model/JobUpdateParameters.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The JobUpdateParameters model module. * @module model/JobUpdateParameters - * @version 0.5.0 + * @version 0.6.3 */ class JobUpdateParameters { /** @@ -53,6 +53,12 @@ class JobUpdateParameters { if (data.hasOwnProperty('dueDate')) { obj['dueDate'] = ApiClient.convertToType(data['dueDate'], 'Number'); } + if (data.hasOwnProperty('isProcessing')) { + obj['isProcessing'] = ApiClient.convertToType(data['isProcessing'], 'String'); + } + if (data.hasOwnProperty('processingErrorMsg')) { + obj['processingErrorMsg'] = ApiClient.convertToType(data['processingErrorMsg'], 'String'); + } } return obj; } @@ -72,10 +78,49 @@ JobUpdateParameters.prototype['name'] = undefined; */ JobUpdateParameters.prototype['dueDate'] = undefined; +/** + * The processing status of the job. Provide one of the following integers to indicate the status. Ok = 0 Started = 1 ExportError = -2 + * @member {module:model/JobUpdateParameters.IsProcessingEnum} isProcessing + */ +JobUpdateParameters.prototype['isProcessing'] = undefined; +/** + * The processing error message. + * @member {String} processingErrorMsg + */ +JobUpdateParameters.prototype['processingErrorMsg'] = undefined; + +/** + * Allowed values for the isProcessing property. + * @enum {String} + * @readonly + */ +JobUpdateParameters['IsProcessingEnum'] = { + + /** + * value: "0" + * @const + */ + "0": "0", + + /** + * value: "1" + * @const + */ + "1": "1", + + /** + * value: "-2" + * @const + */ + "-2": "-2" +}; + + + export default JobUpdateParameters; diff --git a/src/model/LanguagePair.js b/src/model/LanguagePair.js index c1042ac..ed6c0c1 100644 --- a/src/model/LanguagePair.js +++ b/src/model/LanguagePair.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,7 +17,7 @@ import WorkflowStageAssignment from './WorkflowStageAssignment'; /** * The LanguagePair model module. * @module model/LanguagePair - * @version 0.5.0 + * @version 0.6.3 */ class LanguagePair { /** @@ -71,6 +71,9 @@ class LanguagePair { if (data.hasOwnProperty('memoryId')) { obj['memoryId'] = ApiClient.convertToType(data['memoryId'], 'Number'); } + if (data.hasOwnProperty('externalModelId')) { + obj['externalModelId'] = ApiClient.convertToType(data['externalModelId'], 'Number'); + } if (data.hasOwnProperty('pretranslate')) { obj['pretranslate'] = ApiClient.convertToType(data['pretranslate'], 'Boolean'); } @@ -89,6 +92,9 @@ class LanguagePair { if (data.hasOwnProperty('workflowTemplateId')) { obj['workflowTemplateId'] = ApiClient.convertToType(data['workflowTemplateId'], 'Number'); } + if (data.hasOwnProperty('workflowTemplateName')) { + obj['workflowTemplateName'] = ApiClient.convertToType(data['workflowTemplateName'], 'Number'); + } if (data.hasOwnProperty('workflowStageAssignments')) { obj['workflowStageAssignments'] = ApiClient.convertToType(data['workflowStageAssignments'], [WorkflowStageAssignment]); } @@ -135,6 +141,12 @@ LanguagePair.prototype['dueDate'] = undefined; */ LanguagePair.prototype['memoryId'] = undefined; +/** + * A unique identifier for working with a third party model in the Lilt Platform + * @member {Number} externalModelId + */ +LanguagePair.prototype['externalModelId'] = undefined; + /** * Attribute translation authorship of exact matches to the creator of the document being pretranslated. * @member {Boolean} pretranslate @@ -171,6 +183,12 @@ LanguagePair.prototype['configId'] = undefined; */ LanguagePair.prototype['workflowTemplateId'] = undefined; +/** + * Workflow Template Name, when passed with TeamId it allows for an on the fly look up of the correct WorkflowTemplate to use. If workflowTemplateId is passed the workflowTemplateId supercedes other lookups. + * @member {Number} workflowTemplateName + */ +LanguagePair.prototype['workflowTemplateName'] = undefined; + /** * @member {Array.} workflowStageAssignments */ diff --git a/src/model/LanguagesResponse.js b/src/model/LanguagesResponse.js index 56c055d..3448776 100644 --- a/src/model/LanguagesResponse.js +++ b/src/model/LanguagesResponse.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The LanguagesResponse model module. * @module model/LanguagesResponse - * @version 0.5.0 + * @version 0.6.3 */ class LanguagesResponse { /** diff --git a/src/model/LiltCreateContent.js b/src/model/LiltCreateContent.js new file mode 100644 index 0000000..7e9b6c7 --- /dev/null +++ b/src/model/LiltCreateContent.js @@ -0,0 +1,118 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The LiltCreateContent model module. + * @module model/LiltCreateContent + * @version 0.6.3 + */ +class LiltCreateContent { + /** + * Constructs a new LiltCreateContent. + * Content Parameters for LiltCreate. + * @alias module:model/LiltCreateContent + */ + constructor() { + + LiltCreateContent.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a LiltCreateContent from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/LiltCreateContent} obj Optional instance to populate. + * @return {module:model/LiltCreateContent} The populated LiltCreateContent instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new LiltCreateContent(); + + if (data.hasOwnProperty('tone')) { + obj['tone'] = ApiClient.convertToType(data['tone'], 'String'); + } + if (data.hasOwnProperty('terms')) { + obj['terms'] = ApiClient.convertToType(data['terms'], 'String'); + } + if (data.hasOwnProperty('summary')) { + obj['summary'] = ApiClient.convertToType(data['summary'], 'String'); + } + if (data.hasOwnProperty('language')) { + obj['language'] = ApiClient.convertToType(data['language'], 'String'); + } + if (data.hasOwnProperty('memoryId')) { + obj['memoryId'] = ApiClient.convertToType(data['memoryId'], 'String'); + } + if (data.hasOwnProperty('sections')) { + obj['sections'] = ApiClient.convertToType(data['sections'], ['String']); + } + } + return obj; + } + + +} + +/** + * The tone of the content. + * @member {String} tone + */ +LiltCreateContent.prototype['tone'] = undefined; + +/** + * The terms of the content. + * @member {String} terms + */ +LiltCreateContent.prototype['terms'] = undefined; + +/** + * The summary of the content. + * @member {String} summary + */ +LiltCreateContent.prototype['summary'] = undefined; + +/** + * The language of the content. + * @member {String} language + */ +LiltCreateContent.prototype['language'] = undefined; + +/** + * The memory ID of the content. + * @member {String} memoryId + */ +LiltCreateContent.prototype['memoryId'] = undefined; + +/** + * The sections of the content. + * @member {Array.} sections + */ +LiltCreateContent.prototype['sections'] = undefined; + + + + + + +export default LiltCreateContent; + diff --git a/src/model/Memory.js b/src/model/Memory.js index fa9e5ed..47b99f7 100644 --- a/src/model/Memory.js +++ b/src/model/Memory.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Memory model module. * @module model/Memory - * @version 0.5.0 + * @version 0.6.3 */ class Memory { /** @@ -66,6 +66,9 @@ class Memory { if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } + if (data.hasOwnProperty('is_processing')) { + obj['is_processing'] = ApiClient.convertToType(data['is_processing'], 'Boolean'); + } if (data.hasOwnProperty('version')) { obj['version'] = ApiClient.convertToType(data['version'], 'Number'); } @@ -75,9 +78,6 @@ class Memory { if (data.hasOwnProperty('updated_at')) { obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'Number'); } - if (data.hasOwnProperty('num_segments')) { - obj['num_segments'] = ApiClient.convertToType(data['num_segments'], 'Number'); - } if (data.hasOwnProperty('resources')) { obj['resources'] = ApiClient.convertToType(data['resources'], ['String']); } @@ -124,6 +124,12 @@ Memory.prototype['trglocale'] = undefined; */ Memory.prototype['name'] = undefined; +/** + * Indicates the memory is being processed. + * @member {Boolean} is_processing + */ +Memory.prototype['is_processing'] = undefined; + /** * The current version of the Memory, which is the number of updates since the memory was created. * @member {Number} version @@ -142,12 +148,6 @@ Memory.prototype['created_at'] = undefined; */ Memory.prototype['updated_at'] = undefined; -/** - * The number of confirmed Segments incorporated into this Memory. - * @member {Number} num_segments - */ -Memory.prototype['num_segments'] = undefined; - /** * The resource files (translation memories and termbases) associated with this Memory. * @member {Array.} resources diff --git a/src/model/MemoryCreateParameters.js b/src/model/MemoryCreateParameters.js index 1c77b55..a868a02 100644 --- a/src/model/MemoryCreateParameters.js +++ b/src/model/MemoryCreateParameters.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The MemoryCreateParameters model module. * @module model/MemoryCreateParameters - * @version 0.5.0 + * @version 0.6.3 */ class MemoryCreateParameters { /** diff --git a/src/model/MemoryDeleteResponse.js b/src/model/MemoryDeleteResponse.js index e562be3..8a6dbed 100644 --- a/src/model/MemoryDeleteResponse.js +++ b/src/model/MemoryDeleteResponse.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The MemoryDeleteResponse model module. * @module model/MemoryDeleteResponse - * @version 0.5.0 + * @version 0.6.3 */ class MemoryDeleteResponse { /** diff --git a/src/model/MemoryImportResponse.js b/src/model/MemoryImportResponse.js index a446b5b..2a5544b 100644 --- a/src/model/MemoryImportResponse.js +++ b/src/model/MemoryImportResponse.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The MemoryImportResponse model module. * @module model/MemoryImportResponse - * @version 0.5.0 + * @version 0.6.3 */ class MemoryImportResponse { /** diff --git a/src/model/MemoryUpdateParameters.js b/src/model/MemoryUpdateParameters.js index 58f737a..12ff0bd 100644 --- a/src/model/MemoryUpdateParameters.js +++ b/src/model/MemoryUpdateParameters.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The MemoryUpdateParameters model module. * @module model/MemoryUpdateParameters - * @version 0.5.0 + * @version 0.6.3 */ class MemoryUpdateParameters { /** diff --git a/src/model/Project.js b/src/model/Project.js index a3762e0..8b6e493 100644 --- a/src/model/Project.js +++ b/src/model/Project.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,7 +17,7 @@ import DocumentWithoutSegments from './DocumentWithoutSegments'; /** * The Project model module. * @module model/Project - * @version 0.5.0 + * @version 0.6.3 */ class Project { /** diff --git a/src/model/ProjectCreateParameters.js b/src/model/ProjectCreateParameters.js index 5729209..255d415 100644 --- a/src/model/ProjectCreateParameters.js +++ b/src/model/ProjectCreateParameters.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ProjectCreateParameters model module. * @module model/ProjectCreateParameters - * @version 0.5.0 + * @version 0.6.3 */ class ProjectCreateParameters { /** diff --git a/src/model/ProjectDeleteResponse.js b/src/model/ProjectDeleteResponse.js index caab369..6ea5080 100644 --- a/src/model/ProjectDeleteResponse.js +++ b/src/model/ProjectDeleteResponse.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ProjectDeleteResponse model module. * @module model/ProjectDeleteResponse - * @version 0.5.0 + * @version 0.6.3 */ class ProjectDeleteResponse { /** diff --git a/src/model/ProjectStats.js b/src/model/ProjectStats.js index 728fb19..0d15e47 100644 --- a/src/model/ProjectStats.js +++ b/src/model/ProjectStats.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ProjectStats model module. * @module model/ProjectStats - * @version 0.5.0 + * @version 0.6.3 */ class ProjectStats { /** diff --git a/src/model/SDLXLIFFFilter.js b/src/model/SDLXLIFFFilter.js new file mode 100644 index 0000000..106676b --- /dev/null +++ b/src/model/SDLXLIFFFilter.js @@ -0,0 +1,131 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The SDLXLIFFFilter model module. + * @module model/SDLXLIFFFilter + * @version 0.6.3 + */ +class SDLXLIFFFilter { + /** + * Constructs a new SDLXLIFFFilter. + * @alias module:model/SDLXLIFFFilter + * @param confName {module:model/SDLXLIFFFilter.ConfNameEnum} the current state of the SDLXLIFF Trans Unit. + */ + constructor(confName) { + + SDLXLIFFFilter.initialize(this, confName); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, confName) { + obj['confName'] = confName; + } + + /** + * Constructs a SDLXLIFFFilter from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/SDLXLIFFFilter} obj Optional instance to populate. + * @return {module:model/SDLXLIFFFilter} The populated SDLXLIFFFilter instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new SDLXLIFFFilter(); + + if (data.hasOwnProperty('confName')) { + obj['confName'] = ApiClient.convertToType(data['confName'], 'String'); + } + if (data.hasOwnProperty('allowablePercentage')) { + obj['allowablePercentage'] = ApiClient.convertToType(data['allowablePercentage'], 'Number'); + } + if (data.hasOwnProperty('allowUnlockedSegments')) { + obj['allowUnlockedSegments'] = ApiClient.convertToType(data['allowUnlockedSegments'], 'Boolean'); + } + } + return obj; + } + + +} + +/** + * the current state of the SDLXLIFF Trans Unit. + * @member {module:model/SDLXLIFFFilter.ConfNameEnum} confName + */ +SDLXLIFFFilter.prototype['confName'] = undefined; + +/** + * This represents for the current conf_name what percentage the filter applies to. If you pass -1 it will take any value for this field and won't ignore blank values. If you pass 50, Lilt will only import Segments that have a 50 percent match or better. + * @member {Number} allowablePercentage + */ +SDLXLIFFFilter.prototype['allowablePercentage'] = undefined; + +/** + * Boolean that tells Lilt whether we should allow unlocked Segments for this conf_name. + * @member {Boolean} allowUnlockedSegments + */ +SDLXLIFFFilter.prototype['allowUnlockedSegments'] = undefined; + + + + + +/** + * Allowed values for the confName property. + * @enum {String} + * @readonly + */ +SDLXLIFFFilter['ConfNameEnum'] = { + + /** + * value: "Translated" + * @const + */ + "Translated": "Translated", + + /** + * value: "Draft" + * @const + */ + "Draft": "Draft", + + /** + * value: "ApprovedTranslation" + * @const + */ + "ApprovedTranslation": "ApprovedTranslation", + + /** + * value: "Locked" + * @const + */ + "Locked": "Locked", + + /** + * value: "SignedOff" + * @const + */ + "SignedOff": "SignedOff" +}; + + + +export default SDLXLIFFFilter; + diff --git a/src/model/Segment.js b/src/model/Segment.js index 7f67226..aee1e96 100644 --- a/src/model/Segment.js +++ b/src/model/Segment.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Segment model module. * @module model/Segment - * @version 0.5.0 + * @version 0.6.3 */ class Segment { /** diff --git a/src/model/SignLiltCreateTermsResponse.js b/src/model/SignLiltCreateTermsResponse.js new file mode 100644 index 0000000..69129d7 --- /dev/null +++ b/src/model/SignLiltCreateTermsResponse.js @@ -0,0 +1,72 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The SignLiltCreateTermsResponse model module. + * @module model/SignLiltCreateTermsResponse + * @version 0.6.3 + */ +class SignLiltCreateTermsResponse { + /** + * Constructs a new SignLiltCreateTermsResponse. + * @alias module:model/SignLiltCreateTermsResponse + */ + constructor() { + + SignLiltCreateTermsResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a SignLiltCreateTermsResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/SignLiltCreateTermsResponse} obj Optional instance to populate. + * @return {module:model/SignLiltCreateTermsResponse} The populated SignLiltCreateTermsResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new SignLiltCreateTermsResponse(); + + if (data.hasOwnProperty('signedAgreement')) { + obj['signedAgreement'] = ApiClient.convertToType(data['signedAgreement'], 'Boolean'); + } + } + return obj; + } + + +} + +/** + * Whether or not the agreement has been signed. + * @member {Boolean} signedAgreement + */ +SignLiltCreateTermsResponse.prototype['signedAgreement'] = undefined; + + + + + + +export default SignLiltCreateTermsResponse; + diff --git a/src/model/SourceFile.js b/src/model/SourceFile.js index c10d192..b92075c 100644 --- a/src/model/SourceFile.js +++ b/src/model/SourceFile.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The SourceFile model module. * @module model/SourceFile - * @version 0.5.0 + * @version 0.6.3 */ class SourceFile { /** diff --git a/src/model/TermbaseExportResponse.js b/src/model/TermbaseExportResponse.js new file mode 100644 index 0000000..2c4bb7b --- /dev/null +++ b/src/model/TermbaseExportResponse.js @@ -0,0 +1,81 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The TermbaseExportResponse model module. + * @module model/TermbaseExportResponse + * @version 0.6.3 + */ +class TermbaseExportResponse { + /** + * Constructs a new TermbaseExportResponse. + * @alias module:model/TermbaseExportResponse + */ + constructor() { + + TermbaseExportResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a TermbaseExportResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/TermbaseExportResponse} obj Optional instance to populate. + * @return {module:model/TermbaseExportResponse} The populated TermbaseExportResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new TermbaseExportResponse(); + + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); + } + if (data.hasOwnProperty('is_processing')) { + obj['is_processing'] = ApiClient.convertToType(data['is_processing'], 'Number'); + } + } + return obj; + } + + +} + +/** + * A unique Memory identifier. + * @member {Number} id + */ +TermbaseExportResponse.prototype['id'] = undefined; + +/** + * The current state of the import. + * @member {Number} is_processing + */ +TermbaseExportResponse.prototype['is_processing'] = undefined; + + + + + + +export default TermbaseExportResponse; + diff --git a/src/model/TranslateSegmentBody.js b/src/model/TranslateSegmentBody.js index 37fbd43..f238b7f 100644 --- a/src/model/TranslateSegmentBody.js +++ b/src/model/TranslateSegmentBody.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,16 +16,17 @@ import ApiClient from '../ApiClient'; /** * The TranslateSegmentBody model module. * @module model/TranslateSegmentBody - * @version 0.5.0 + * @version 0.6.3 */ class TranslateSegmentBody { /** * Constructs a new TranslateSegmentBody. * @alias module:model/TranslateSegmentBody + * @param memoryId {Number} A unique Memory identifier. */ - constructor() { + constructor(memoryId) { - TranslateSegmentBody.initialize(this); + TranslateSegmentBody.initialize(this, memoryId); } /** @@ -33,7 +34,8 @@ class TranslateSegmentBody { * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). * Only for internal use. */ - static initialize(obj) { + static initialize(obj, memoryId) { + obj['memory_id'] = memoryId; } /** @@ -50,6 +52,30 @@ class TranslateSegmentBody { if (data.hasOwnProperty('source')) { obj['source'] = ApiClient.convertToType(data['source'], 'String'); } + if (data.hasOwnProperty('memory_id')) { + obj['memory_id'] = ApiClient.convertToType(data['memory_id'], 'Number'); + } + if (data.hasOwnProperty('source_hash')) { + obj['source_hash'] = ApiClient.convertToType(data['source_hash'], 'Number'); + } + if (data.hasOwnProperty('n')) { + obj['n'] = ApiClient.convertToType(data['n'], 'Number'); + } + if (data.hasOwnProperty('prefix')) { + obj['prefix'] = ApiClient.convertToType(data['prefix'], 'String'); + } + if (data.hasOwnProperty('rich')) { + obj['rich'] = ApiClient.convertToType(data['rich'], 'Boolean'); + } + if (data.hasOwnProperty('tm_matches')) { + obj['tm_matches'] = ApiClient.convertToType(data['tm_matches'], 'Boolean'); + } + if (data.hasOwnProperty('project_tags')) { + obj['project_tags'] = ApiClient.convertToType(data['project_tags'], 'Boolean'); + } + if (data.hasOwnProperty('containsICUData')) { + obj['containsICUData'] = ApiClient.convertToType(data['containsICUData'], 'Boolean'); + } } return obj; } @@ -63,6 +89,58 @@ class TranslateSegmentBody { */ TranslateSegmentBody.prototype['source'] = undefined; +/** + * A unique Memory identifier. + * @member {Number} memory_id + */ +TranslateSegmentBody.prototype['memory_id'] = undefined; + +/** + * A source hash code. + * @member {Number} source_hash + */ +TranslateSegmentBody.prototype['source_hash'] = undefined; + +/** + * Return top n translations (deprecated). + * @member {Number} n + */ +TranslateSegmentBody.prototype['n'] = undefined; + +/** + * A target prefix + * @member {String} prefix + */ +TranslateSegmentBody.prototype['prefix'] = undefined; + +/** + * Returns rich translation information (e.g., with word alignments). + * @member {Boolean} rich + * @default false + */ +TranslateSegmentBody.prototype['rich'] = false; + +/** + * Include translation memory fuzzy matches. + * @member {Boolean} tm_matches + * @default true + */ +TranslateSegmentBody.prototype['tm_matches'] = true; + +/** + * Project tags. Projects tags in source to target if set to true. + * @member {Boolean} project_tags + * @default false + */ +TranslateSegmentBody.prototype['project_tags'] = false; + +/** + * Contains ICU data. If true then tags in the source following the ICU standard will be parsed and retained. + * @member {Boolean} containsICUData + * @default false + */ +TranslateSegmentBody.prototype['containsICUData'] = false; + diff --git a/src/model/Translation.js b/src/model/Translation.js index 8ff80a9..9a47671 100644 --- a/src/model/Translation.js +++ b/src/model/Translation.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Translation model module. * @module model/Translation - * @version 0.5.0 + * @version 0.6.3 */ class Translation { /** diff --git a/src/model/TranslationInfo.js b/src/model/TranslationInfo.js index db6ae4f..79798c7 100644 --- a/src/model/TranslationInfo.js +++ b/src/model/TranslationInfo.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The TranslationInfo model module. * @module model/TranslationInfo - * @version 0.5.0 + * @version 0.6.3 */ class TranslationInfo { /** diff --git a/src/model/TranslationList.js b/src/model/TranslationList.js index 0a17491..0199b56 100644 --- a/src/model/TranslationList.js +++ b/src/model/TranslationList.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,7 +17,7 @@ import Translation from './Translation'; /** * The TranslationList model module. * @module model/TranslationList - * @version 0.5.0 + * @version 0.6.3 */ class TranslationList { /** diff --git a/src/model/TranslationMemoryEntry.js b/src/model/TranslationMemoryEntry.js index d23070e..9d134cf 100644 --- a/src/model/TranslationMemoryEntry.js +++ b/src/model/TranslationMemoryEntry.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The TranslationMemoryEntry model module. * @module model/TranslationMemoryEntry - * @version 0.5.0 + * @version 0.6.3 */ class TranslationMemoryEntry { /** diff --git a/src/model/WorkflowStageAssignment.js b/src/model/WorkflowStageAssignment.js index 0c0f09a..da7610e 100644 --- a/src/model/WorkflowStageAssignment.js +++ b/src/model/WorkflowStageAssignment.js @@ -1,9 +1,9 @@ /** * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 - * Contact: support@lilt.com + * The version of the OpenAPI document: v3.0 + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The WorkflowStageAssignment model module. * @module model/WorkflowStageAssignment - * @version 0.5.0 + * @version 0.6.3 */ class WorkflowStageAssignment { /** diff --git a/test/api/CreateApi.spec.js b/test/api/CreateApi.spec.js new file mode 100644 index 0000000..b244b3d --- /dev/null +++ b/test/api/CreateApi.spec.js @@ -0,0 +1,143 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.LiltNode); + } +}(this, function(expect, LiltNode) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new LiltNode.CreateApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('CreateApi', function() { + describe('deleteLiltCreateContent', function() { + it('should call deleteLiltCreateContent successfully', function(done) { + //uncomment below and update the code to test deleteLiltCreateContent + //instance.deleteLiltCreateContent(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('generateLiltCreateContent', function() { + it('should call generateLiltCreateContent successfully', function(done) { + //uncomment below and update the code to test generateLiltCreateContent + //instance.generateLiltCreateContent(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getLiltCreateById', function() { + it('should call getLiltCreateById successfully', function(done) { + //uncomment below and update the code to test getLiltCreateById + //instance.getLiltCreateById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getLiltCreateContent', function() { + it('should call getLiltCreateContent successfully', function(done) { + //uncomment below and update the code to test getLiltCreateContent + //instance.getLiltCreateContent(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getLiltCreatePreferences', function() { + it('should call getLiltCreatePreferences successfully', function(done) { + //uncomment below and update the code to test getLiltCreatePreferences + //instance.getLiltCreatePreferences(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('regenerateLiltCreateContent', function() { + it('should call regenerateLiltCreateContent successfully', function(done) { + //uncomment below and update the code to test regenerateLiltCreateContent + //instance.regenerateLiltCreateContent(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('signLiltCreateTerms', function() { + it('should call signLiltCreateTerms successfully', function(done) { + //uncomment below and update the code to test signLiltCreateTerms + //instance.signLiltCreateTerms(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('updateLiltCreateContent', function() { + it('should call updateLiltCreateContent successfully', function(done) { + //uncomment below and update the code to test updateLiltCreateContent + //instance.updateLiltCreateContent(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('updateLiltCreatePreferences', function() { + it('should call updateLiltCreatePreferences successfully', function(done) { + //uncomment below and update the code to test updateLiltCreatePreferences + //instance.updateLiltCreatePreferences(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/model/DeleteSegmentFromMemoryResponse.spec.js b/test/model/DeleteSegmentFromMemoryResponse.spec.js new file mode 100644 index 0000000..5196375 --- /dev/null +++ b/test/model/DeleteSegmentFromMemoryResponse.spec.js @@ -0,0 +1,65 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.LiltNode); + } +}(this, function(expect, LiltNode) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new LiltNode.DeleteSegmentFromMemoryResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('DeleteSegmentFromMemoryResponse', function() { + it('should create an instance of DeleteSegmentFromMemoryResponse', function() { + // uncomment below and update the code to test DeleteSegmentFromMemoryResponse + //var instane = new LiltNode.DeleteSegmentFromMemoryResponse(); + //expect(instance).to.be.a(LiltNode.DeleteSegmentFromMemoryResponse); + }); + + it('should have the property success (base name: "success")', function() { + // uncomment below and update the code to test the property success + //var instane = new LiltNode.DeleteSegmentFromMemoryResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/LiltCreateContent.spec.js b/test/model/LiltCreateContent.spec.js new file mode 100644 index 0000000..44938dc --- /dev/null +++ b/test/model/LiltCreateContent.spec.js @@ -0,0 +1,95 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.LiltNode); + } +}(this, function(expect, LiltNode) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new LiltNode.LiltCreateContent(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('LiltCreateContent', function() { + it('should create an instance of LiltCreateContent', function() { + // uncomment below and update the code to test LiltCreateContent + //var instane = new LiltNode.LiltCreateContent(); + //expect(instance).to.be.a(LiltNode.LiltCreateContent); + }); + + it('should have the property tone (base name: "tone")', function() { + // uncomment below and update the code to test the property tone + //var instane = new LiltNode.LiltCreateContent(); + //expect(instance).to.be(); + }); + + it('should have the property terms (base name: "terms")', function() { + // uncomment below and update the code to test the property terms + //var instane = new LiltNode.LiltCreateContent(); + //expect(instance).to.be(); + }); + + it('should have the property summary (base name: "summary")', function() { + // uncomment below and update the code to test the property summary + //var instane = new LiltNode.LiltCreateContent(); + //expect(instance).to.be(); + }); + + it('should have the property language (base name: "language")', function() { + // uncomment below and update the code to test the property language + //var instane = new LiltNode.LiltCreateContent(); + //expect(instance).to.be(); + }); + + it('should have the property memoryId (base name: "memoryId")', function() { + // uncomment below and update the code to test the property memoryId + //var instane = new LiltNode.LiltCreateContent(); + //expect(instance).to.be(); + }); + + it('should have the property sections (base name: "sections")', function() { + // uncomment below and update the code to test the property sections + //var instane = new LiltNode.LiltCreateContent(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/SDLXLIFFFilter.spec.js b/test/model/SDLXLIFFFilter.spec.js new file mode 100644 index 0000000..0b916b9 --- /dev/null +++ b/test/model/SDLXLIFFFilter.spec.js @@ -0,0 +1,77 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.LiltNode); + } +}(this, function(expect, LiltNode) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new LiltNode.SDLXLIFFFilter(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('SDLXLIFFFilter', function() { + it('should create an instance of SDLXLIFFFilter', function() { + // uncomment below and update the code to test SDLXLIFFFilter + //var instane = new LiltNode.SDLXLIFFFilter(); + //expect(instance).to.be.a(LiltNode.SDLXLIFFFilter); + }); + + it('should have the property confName (base name: "confName")', function() { + // uncomment below and update the code to test the property confName + //var instane = new LiltNode.SDLXLIFFFilter(); + //expect(instance).to.be(); + }); + + it('should have the property allowablePercentage (base name: "allowablePercentage")', function() { + // uncomment below and update the code to test the property allowablePercentage + //var instane = new LiltNode.SDLXLIFFFilter(); + //expect(instance).to.be(); + }); + + it('should have the property allowUnlockedSegments (base name: "allowUnlockedSegments")', function() { + // uncomment below and update the code to test the property allowUnlockedSegments + //var instane = new LiltNode.SDLXLIFFFilter(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/SignLiltCreateTermsResponse.spec.js b/test/model/SignLiltCreateTermsResponse.spec.js new file mode 100644 index 0000000..d2fa747 --- /dev/null +++ b/test/model/SignLiltCreateTermsResponse.spec.js @@ -0,0 +1,65 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.LiltNode); + } +}(this, function(expect, LiltNode) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new LiltNode.SignLiltCreateTermsResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('SignLiltCreateTermsResponse', function() { + it('should create an instance of SignLiltCreateTermsResponse', function() { + // uncomment below and update the code to test SignLiltCreateTermsResponse + //var instane = new LiltNode.SignLiltCreateTermsResponse(); + //expect(instance).to.be.a(LiltNode.SignLiltCreateTermsResponse); + }); + + it('should have the property signedAgreement (base name: "signedAgreement")', function() { + // uncomment below and update the code to test the property signedAgreement + //var instane = new LiltNode.SignLiltCreateTermsResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/TermbaseExportResponse.spec.js b/test/model/TermbaseExportResponse.spec.js new file mode 100644 index 0000000..308e7ad --- /dev/null +++ b/test/model/TermbaseExportResponse.spec.js @@ -0,0 +1,71 @@ +/** + * Lilt REST API + * Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.LiltNode); + } +}(this, function(expect, LiltNode) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new LiltNode.TermbaseExportResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('TermbaseExportResponse', function() { + it('should create an instance of TermbaseExportResponse', function() { + // uncomment below and update the code to test TermbaseExportResponse + //var instane = new LiltNode.TermbaseExportResponse(); + //expect(instance).to.be.a(LiltNode.TermbaseExportResponse); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instane = new LiltNode.TermbaseExportResponse(); + //expect(instance).to.be(); + }); + + it('should have the property isProcessing (base name: "is_processing")', function() { + // uncomment below and update the code to test the property isProcessing + //var instane = new LiltNode.TermbaseExportResponse(); + //expect(instance).to.be(); + }); + + }); + +}));