{"id":19703457,"url":"https://github.com/crowdin/crowdin-apps-functions","last_synced_at":"2026-02-12T09:04:53.536Z","repository":{"id":38316841,"uuid":"411332635","full_name":"crowdin/crowdin-apps-functions","owner":"crowdin","description":"Common functions used by Crowdin Apps","archived":false,"fork":false,"pushed_at":"2026-01-22T07:19:49.000Z","size":1799,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-22T21:57:46.678Z","etag":null,"topics":["app","apps","crowdin","helper"],"latest_commit_sha":null,"homepage":"https://support.crowdin.com/crowdin-apps/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crowdin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-28T15:12:43.000Z","updated_at":"2026-01-22T07:19:51.000Z","dependencies_parsed_at":"2024-01-03T10:51:48.596Z","dependency_job_id":"72604dc7-bc0a-4ccf-b0a6-55b7a6a28fa1","html_url":"https://github.com/crowdin/crowdin-apps-functions","commit_stats":{"total_commits":56,"total_committers":9,"mean_commits":6.222222222222222,"dds":0.625,"last_synced_commit":"69de21dadc657ed468851fee8b98d3a5810ee8df"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/crowdin/crowdin-apps-functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdin%2Fcrowdin-apps-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdin%2Fcrowdin-apps-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdin%2Fcrowdin-apps-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdin%2Fcrowdin-apps-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crowdin","download_url":"https://codeload.github.com/crowdin/crowdin-apps-functions/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crowdin%2Fcrowdin-apps-functions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29362205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app","apps","crowdin","helper"],"created_at":"2024-11-11T21:17:55.324Z","updated_at":"2026-02-12T09:04:53.519Z","avatar_url":"https://github.com/crowdin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://support.crowdin.com/assets/logos/symbol/png/crowdin-symbol-cWhite.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://support.crowdin.com/assets/logos/symbol/png/crowdin-symbol-cDark.png\"\u003e\n    \u003cimg width=\"150\" height=\"150\" src=\"https://support.crowdin.com/assets/logos/symbol/png/crowdin-symbol-cDark.png\"\u003e\n  \u003c/picture\u003e\n\u003c/p\u003e\n\n# Crowdin Apps Functions library\n\nLightweight library with utility functions to help you quickly create your own Crowdin App.\n\nInformation about Crowdin Apps can be found in the [About Crowdin Apps](https://developer.crowdin.com/crowdin-apps-about/) and in the [Quick Start](https://developer.crowdin.com/crowdin-apps-quick-start/) guide.\n\n\u003cdiv align=\"center\"\u003e\n\n[![npm](https://img.shields.io/npm/v/@crowdin/crowdin-apps-functions?logo=npm\u0026cacheSeconds=1800)](https://www.npmjs.com/package/@crowdin/crowdin-apps-functions)\n[![npm](https://img.shields.io/npm/dt/@crowdin/crowdin-apps-functions?cacheSeconds=1800)](https://www.npmjs.com/package/@crowdin/crowdin-apps-functions)\n[![CI](https://github.com/crowdin/crowdin-apps-functions/actions/workflows/basic.yml/badge.svg)](https://github.com/crowdin/crowdin-apps-functions/actions/workflows/basic.yml)\n[![codecov](https://codecov.io/gh/crowdin/crowdin-apps-functions/branch/main/graph/badge.svg)](https://codecov.io/gh/crowdin/crowdin-apps-functions)\n[![GitHub Release Date](https://img.shields.io/github/release-date/crowdin/crowdin-apps-functions?cacheSeconds=3600)](https://github.com/crowdin/crowdin-apps-functions/releases)\n[![GitHub contributors](https://img.shields.io/github/contributors/crowdin/crowdin-apps-functions?cacheSeconds=3600)](https://github.com/crowdin/crowdin-apps-functions/graphs/contributors)\n[![License](https://img.shields.io/github/license/crowdin/crowdin-apps-functions?cacheSeconds=3600)](https://github.com/crowdin/crowdin-apps-functions/blob/master/LICENSE)\n\n\u003c/div\u003e\n\n## Table of Contents\n* [Installation](#installation)\n* [Quick Start](#quick-start)\n* [Contributing](#contributing)\n* [Seeking Assistance](#seeking-assistance)\n* [License](#license)\n\n## Installation\n\n### npm\n  `npm i @crowdin/crowdin-apps-functions`\n\n### yarn\n  `yarn add @crowdin/crowdin-apps-functions`\n\n## Quick Start\n\n\u003cdetails\u003e\n\u003csummary\u003eTypescript\u003c/summary\u003e\n\n```typescript\nimport { generateOAuthToken } from '@crowdin/crowdin-apps-functions';\n\ngenerateOAuthToken({ clientId: 'app_client_id', clientSecret: 'app_client_secret', code: 'code_from_install_event'});\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eJavascript ES6 modules\u003c/summary\u003e\n\n```javascript\nimport { generateOAuthToken } from '@crowdin/crowdin-apps-functions';\n\ngenerateOAuthToken({ clientId: 'app_client_id', clientSecret: 'app_client_secret', code: 'code_from_install_event'});\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eJavascript CommonJS\u003c/summary\u003e\n\n```javascript\nconst crowdinFunctions = require('@crowdin/crowdin-apps-functions');\n\ncrowdinFunctions.generateOAuthToken({ clientId: 'app_client_id', clientSecret: 'app_client_secret', code: 'code_from_install_event'});\n```\n\n\u003c/details\u003e\n\n### Functions summary\n\nMainly all functions are intended to help you quickly develop your app but they also can reduce some work when you are integrating with Crowdin API.\nPlease refer to JSDoc for more details.\n\n| Method name                        | Description                                                                     |\n|------------------------------------|---------------------------------------------------------------------------------|\n| `fetchAppToken`                    | fetch API token for communication with Crowdin API                              |\n| `fetchAgentToken`                  | fetch Agent API token for communication with Crowdin API                        |\n| `fetchAppWithCodeToken`            | fetch App API token using authorization code for communication with Crowdin API |\n| `generateOAuthToken`               | generates OAuth token for communication with Crowdin API                        |\n| `refreshOAuthToken`                | refresh OAuth token in case if it was expired                                   |\n| `constructCrowdinIdFromJwtPayload` | creates unique id of crowdin user and project from the context                  |\n| `getProjectId`                     | extracts project id from crowdin id                                             |\n| `parseCrowdinId`                   | extracts object with organization(id\\|domain), project id and user id           |\n| `validateJwtToken`                 | validates if jwt token for your app is valid                                    |\n| `updateOrCreateFile`               | create or update file in Crowdin                                                |\n| `getFolder`                        | get folder with and files under it                                              |\n| `getOrCreateFolder`                | get folder with files under it or create it                                     |\n| `uploadTranslations`               | adds file to storage and sends it in upload translation request                 |\n| `updateSourceFiles`                | updates source files under specific directory                                   |\n| `handleTranslations`               | executes side effect function for each translated file                          |\n| `createOrUpdateWebhook`            | create or update webhook                                                        |\n| `getSubscription`                  | returns an information about app subscription                                   |\n| `convertString`                    | converts source or translation according to specified config                    |\n| `getBundleConfigurationForm`       | returns UI template config for custom formatters                                |\n| `generateReport`                   | generates Crowdin report, covers check if finished                              |\n\nAlso please have a look to working example of the [Crowdin App](https://github.com/crowdin/create-crowdin-app). It can be used as a basis for your app.\n\n## Contributing\nIf you want to contribute please read the [Contributing](/CONTRIBUTING.md) guidelines.\n\n## Seeking Assistance\nIf you find any problems or would like to suggest a feature, please feel free to file an issue on Github at [Issues Page](https://github.com/crowdin/crowdin-apps-functions/issues).\n\nIf you've found an error in these samples, please [Contact Customer Success Service](https://crowdin.com/contacts).\n\n## License\n\u003cpre\u003e\nThe Crowdin Apps Functions library is licensed under the MIT License. \nSee the LICENSE.md file distributed with this work for additional \ninformation regarding copyright ownership.\n\nExcept as contained in the LICENSE file, the name(s) of the above copyright\nholders shall not be used in advertising or otherwise to promote the sale,\nuse or other dealings in this Software without prior written authorization.\n\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdin%2Fcrowdin-apps-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrowdin%2Fcrowdin-apps-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrowdin%2Fcrowdin-apps-functions/lists"}