diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 1a365d1..4492813 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -5,7 +5,6 @@ README.md package.json src/apis/AccountsApi.ts src/apis/AuthorizationsApi.ts -src/apis/BitbucketSyncApi.ts src/apis/BlacklistedKeysApi.ts src/apis/BranchesApi.ts src/apis/CommentReactionsApi.ts @@ -16,8 +15,6 @@ src/apis/DistributionsApi.ts src/apis/DocumentsApi.ts src/apis/FigmaAttachmentsApi.ts src/apis/FormatsApi.ts -src/apis/GitHubSyncApi.ts -src/apis/GitLabSyncApi.ts src/apis/GlossariesApi.ts src/apis/GlossaryTermTranslationsApi.ts src/apis/GlossaryTermsApi.ts @@ -70,10 +67,6 @@ src/models/Authorization.ts src/models/AuthorizationCreateParameters.ts src/models/AuthorizationUpdateParameters.ts src/models/AuthorizationWithToken.ts -src/models/BitbucketSync.ts -src/models/BitbucketSyncExportParameters.ts -src/models/BitbucketSyncExportResponse.ts -src/models/BitbucketSyncImportParameters.ts src/models/BlacklistedKey.ts src/models/BlacklistedKeyCreateParameters.ts src/models/BlacklistedKeyUpdateParameters.ts @@ -106,14 +99,6 @@ src/models/FigmaAttachment.ts src/models/FigmaAttachmentCreateParameters.ts src/models/FigmaAttachmentUpdateParameters.ts src/models/Format.ts -src/models/GithubSyncExportParameters.ts -src/models/GithubSyncImportParameters.ts -src/models/GitlabSync.ts -src/models/GitlabSyncExport.ts -src/models/GitlabSyncExportParameters.ts -src/models/GitlabSyncHistory.ts -src/models/GitlabSyncHistoryErrorsInner.ts -src/models/GitlabSyncImportParameters.ts src/models/Glossary.ts src/models/GlossaryCreateParameters.ts src/models/GlossaryTerm.ts diff --git a/README.md b/README.md index e9dae46..782e3cc 100644 --- a/README.md +++ b/README.md @@ -205,9 +205,6 @@ Class | Method | HTTP request | Description *AuthorizationsApi* | **authorizationShow** | **GET** /authorizations/{id} | Get a single authorization *AuthorizationsApi* | **authorizationUpdate** | **PATCH** /authorizations/{id} | Update an authorization *AuthorizationsApi* | **authorizationsList** | **GET** /authorizations | List authorizations -*BitbucketSyncApi* | **bitbucketSyncExport** | **POST** /bitbucket_syncs/{id}/export | Export from Phrase Strings to Bitbucket -*BitbucketSyncApi* | **bitbucketSyncImport** | **POST** /bitbucket_syncs/{id}/import | Import to Phrase Strings from Bitbucket -*BitbucketSyncApi* | **bitbucketSyncsList** | **GET** /bitbucket_syncs | List Bitbucket syncs *BlacklistedKeysApi* | **blacklistedKeyCreate** | **POST** /projects/{project_id}/blacklisted_keys | Create a blocked key *BlacklistedKeysApi* | **blacklistedKeyDelete** | **DELETE** /projects/{project_id}/blacklisted_keys/{id} | Delete a blocked key *BlacklistedKeysApi* | **blacklistedKeyShow** | **GET** /projects/{project_id}/blacklisted_keys/{id} | Get a single blocked key @@ -256,15 +253,6 @@ Class | Method | HTTP request | Description *FigmaAttachmentsApi* | **figmaAttachmentUpdate** | **PATCH** /projects/{project_id}/figma_attachments/{id} | Update a Figma attachment *FigmaAttachmentsApi* | **figmaAttachmentsList** | **GET** /projects/{project_id}/figma_attachments | List Figma attachments *FormatsApi* | **formatsList** | **GET** /formats | List formats -*GitHubSyncApi* | **githubSyncExport** | **POST** /github_syncs/export | Export from Phrase Strings to GitHub -*GitHubSyncApi* | **githubSyncImport** | **POST** /github_syncs/import | Import to Phrase Strings from GitHub -*GitLabSyncApi* | **gitlabSyncDelete** | **DELETE** /gitlab_syncs/{id} | Delete single Sync Setting -*GitLabSyncApi* | **gitlabSyncExport** | **POST** /gitlab_syncs/{gitlab_sync_id}/export | Export from Phrase Strings to GitLab -*GitLabSyncApi* | **gitlabSyncHistory** | **GET** /gitlab_syncs/{gitlab_sync_id}/history | History of single Sync Setting -*GitLabSyncApi* | **gitlabSyncImport** | **POST** /gitlab_syncs/{gitlab_sync_id}/import | Import from GitLab to Phrase -*GitLabSyncApi* | **gitlabSyncList** | **GET** /gitlab_syncs | List GitLab syncs -*GitLabSyncApi* | **gitlabSyncShow** | **GET** /gitlab_syncs/{id} | Get single Sync Setting -*GitLabSyncApi* | **gitlabSyncUpdate** | **PUT** /gitlab_syncs/{id} | Update single Sync Setting *GlossariesApi* | **glossariesList** | **GET** /accounts/{account_id}/glossaries | List term bases *GlossariesApi* | **glossaryCreate** | **POST** /accounts/{account_id}/glossaries | Create a term base *GlossariesApi* | **glossaryDelete** | **DELETE** /accounts/{account_id}/glossaries/{id} | Delete a term base diff --git a/src/apis/BitbucketSyncApi.ts b/src/apis/BitbucketSyncApi.ts deleted file mode 100644 index 8d0c13b..0000000 --- a/src/apis/BitbucketSyncApi.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import { - BitbucketSync, - BitbucketSyncFromJSON, - BitbucketSyncToJSON, - BitbucketSyncExportParameters, - BitbucketSyncExportParametersFromJSON, - BitbucketSyncExportParametersToJSON, - BitbucketSyncExportResponse, - BitbucketSyncExportResponseFromJSON, - BitbucketSyncExportResponseToJSON, - BitbucketSyncImportParameters, - BitbucketSyncImportParametersFromJSON, - BitbucketSyncImportParametersToJSON, -} from '../models'; - -export interface BitbucketSyncExportRequest { - id: string; - bitbucketSyncExportParameters: BitbucketSyncExportParameters; - xPhraseAppOTP?: string; -} - -export interface BitbucketSyncImportRequest { - id: string; - bitbucketSyncImportParameters: BitbucketSyncImportParameters; - xPhraseAppOTP?: string; -} - -export interface BitbucketSyncsListRequest { - xPhraseAppOTP?: string; - accountId?: string; -} - -/** - * - */ -export class BitbucketSyncApi extends runtime.BaseAPI { - - /** - * Export translations from Phrase Strings to Bitbucket according to the .phraseapp.yml file within the Bitbucket Repository.

Note: Export is done asynchronously and may take several seconds depending on the project size. - * Export from Phrase Strings to Bitbucket - */ - async bitbucketSyncExportRaw(requestParameters: BitbucketSyncExportRequest): Promise> { - if (requestParameters.id === null || requestParameters.id === undefined) { - throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling bitbucketSyncExport.'); - } - - if (requestParameters.bitbucketSyncExportParameters === null || requestParameters.bitbucketSyncExportParameters === undefined) { - throw new runtime.RequiredError('bitbucketSyncExportParameters','Required parameter requestParameters.bitbucketSyncExportParameters was null or undefined when calling bitbucketSyncExport.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/bitbucket_syncs/{id}/export`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: BitbucketSyncExportParametersToJSON(requestParameters.bitbucketSyncExportParameters), - }); - - return new runtime.JSONApiResponse(response, (jsonValue) => BitbucketSyncExportResponseFromJSON(jsonValue)); - } - - /** - * Export translations from Phrase Strings to Bitbucket according to the .phraseapp.yml file within the Bitbucket Repository.

Note: Export is done asynchronously and may take several seconds depending on the project size. - * Export from Phrase Strings to Bitbucket - */ - async bitbucketSyncExport(requestParameters: BitbucketSyncExportRequest): Promise { - const response = await this.bitbucketSyncExportRaw(requestParameters); - return await response.value(); - } - - /** - * Import translations from Bitbucket to Phrase Strings according to the .phraseapp.yml file within the Bitbucket repository.

Note: Import is done asynchronously and may take several seconds depending on the project size. - * Import to Phrase Strings from Bitbucket - */ - async bitbucketSyncImportRaw(requestParameters: BitbucketSyncImportRequest): Promise> { - if (requestParameters.id === null || requestParameters.id === undefined) { - throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling bitbucketSyncImport.'); - } - - if (requestParameters.bitbucketSyncImportParameters === null || requestParameters.bitbucketSyncImportParameters === undefined) { - throw new runtime.RequiredError('bitbucketSyncImportParameters','Required parameter requestParameters.bitbucketSyncImportParameters was null or undefined when calling bitbucketSyncImport.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/bitbucket_syncs/{id}/import`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: BitbucketSyncImportParametersToJSON(requestParameters.bitbucketSyncImportParameters), - }); - - return new runtime.TextApiResponse(response) as any; - } - - /** - * Import translations from Bitbucket to Phrase Strings according to the .phraseapp.yml file within the Bitbucket repository.

Note: Import is done asynchronously and may take several seconds depending on the project size. - * Import to Phrase Strings from Bitbucket - */ - async bitbucketSyncImport(requestParameters: BitbucketSyncImportRequest): Promise { - const response = await this.bitbucketSyncImportRaw(requestParameters); - return await response.value(); - } - - /** - * List all Bitbucket repositories for which synchronisation with Phrase Strings is activated. - * List Bitbucket syncs - */ - async bitbucketSyncsListRaw(requestParameters: BitbucketSyncsListRequest): Promise>> { - const queryParameters: any = {}; - - if (requestParameters.accountId !== undefined) { - queryParameters['account_id'] = requestParameters.accountId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/bitbucket_syncs`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BitbucketSyncFromJSON)); - } - - /** - * List all Bitbucket repositories for which synchronisation with Phrase Strings is activated. - * List Bitbucket syncs - */ - async bitbucketSyncsList(requestParameters: BitbucketSyncsListRequest): Promise> { - const response = await this.bitbucketSyncsListRaw(requestParameters); - return await response.value(); - } - -} diff --git a/src/apis/GitHubSyncApi.ts b/src/apis/GitHubSyncApi.ts deleted file mode 100644 index c522ac0..0000000 --- a/src/apis/GitHubSyncApi.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import { - CustomMetadataPropertyCreate422Response, - CustomMetadataPropertyCreate422ResponseFromJSON, - CustomMetadataPropertyCreate422ResponseToJSON, - GithubSyncExportParameters, - GithubSyncExportParametersFromJSON, - GithubSyncExportParametersToJSON, - GithubSyncImportParameters, - GithubSyncImportParametersFromJSON, - GithubSyncImportParametersToJSON, -} from '../models'; - -export interface GithubSyncExportRequest { - githubSyncExportParameters: GithubSyncExportParameters; - xPhraseAppOTP?: string; -} - -export interface GithubSyncImportRequest { - githubSyncImportParameters: GithubSyncImportParameters; - xPhraseAppOTP?: string; -} - -/** - * - */ -export class GitHubSyncApi extends runtime.BaseAPI { - - /** - * Export translations from Phrase Strings to GitHub according to the .phraseapp.yml file within the GitHub repository.

Note: Export is done asynchronously and may take several seconds depending on the project size. - * Export from Phrase Strings to GitHub - */ - async githubSyncExportRaw(requestParameters: GithubSyncExportRequest): Promise> { - if (requestParameters.githubSyncExportParameters === null || requestParameters.githubSyncExportParameters === undefined) { - throw new runtime.RequiredError('githubSyncExportParameters','Required parameter requestParameters.githubSyncExportParameters was null or undefined when calling githubSyncExport.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/github_syncs/export`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: GithubSyncExportParametersToJSON(requestParameters.githubSyncExportParameters), - }); - - return new runtime.TextApiResponse(response) as any; - } - - /** - * Export translations from Phrase Strings to GitHub according to the .phraseapp.yml file within the GitHub repository.

Note: Export is done asynchronously and may take several seconds depending on the project size. - * Export from Phrase Strings to GitHub - */ - async githubSyncExport(requestParameters: GithubSyncExportRequest): Promise { - const response = await this.githubSyncExportRaw(requestParameters); - return await response.value(); - } - - /** - * Import files to Phrase Strings from your connected GitHub repository.

Note: Import is done asynchronously and may take several seconds depending on the project size. - * Import to Phrase Strings from GitHub - */ - async githubSyncImportRaw(requestParameters: GithubSyncImportRequest): Promise> { - if (requestParameters.githubSyncImportParameters === null || requestParameters.githubSyncImportParameters === undefined) { - throw new runtime.RequiredError('githubSyncImportParameters','Required parameter requestParameters.githubSyncImportParameters was null or undefined when calling githubSyncImport.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/github_syncs/import`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: GithubSyncImportParametersToJSON(requestParameters.githubSyncImportParameters), - }); - - return new runtime.TextApiResponse(response) as any; - } - - /** - * Import files to Phrase Strings from your connected GitHub repository.

Note: Import is done asynchronously and may take several seconds depending on the project size. - * Import to Phrase Strings from GitHub - */ - async githubSyncImport(requestParameters: GithubSyncImportRequest): Promise { - const response = await this.githubSyncImportRaw(requestParameters); - return await response.value(); - } - -} diff --git a/src/apis/GitLabSyncApi.ts b/src/apis/GitLabSyncApi.ts deleted file mode 100644 index c4effc5..0000000 --- a/src/apis/GitLabSyncApi.ts +++ /dev/null @@ -1,439 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import { - GitlabSync, - GitlabSyncFromJSON, - GitlabSyncToJSON, - GitlabSyncExport, - GitlabSyncExportFromJSON, - GitlabSyncExportToJSON, - GitlabSyncExportParameters, - GitlabSyncExportParametersFromJSON, - GitlabSyncExportParametersToJSON, - GitlabSyncHistory, - GitlabSyncHistoryFromJSON, - GitlabSyncHistoryToJSON, - GitlabSyncImportParameters, - GitlabSyncImportParametersFromJSON, - GitlabSyncImportParametersToJSON, - Upload, - UploadFromJSON, - UploadToJSON, -} from '../models'; - -export interface GitlabSyncDeleteRequest { - id: string; - xPhraseAppOTP?: string; - accountId?: string; -} - -export interface GitlabSyncExportRequest { - gitlabSyncId: string; - gitlabSyncExportParameters: GitlabSyncExportParameters; - xPhraseAppOTP?: string; -} - -export interface GitlabSyncHistoryRequest { - gitlabSyncId: string; - xPhraseAppOTP?: string; - page?: number; - perPage?: number; - accountId?: string; -} - -export interface GitlabSyncImportRequest { - gitlabSyncId: string; - gitlabSyncImportParameters: GitlabSyncImportParameters; - xPhraseAppOTP?: string; -} - -export interface GitlabSyncListRequest { - xPhraseAppOTP?: string; - accountId?: string; -} - -export interface GitlabSyncShowRequest { - id: string; - xPhraseAppOTP?: string; - accountId?: string; -} - -export interface GitlabSyncUpdateRequest { - id: string; - xPhraseAppOTP?: string; - accountId?: string; - phraseProjectCode?: string; - gitlabProjectId?: number; - gitlabBranchName?: string; -} - -/** - * - */ -export class GitLabSyncApi extends runtime.BaseAPI { - - /** - * Deletes a single GitLab Sync Setting. - * Delete single Sync Setting - */ - async gitlabSyncDeleteRaw(requestParameters: GitlabSyncDeleteRequest): Promise> { - if (requestParameters.id === null || requestParameters.id === undefined) { - throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling gitlabSyncDelete.'); - } - - const queryParameters: any = {}; - - if (requestParameters.accountId !== undefined) { - queryParameters['account_id'] = requestParameters.accountId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/gitlab_syncs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }); - - return new runtime.TextApiResponse(response) as any; - } - - /** - * Deletes a single GitLab Sync Setting. - * Delete single Sync Setting - */ - async gitlabSyncDelete(requestParameters: GitlabSyncDeleteRequest): Promise { - const response = await this.gitlabSyncDeleteRaw(requestParameters); - return await response.value(); - } - - /** - * Export translations from Phrase Strings to GitLab according to the .phraseapp.yml file within the GitLab repository.

Note: Export is done asynchronously and may take several seconds depending on the project size. - * Export from Phrase Strings to GitLab - */ - async gitlabSyncExportRaw(requestParameters: GitlabSyncExportRequest): Promise> { - if (requestParameters.gitlabSyncId === null || requestParameters.gitlabSyncId === undefined) { - throw new runtime.RequiredError('gitlabSyncId','Required parameter requestParameters.gitlabSyncId was null or undefined when calling gitlabSyncExport.'); - } - - if (requestParameters.gitlabSyncExportParameters === null || requestParameters.gitlabSyncExportParameters === undefined) { - throw new runtime.RequiredError('gitlabSyncExportParameters','Required parameter requestParameters.gitlabSyncExportParameters was null or undefined when calling gitlabSyncExport.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/gitlab_syncs/{gitlab_sync_id}/export`.replace(`{${"gitlab_sync_id"}}`, encodeURIComponent(String(requestParameters.gitlabSyncId))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: GitlabSyncExportParametersToJSON(requestParameters.gitlabSyncExportParameters), - }); - - return new runtime.JSONApiResponse(response, (jsonValue) => GitlabSyncExportFromJSON(jsonValue)); - } - - /** - * Export translations from Phrase Strings to GitLab according to the .phraseapp.yml file within the GitLab repository.

Note: Export is done asynchronously and may take several seconds depending on the project size. - * Export from Phrase Strings to GitLab - */ - async gitlabSyncExport(requestParameters: GitlabSyncExportRequest): Promise { - const response = await this.gitlabSyncExportRaw(requestParameters); - return await response.value(); - } - - /** - * List history for a single Sync Setting. - * History of single Sync Setting - */ - async gitlabSyncHistoryRaw(requestParameters: GitlabSyncHistoryRequest): Promise>> { - if (requestParameters.gitlabSyncId === null || requestParameters.gitlabSyncId === undefined) { - throw new runtime.RequiredError('gitlabSyncId','Required parameter requestParameters.gitlabSyncId was null or undefined when calling gitlabSyncHistory.'); - } - - const queryParameters: any = {}; - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.perPage !== undefined) { - queryParameters['per_page'] = requestParameters.perPage; - } - - if (requestParameters.accountId !== undefined) { - queryParameters['account_id'] = requestParameters.accountId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/gitlab_syncs/{gitlab_sync_id}/history`.replace(`{${"gitlab_sync_id"}}`, encodeURIComponent(String(requestParameters.gitlabSyncId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GitlabSyncHistoryFromJSON)); - } - - /** - * List history for a single Sync Setting. - * History of single Sync Setting - */ - async gitlabSyncHistory(requestParameters: GitlabSyncHistoryRequest): Promise> { - const response = await this.gitlabSyncHistoryRaw(requestParameters); - return await response.value(); - } - - /** - * Import translations from GitLab to Phrase Strings according to the .phraseapp.yml file within the GitLab repository.

Note: Import is done asynchronously and may take several seconds depending on the project size. - * Import from GitLab to Phrase - */ - async gitlabSyncImportRaw(requestParameters: GitlabSyncImportRequest): Promise>> { - if (requestParameters.gitlabSyncId === null || requestParameters.gitlabSyncId === undefined) { - throw new runtime.RequiredError('gitlabSyncId','Required parameter requestParameters.gitlabSyncId was null or undefined when calling gitlabSyncImport.'); - } - - if (requestParameters.gitlabSyncImportParameters === null || requestParameters.gitlabSyncImportParameters === undefined) { - throw new runtime.RequiredError('gitlabSyncImportParameters','Required parameter requestParameters.gitlabSyncImportParameters was null or undefined when calling gitlabSyncImport.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/gitlab_syncs/{gitlab_sync_id}/import`.replace(`{${"gitlab_sync_id"}}`, encodeURIComponent(String(requestParameters.gitlabSyncId))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: GitlabSyncImportParametersToJSON(requestParameters.gitlabSyncImportParameters), - }); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UploadFromJSON)); - } - - /** - * Import translations from GitLab to Phrase Strings according to the .phraseapp.yml file within the GitLab repository.

Note: Import is done asynchronously and may take several seconds depending on the project size. - * Import from GitLab to Phrase - */ - async gitlabSyncImport(requestParameters: GitlabSyncImportRequest): Promise> { - const response = await this.gitlabSyncImportRaw(requestParameters); - return await response.value(); - } - - /** - * List all GitLab Sync Settings for which synchronisation with Phrase Strings and GitLab is activated. - * List GitLab syncs - */ - async gitlabSyncListRaw(requestParameters: GitlabSyncListRequest): Promise>> { - const queryParameters: any = {}; - - if (requestParameters.accountId !== undefined) { - queryParameters['account_id'] = requestParameters.accountId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/gitlab_syncs`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GitlabSyncFromJSON)); - } - - /** - * List all GitLab Sync Settings for which synchronisation with Phrase Strings and GitLab is activated. - * List GitLab syncs - */ - async gitlabSyncList(requestParameters: GitlabSyncListRequest): Promise> { - const response = await this.gitlabSyncListRaw(requestParameters); - return await response.value(); - } - - /** - * Shows a single GitLab Sync Setting. - * Get single Sync Setting - */ - async gitlabSyncShowRaw(requestParameters: GitlabSyncShowRequest): Promise> { - if (requestParameters.id === null || requestParameters.id === undefined) { - throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling gitlabSyncShow.'); - } - - const queryParameters: any = {}; - - if (requestParameters.accountId !== undefined) { - queryParameters['account_id'] = requestParameters.accountId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/gitlab_syncs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }); - - return new runtime.JSONApiResponse(response, (jsonValue) => GitlabSyncFromJSON(jsonValue)); - } - - /** - * Shows a single GitLab Sync Setting. - * Get single Sync Setting - */ - async gitlabSyncShow(requestParameters: GitlabSyncShowRequest): Promise { - const response = await this.gitlabSyncShowRaw(requestParameters); - return await response.value(); - } - - /** - * Updates a single GitLab Sync Setting. - * Update single Sync Setting - */ - async gitlabSyncUpdateRaw(requestParameters: GitlabSyncUpdateRequest): Promise> { - if (requestParameters.id === null || requestParameters.id === undefined) { - throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling gitlabSyncUpdate.'); - } - - const queryParameters: any = {}; - - if (requestParameters.accountId !== undefined) { - queryParameters['account_id'] = requestParameters.accountId; - } - - if (requestParameters.phraseProjectCode !== undefined) { - queryParameters['phrase_project_code'] = requestParameters.phraseProjectCode; - } - - if (requestParameters.gitlabProjectId !== undefined) { - queryParameters['gitlab_project_id'] = requestParameters.gitlabProjectId; - } - - if (requestParameters.gitlabBranchName !== undefined) { - queryParameters['gitlab_branch_name'] = requestParameters.gitlabBranchName; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters.xPhraseAppOTP !== undefined && requestParameters.xPhraseAppOTP !== null) { - headerParameters['X-PhraseApp-OTP'] = String(requestParameters.xPhraseAppOTP); - } - - if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) { - headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); - } - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // Token authentication - } - - const response = await this.request({ - path: `/gitlab_syncs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }); - - return new runtime.JSONApiResponse(response, (jsonValue) => GitlabSyncFromJSON(jsonValue)); - } - - /** - * Updates a single GitLab Sync Setting. - * Update single Sync Setting - */ - async gitlabSyncUpdate(requestParameters: GitlabSyncUpdateRequest): Promise { - const response = await this.gitlabSyncUpdateRaw(requestParameters); - return await response.value(); - } - -} diff --git a/src/apis/index.ts b/src/apis/index.ts index ede95ee..c695081 100644 --- a/src/apis/index.ts +++ b/src/apis/index.ts @@ -1,6 +1,5 @@ export * from './AccountsApi'; export * from './AuthorizationsApi'; -export * from './BitbucketSyncApi'; export * from './BlacklistedKeysApi'; export * from './BranchesApi'; export * from './CommentReactionsApi'; @@ -11,8 +10,6 @@ export * from './DistributionsApi'; export * from './DocumentsApi'; export * from './FigmaAttachmentsApi'; export * from './FormatsApi'; -export * from './GitHubSyncApi'; -export * from './GitLabSyncApi'; export * from './GlossariesApi'; export * from './GlossaryTermTranslationsApi'; export * from './GlossaryTermsApi'; diff --git a/src/models/BitbucketSync.ts b/src/models/BitbucketSync.ts deleted file mode 100644 index fc0c085..0000000 --- a/src/models/BitbucketSync.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import { - ProjectShort, - ProjectShortFromJSON, - ProjectShortFromJSONTyped, - ProjectShortToJSON, -} from './'; - -/** - * - * @export - * @interface BitbucketSync - */ -export interface BitbucketSync { - /** - * - * @type {string} - * @memberof BitbucketSync - */ - id?: string; - /** - * - * @type {string} - * @memberof BitbucketSync - */ - repositoryName?: string; - /** - * - * @type {Date} - * @memberof BitbucketSync - */ - lastExportToBitbucketAt?: Date; - /** - * - * @type {Date} - * @memberof BitbucketSync - */ - lastImportFromBitbucketAt?: Date; - /** - * - * @type {boolean} - * @memberof BitbucketSync - */ - validPhraseappYaml?: boolean; - /** - * - * @type {Array} - * @memberof BitbucketSync - */ - phraseappProjects?: Array; -} - -export function BitbucketSyncFromJSON(json: any): BitbucketSync { - return BitbucketSyncFromJSONTyped(json, false); -} - -export function BitbucketSyncFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitbucketSync { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'repositoryName': !exists(json, 'repository_name') ? undefined : json['repository_name'], - 'lastExportToBitbucketAt': !exists(json, 'last_export_to_bitbucket_at') ? undefined : (new Date(json['last_export_to_bitbucket_at'])), - 'lastImportFromBitbucketAt': !exists(json, 'last_import_from_bitbucket_at') ? undefined : (new Date(json['last_import_from_bitbucket_at'])), - 'validPhraseappYaml': !exists(json, 'valid_phraseapp_yaml') ? undefined : json['valid_phraseapp_yaml'], - 'phraseappProjects': !exists(json, 'phraseapp_projects') ? undefined : ((json['phraseapp_projects'] as Array).map(ProjectShortFromJSON)), - }; -} - -export function BitbucketSyncToJSON(value?: BitbucketSync | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'repository_name': value.repositoryName, - 'last_export_to_bitbucket_at': value.lastExportToBitbucketAt === undefined ? undefined : (value.lastExportToBitbucketAt.toISOString()), - 'last_import_from_bitbucket_at': value.lastImportFromBitbucketAt === undefined ? undefined : (value.lastImportFromBitbucketAt.toISOString()), - 'valid_phraseapp_yaml': value.validPhraseappYaml, - 'phraseapp_projects': value.phraseappProjects === undefined ? undefined : ((value.phraseappProjects as Array).map(ProjectShortToJSON)), - }; -} - - diff --git a/src/models/BitbucketSyncExportParameters.ts b/src/models/BitbucketSyncExportParameters.ts deleted file mode 100644 index 06f64af..0000000 --- a/src/models/BitbucketSyncExportParameters.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface BitbucketSyncExportParameters - */ -export interface BitbucketSyncExportParameters { - /** - * Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. - * @type {string} - * @memberof BitbucketSyncExportParameters - */ - accountId?: string; -} - -export function BitbucketSyncExportParametersFromJSON(json: any): BitbucketSyncExportParameters { - return BitbucketSyncExportParametersFromJSONTyped(json, false); -} - -export function BitbucketSyncExportParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitbucketSyncExportParameters { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'accountId': !exists(json, 'account_id') ? undefined : json['account_id'], - }; -} - -export function BitbucketSyncExportParametersToJSON(value?: BitbucketSyncExportParameters | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'account_id': value.accountId, - }; -} - - diff --git a/src/models/BitbucketSyncExportResponse.ts b/src/models/BitbucketSyncExportResponse.ts deleted file mode 100644 index 5bf9209..0000000 --- a/src/models/BitbucketSyncExportResponse.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface BitbucketSyncExportResponse - */ -export interface BitbucketSyncExportResponse { - /** - * - * @type {string} - * @memberof BitbucketSyncExportResponse - */ - statusPath?: string; -} - -export function BitbucketSyncExportResponseFromJSON(json: any): BitbucketSyncExportResponse { - return BitbucketSyncExportResponseFromJSONTyped(json, false); -} - -export function BitbucketSyncExportResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitbucketSyncExportResponse { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'statusPath': !exists(json, 'status_path') ? undefined : json['status_path'], - }; -} - -export function BitbucketSyncExportResponseToJSON(value?: BitbucketSyncExportResponse | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'status_path': value.statusPath, - }; -} - - diff --git a/src/models/BitbucketSyncImportParameters.ts b/src/models/BitbucketSyncImportParameters.ts deleted file mode 100644 index c3d6bb9..0000000 --- a/src/models/BitbucketSyncImportParameters.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface BitbucketSyncImportParameters - */ -export interface BitbucketSyncImportParameters { - /** - * Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts. - * @type {string} - * @memberof BitbucketSyncImportParameters - */ - accountId?: string; -} - -export function BitbucketSyncImportParametersFromJSON(json: any): BitbucketSyncImportParameters { - return BitbucketSyncImportParametersFromJSONTyped(json, false); -} - -export function BitbucketSyncImportParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): BitbucketSyncImportParameters { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'accountId': !exists(json, 'account_id') ? undefined : json['account_id'], - }; -} - -export function BitbucketSyncImportParametersToJSON(value?: BitbucketSyncImportParameters | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'account_id': value.accountId, - }; -} - - diff --git a/src/models/GithubSyncExportParameters.ts b/src/models/GithubSyncExportParameters.ts deleted file mode 100644 index b005253..0000000 --- a/src/models/GithubSyncExportParameters.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GithubSyncExportParameters - */ -export interface GithubSyncExportParameters { - /** - * Project ID to specify the actual project the GitHub export should be triggered in. - * @type {string} - * @memberof GithubSyncExportParameters - */ - projectId?: string; -} - -export function GithubSyncExportParametersFromJSON(json: any): GithubSyncExportParameters { - return GithubSyncExportParametersFromJSONTyped(json, false); -} - -export function GithubSyncExportParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): GithubSyncExportParameters { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'projectId': !exists(json, 'project_id') ? undefined : json['project_id'], - }; -} - -export function GithubSyncExportParametersToJSON(value?: GithubSyncExportParameters | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'project_id': value.projectId, - }; -} - - diff --git a/src/models/GithubSyncImportParameters.ts b/src/models/GithubSyncImportParameters.ts deleted file mode 100644 index 318ce62..0000000 --- a/src/models/GithubSyncImportParameters.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GithubSyncImportParameters - */ -export interface GithubSyncImportParameters { - /** - * Project ID to specify the actual project the GitHub import should be triggered in. - * @type {string} - * @memberof GithubSyncImportParameters - */ - projectId?: string; -} - -export function GithubSyncImportParametersFromJSON(json: any): GithubSyncImportParameters { - return GithubSyncImportParametersFromJSONTyped(json, false); -} - -export function GithubSyncImportParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): GithubSyncImportParameters { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'projectId': !exists(json, 'project_id') ? undefined : json['project_id'], - }; -} - -export function GithubSyncImportParametersToJSON(value?: GithubSyncImportParameters | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'project_id': value.projectId, - }; -} - - diff --git a/src/models/GitlabSync.ts b/src/models/GitlabSync.ts deleted file mode 100644 index 1d45ade..0000000 --- a/src/models/GitlabSync.ts +++ /dev/null @@ -1,136 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GitlabSync - */ -export interface GitlabSync { - /** - * - * @type {string} - * @memberof GitlabSync - */ - id?: string; - /** - * - * @type {string} - * @memberof GitlabSync - */ - projectId?: string; - /** - * - * @type {number} - * @memberof GitlabSync - */ - gitlabProjectId?: number; - /** - * - * @type {string} - * @memberof GitlabSync - */ - gitlabBranchName?: string; - /** - * - * @type {boolean} - * @memberof GitlabSync - */ - autoImport?: boolean; - /** - * - * @type {string} - * @memberof GitlabSync - */ - autoImportSecret?: string; - /** - * - * @type {string} - * @memberof GitlabSync - */ - autoImportUrl?: string; - /** - * - * @type {string} - * @memberof GitlabSync - */ - selfHostedApiUrl?: string; - /** - * - * @type {Date} - * @memberof GitlabSync - */ - lastExportedAt?: Date; - /** - * - * @type {Date} - * @memberof GitlabSync - */ - lastImportedAt?: Date; - /** - * - * @type {string} - * @memberof GitlabSync - */ - lastStatus?: string; -} - -export function GitlabSyncFromJSON(json: any): GitlabSync { - return GitlabSyncFromJSONTyped(json, false); -} - -export function GitlabSyncFromJSONTyped(json: any, ignoreDiscriminator: boolean): GitlabSync { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'id': !exists(json, 'id') ? undefined : json['id'], - 'projectId': !exists(json, 'project_id') ? undefined : json['project_id'], - 'gitlabProjectId': !exists(json, 'gitlab_project_id') ? undefined : json['gitlab_project_id'], - 'gitlabBranchName': !exists(json, 'gitlab_branch_name') ? undefined : json['gitlab_branch_name'], - 'autoImport': !exists(json, 'auto_import') ? undefined : json['auto_import'], - 'autoImportSecret': !exists(json, 'auto_import_secret') ? undefined : json['auto_import_secret'], - 'autoImportUrl': !exists(json, 'auto_import_url') ? undefined : json['auto_import_url'], - 'selfHostedApiUrl': !exists(json, 'self_hosted_api_url') ? undefined : json['self_hosted_api_url'], - 'lastExportedAt': !exists(json, 'last_exported_at') ? undefined : (new Date(json['last_exported_at'])), - 'lastImportedAt': !exists(json, 'last_imported_at') ? undefined : (new Date(json['last_imported_at'])), - 'lastStatus': !exists(json, 'last_status') ? undefined : json['last_status'], - }; -} - -export function GitlabSyncToJSON(value?: GitlabSync | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'id': value.id, - 'project_id': value.projectId, - 'gitlab_project_id': value.gitlabProjectId, - 'gitlab_branch_name': value.gitlabBranchName, - 'auto_import': value.autoImport, - 'auto_import_secret': value.autoImportSecret, - 'auto_import_url': value.autoImportUrl, - 'self_hosted_api_url': value.selfHostedApiUrl, - 'last_exported_at': value.lastExportedAt === undefined ? undefined : (value.lastExportedAt.toISOString()), - 'last_imported_at': value.lastImportedAt === undefined ? undefined : (value.lastImportedAt.toISOString()), - 'last_status': value.lastStatus, - }; -} - - diff --git a/src/models/GitlabSyncExport.ts b/src/models/GitlabSyncExport.ts deleted file mode 100644 index f51b60d..0000000 --- a/src/models/GitlabSyncExport.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GitlabSyncExport - */ -export interface GitlabSyncExport { - /** - * - * @type {number} - * @memberof GitlabSyncExport - */ - mergeRequestId?: number; - /** - * - * @type {string} - * @memberof GitlabSyncExport - */ - mergeRequestWebUrl?: string; -} - -export function GitlabSyncExportFromJSON(json: any): GitlabSyncExport { - return GitlabSyncExportFromJSONTyped(json, false); -} - -export function GitlabSyncExportFromJSONTyped(json: any, ignoreDiscriminator: boolean): GitlabSyncExport { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'mergeRequestId': !exists(json, 'merge_request_id') ? undefined : json['merge_request_id'], - 'mergeRequestWebUrl': !exists(json, 'merge_request_web_url') ? undefined : json['merge_request_web_url'], - }; -} - -export function GitlabSyncExportToJSON(value?: GitlabSyncExport | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'merge_request_id': value.mergeRequestId, - 'merge_request_web_url': value.mergeRequestWebUrl, - }; -} - - diff --git a/src/models/GitlabSyncExportParameters.ts b/src/models/GitlabSyncExportParameters.ts deleted file mode 100644 index 314156f..0000000 --- a/src/models/GitlabSyncExportParameters.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GitlabSyncExportParameters - */ -export interface GitlabSyncExportParameters { - /** - * Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts. - * @type {string} - * @memberof GitlabSyncExportParameters - */ - accountId?: string; -} - -export function GitlabSyncExportParametersFromJSON(json: any): GitlabSyncExportParameters { - return GitlabSyncExportParametersFromJSONTyped(json, false); -} - -export function GitlabSyncExportParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): GitlabSyncExportParameters { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'accountId': !exists(json, 'account_id') ? undefined : json['account_id'], - }; -} - -export function GitlabSyncExportParametersToJSON(value?: GitlabSyncExportParameters | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'account_id': value.accountId, - }; -} - - diff --git a/src/models/GitlabSyncHistory.ts b/src/models/GitlabSyncHistory.ts deleted file mode 100644 index fb248cb..0000000 --- a/src/models/GitlabSyncHistory.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import { - GitlabSyncHistoryErrorsInner, - GitlabSyncHistoryErrorsInnerFromJSON, - GitlabSyncHistoryErrorsInnerFromJSONTyped, - GitlabSyncHistoryErrorsInnerToJSON, -} from './'; - -/** - * - * @export - * @interface GitlabSyncHistory - */ -export interface GitlabSyncHistory { - /** - * - * @type {string} - * @memberof GitlabSyncHistory - */ - status?: string; - /** - * - * @type {string} - * @memberof GitlabSyncHistory - */ - action?: string; - /** - * - * @type {Array} - * @memberof GitlabSyncHistory - */ - errors?: Array; - /** - * - * @type {Date} - * @memberof GitlabSyncHistory - */ - date?: Date; - /** - * - * @type {object} - * @memberof GitlabSyncHistory - */ - details?: object; -} - -export function GitlabSyncHistoryFromJSON(json: any): GitlabSyncHistory { - return GitlabSyncHistoryFromJSONTyped(json, false); -} - -export function GitlabSyncHistoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): GitlabSyncHistory { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'status': !exists(json, 'status') ? undefined : json['status'], - 'action': !exists(json, 'action') ? undefined : json['action'], - 'errors': !exists(json, 'errors') ? undefined : ((json['errors'] as Array).map(GitlabSyncHistoryErrorsInnerFromJSON)), - 'date': !exists(json, 'date') ? undefined : (new Date(json['date'])), - 'details': !exists(json, 'details') ? undefined : json['details'], - }; -} - -export function GitlabSyncHistoryToJSON(value?: GitlabSyncHistory | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'status': value.status, - 'action': value.action, - 'errors': value.errors === undefined ? undefined : ((value.errors as Array).map(GitlabSyncHistoryErrorsInnerToJSON)), - 'date': value.date === undefined ? undefined : (value.date.toISOString()), - 'details': value.details, - }; -} - - diff --git a/src/models/GitlabSyncHistoryErrorsInner.ts b/src/models/GitlabSyncHistoryErrorsInner.ts deleted file mode 100644 index 5f1e465..0000000 --- a/src/models/GitlabSyncHistoryErrorsInner.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GitlabSyncHistoryErrorsInner - */ -export interface GitlabSyncHistoryErrorsInner { - /** - * - * @type {string} - * @memberof GitlabSyncHistoryErrorsInner - */ - error?: string; - /** - * - * @type {string} - * @memberof GitlabSyncHistoryErrorsInner - */ - message?: string; -} - -export function GitlabSyncHistoryErrorsInnerFromJSON(json: any): GitlabSyncHistoryErrorsInner { - return GitlabSyncHistoryErrorsInnerFromJSONTyped(json, false); -} - -export function GitlabSyncHistoryErrorsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GitlabSyncHistoryErrorsInner { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'error': !exists(json, 'error') ? undefined : json['error'], - 'message': !exists(json, 'message') ? undefined : json['message'], - }; -} - -export function GitlabSyncHistoryErrorsInnerToJSON(value?: GitlabSyncHistoryErrorsInner | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'error': value.error, - 'message': value.message, - }; -} - - diff --git a/src/models/GitlabSyncImportParameters.ts b/src/models/GitlabSyncImportParameters.ts deleted file mode 100644 index e0ce9df..0000000 --- a/src/models/GitlabSyncImportParameters.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Phrase Strings API Reference - * - * The version of the OpenAPI document: 2.0.0 - * Contact: support@phrase.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface GitlabSyncImportParameters - */ -export interface GitlabSyncImportParameters { - /** - * Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts. - * @type {string} - * @memberof GitlabSyncImportParameters - */ - accountId?: string; -} - -export function GitlabSyncImportParametersFromJSON(json: any): GitlabSyncImportParameters { - return GitlabSyncImportParametersFromJSONTyped(json, false); -} - -export function GitlabSyncImportParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): GitlabSyncImportParameters { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'accountId': !exists(json, 'account_id') ? undefined : json['account_id'], - }; -} - -export function GitlabSyncImportParametersToJSON(value?: GitlabSyncImportParameters | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'account_id': value.accountId, - }; -} - - diff --git a/src/models/index.ts b/src/models/index.ts index 20560f5..68367f3 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -7,10 +7,6 @@ export * from './Authorization'; export * from './AuthorizationCreateParameters'; export * from './AuthorizationUpdateParameters'; export * from './AuthorizationWithToken'; -export * from './BitbucketSync'; -export * from './BitbucketSyncExportParameters'; -export * from './BitbucketSyncExportResponse'; -export * from './BitbucketSyncImportParameters'; export * from './BlacklistedKey'; export * from './BlacklistedKeyCreateParameters'; export * from './BlacklistedKeyUpdateParameters'; @@ -43,14 +39,6 @@ export * from './FigmaAttachment'; export * from './FigmaAttachmentCreateParameters'; export * from './FigmaAttachmentUpdateParameters'; export * from './Format'; -export * from './GithubSyncExportParameters'; -export * from './GithubSyncImportParameters'; -export * from './GitlabSync'; -export * from './GitlabSyncExport'; -export * from './GitlabSyncExportParameters'; -export * from './GitlabSyncHistory'; -export * from './GitlabSyncHistoryErrorsInner'; -export * from './GitlabSyncImportParameters'; export * from './Glossary'; export * from './GlossaryCreateParameters'; export * from './GlossaryTerm';