@crowdin/app-project-module
Version:
Module that generates for you all common endpoints for serving standalone Crowdin App
266 lines (265 loc) • 8.24 kB
TypeScript
/**
* @openapi
* components:
* schemas:
* CrowdinFiles:
* type: array
* example: [{id: 1, name: Landing pages}, {id: 2, parentId: 1, name: Home Page, type: json}]
* items:
* anyOf:
* - properties:
* id:
* type: string
* name:
* type: string
* - properties:
* id:
* type: string
* parentId:
* type: string
* name:
* type: string
* type:
* type: string
* IntegrationFiles:
* type: array
* example: [{id: 1, name: Landing pages, parent_id: 0, node_type: 0}, {name: Intro, id: 73291251883, parentId: Landing pages, type: json, node_type: 1}]
* items:
* anyOf:
* - properties:
* id:
* type: string
* name:
* type: string
* parent_id:
* type: string
* node_type:
* type: string
* - properties:
* name:
* type: string
* id:
* type: string
* parentId:
* type: string
* type:
* type: string
* node_type:
* type: string
* UpdateCrowdinFiles:
* title: 'Update files'
* required:
* - projectId
* - files
* properties:
* projectId:
* description: 'Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)'
* type: integer
* example: 12
* files:
* $ref: '#/components/schemas/IntegrationFiles'
* uploadTranslations:
* description: 'Upload exist translation from integration'
* type: boolean
* default: false
* example: true
* FileLanguagePair:
* title: 'Update files'
* required:
* - projectId
* - files
* properties:
* projectId:
* description: 'Project Id. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)'
* type: integer
* example: 12
* files:
* example: { 102: ['de', 'fr'], 999: ['uk'] }
* type: object
* description: |
* - **{fileId}** _(integer)_: Crowdin File Id. Get via [List Crowdin Files](#operation/crowdin.files)
* - **[{languageCode}]** _(array of strings)_: List Of Language Id. Get via [List Supported Languages](https://support.crowdin.com/developer/api/v2/#tag/Languages/operation/api.languages.getMany)
*
* **Example:**
* ```json
* {
* 102: ["de", "fr"],
* 999: ["uk"]
* }
* ```
* UpdateResponse:
* type: object
* properties:
* jobId:
* type: string
* example: '067da473-fc0b-43e3-b0a2-09d26af130c1'
* SettingsData:
* type: object
* example: {schedule: 0, condition: 0}
* additionalProperties:
* type: string
* UpdateSettingsData:
* title: 'Update Application Settings'
* required:
* - projectId
* - config
* properties:
* projectId:
* description: 'Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)'
* type: integer
* example: 12
* config:
* $ref: '#/components/schemas/SettingsData'
* SettingsResponse:
* $ref: '#/components/schemas/SettingsData'
* CrowdinSyncSettingsResponse:
* type: object
* example:
* 102: ['uk', 'de']
* additionalProperties:
* type: array
* items:
* type: string
* IntegrationSyncSettingsResponse:
* type: array
* items:
* type: object
* properties:
* name:
* type: string
* id:
* type: string
* parentId:
* type: string
* type:
* type: string
* node_type:
* type: string
* schedule:
* type: boolean
* UpdateSyncSettingsData:
* title: 'Update Application Sync Settings'
* required:
* - projectId
* - provider
* - files
* properties:
* projectId:
* description: 'Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)'
* type: integer
* example: 12
* provider:
* type: string
* enum:
* - crowdin
* - integration
* files:
* oneOf:
* - { $ref: '#/components/schemas/CrowdinSyncSettingsResponse' }
* - { $ref: '#/components/schemas/IntegrationSyncSettingsResponse' }
* FileProgress:
* title: 'Language Translation Progress'
* description: 'Language Translation File Progress Response Model'
* type: object
* properties:
* languageId:
* type: string
* example: af
* eTag:
* type: string
* example: fd0ea167420ef1687fd16635b9fb67a3
* words:
* properties:
* total:
* type: integer
* example: 7249
* translated:
* type: integer
* example: 3651
* approved:
* type: integer
* example: 3637
* type: object
* phrases:
* properties:
* total:
* type: integer
* example: 3041
* translated:
* type: integer
* example: 2631
* approved:
* type: integer
* example: 2622
* type: object
* translationProgress:
* type: integer
* example: 86
* approvalProgress:
* type: integer
* example: 86
* LoginFieldsResponse:
* type: array
* items:
* type: object
* properties:
* key:
* type: string
* example: 'apiKey'
* name:
* type: string
* example: 'Service API key'
* example: [{ key: 'email', name: 'User email' }, { key: 'password', name: 'User password' }]
* Login:
* title: 'Login'
* required:
* - projectId
* - credentials
* properties:
* projectId:
* description: 'Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)'
* type: integer
* example: 12
* credentials:
* $ref: '#/components/schemas/LoginData'
* LoginData:
* type: object
* description: 'Login Form Fields. Get via [Integration Login Form Fields](#operation/integration.fields)'
* example: { email: 'user@crowdin.com', password: 'password' }
* Job:
* type: object
* properties:
* id:
* type: string
* description: 'The Unique Identifier For The Job.'
* example: '067da473-fc0b-43e3-b0a2-09d26af130c1'
* progress:
* type: integer
* description: 'The Progress Of The Job.'
* example: 94
* status:
* type: string
* description: 'The Current Status Of The Job.'
* example: 'inProgress'
* title:
* type: string
* description: 'The Title Of The Job.'
* example: 'Sync files to Crowdin'
* JobResponse:
* type: object
* properties:
* data:
* type: array
* items:
* $ref: '#/components/schemas/Job'
*
* parameters:
* ProjectId:
* name: projectId
* in: query
* description: 'Project Identifier. Get via [List Projects](https://developer.crowdin.com/api/v2/#operation/api.projects.getMany)'
* required: true
* schema:
* type: integer
* example: 12
*/