{"id":41099717,"url":"https://github.com/orangedata-official/node-orangedata","last_synced_at":"2026-01-22T15:06:07.014Z","repository":{"id":41812564,"uuid":"113156114","full_name":"orangedata-official/node-orangedata","owner":"orangedata-official","description":"Node.js integration for OrangeData service","archived":false,"fork":false,"pushed_at":"2025-11-27T11:58:19.000Z","size":7804,"stargazers_count":6,"open_issues_count":7,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-27T23:38:42.905Z","etag":null,"topics":["54-fz","54fz","fiscal","fiscalization","orangedata-service","pem","receipt"],"latest_commit_sha":null,"homepage":"http://orangedata.ru","language":"JavaScript","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/orangedata-official.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2017-12-05T08:43:53.000Z","updated_at":"2025-11-27T11:58:24.000Z","dependencies_parsed_at":"2023-12-22T14:02:36.103Z","dependency_job_id":"c7c0f09a-0fde-406f-908e-0a72a58de11a","html_url":"https://github.com/orangedata-official/node-orangedata","commit_stats":{"total_commits":91,"total_committers":9,"mean_commits":10.11111111111111,"dds":0.5934065934065934,"last_synced_commit":"c19bbfd38764e8b5da7d4a6fc9d6c21d481f8c2d"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/orangedata-official/node-orangedata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangedata-official%2Fnode-orangedata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangedata-official%2Fnode-orangedata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangedata-official%2Fnode-orangedata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangedata-official%2Fnode-orangedata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orangedata-official","download_url":"https://codeload.github.com/orangedata-official/node-orangedata/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orangedata-official%2Fnode-orangedata/sbom","scorecard":{"id":711543,"data":{"date":"2025-08-11","repo":{"name":"github.com/orangedata-official/node-orangedata","commit":"2e9928d5187fa7f507d0f483a77784d04a48e8e7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":6,"reason":"Found 7/11 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/orangedata-official/node-orangedata/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/orangedata-official/node-orangedata/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/orangedata-official/node-orangedata/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/orangedata-official/node-orangedata/tests.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:44","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"32 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-qgmg-gppg-76g5","Warn: Project is vulnerable to: GHSA-xx4c-jj58-r7x6","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T08:19:26.883Z","repository_id":41812564,"created_at":"2025-08-22T08:19:26.883Z","updated_at":"2025-08-22T08:19:26.883Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28664883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T14:01:31.714Z","status":"ssl_error","status_checked_at":"2026-01-22T13:59:23.143Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["54-fz","54fz","fiscal","fiscalization","orangedata-service","pem","receipt"],"created_at":"2026-01-22T15:06:06.148Z","updated_at":"2026-01-22T15:06:06.999Z","avatar_url":"https://github.com/orangedata-official.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003eNode.js integration for OrangeData service\u003c/div\u003e\n\n\n###  \n\n\u003e Note: this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.\n\n\u003cdiv align=\"right\"\u003e\n  \u003csub\u003e\n    - made with ❤︎ by \u003ca href=\"http://orangedata.ru/\"\u003eOrangeData\u003c/a\u003e and \u003ca href=\"https://github.com/orangedata-official/node-orangedata/graphs/contributors\"\u003econtributors\u003c/a\u003e.\n  \u003c/sub\u003e\n\u003c/div\u003e\n\n# Возможности\n- [x] Взаимодействие с онлайн-кассой по защищенному каналу связи (SSL)\n- [x] SHA256-RSA подпись сообщений приватным ключом отправителя\n- [x] Создание чека, соответствующего [протоколу](https://github.com/orangedata-official/API) ОранжДата\n- [x] Получение статуса ранее отправленного чека\n- [X] Создание чека коррекции\n- [X] Проверка контрольной марки\n\n# Установка\n\nДля работы с данной библиотекой требуется Node.js версии [8.9.2 (LTS)](https://nodejs.org/en/) или выше.\n\nИспользуя [yarn](https://yarnpkg.com):\n\n    $ yarn add node-orangedata\n\nИспользуя [npm](https://www.npmjs.com):\n\n    $ npm install --save node-orangedata\n\n# Использование\nИспользуйте команду `npm test`, чтобы запустить выполнение [примера](./examples/index.js) в вашей консоли.\n\n1. Подключите библиотеку в вашем коде:\n\n    ```javascript\n    const { OrangeData, Order } = require('node-orangedata');\n    ```\n\n1. Передайте параметры для установления защищенного соединения в конструктор класса `OrangeData`:\n\n    ```javascript\n\n    const cert = fs.readFileSync('./keys/client.crt');\n    const key = fs.readFileSync('./keys/client.key');\n    const passphrase = '1234';\n    const ca = fs.readFileSync('./keys/cacert.pem');\n    const privateKey = fs.readFileSync('./keys/private_key.pem');\n    const apiUrl = 'https://apip.orangedata.ru:2443/api/v2';\n\n    const agent = new OrangeData({ apiUrl, cert, key, passphrase, ca, privateKey });\n    ```\n\n1. Создайте экземпляр класса `Order` и заполните документ данными соответствующими [протоколу](https://github.com/orangedata-official/API):\n\n    ```javascript\n    const order = new Order({\n      id: '123',\n      inn: '7725713770',\n      group: 'Main',\n      type: 1, // Приход\n      customerContact: '+79991234567',\n      customer: 'покупатель',\n      customerINN: '7725713770',\n      taxationSystem: 1, // Общая\n    });\n\n    order\n      .addPosition({\n        text: 'Тестовый товар',\n        quantity: 5,\n        price: 10,\n        tax: 1,\n        paymentMethodType: 1,\n        paymentSubjectType: 1,\n        nomenclatureCode: 'igQVAAADMTIzNDU2Nzg5MDEyMwAAAQ==',\n        supplierINN: '3123011520',\n        supplierInfo: { phoneNumbers: ['+79998887766'], name: 'Наименование поставщика' },\n      })\n      .addPayment({ type: 1, amount: 10 })\n      .addPayment({ type: 2, amount: 40 })\n      .addAgent({\n        agentType: 127,\n        paymentTransferOperatorPhoneNumbers: ['+79998887766'],\n        paymentAgentOperation: 'Операция агента',\n        paymentAgentPhoneNumbers: ['+79998887766'],\n        paymentOperatorPhoneNumbers: ['+79998887766'],\n        paymentOperatorName: 'Наименование оператора перевода',\n        paymentOperatorAddress: 'Адрес оператора перевода',\n        paymentOperatorINN: '3123011520',\n        supplierPhoneNumbers: ['+79998887766'],\n      })\n      .addUserAttribute({\n        name: 'citation',\n        value: 'В здоровом теле здоровый дух, этот лозунг еще не потух!',\n      });\n\n    ```\n\n1. Используйте агента, чтобы отправить сформированный документ:\n\n    ```javascript\n    const { OrangeDataError } = require('node-orangedata/lib/errors');\n\n    try {\n      agent.sendOrder(order);\n    } catch (error) {\n      if (error instanceof OrangeDataError) {\n        // OrangeData errors contains additional info in `errors` property of type Array\n        console.log(error.message, error.errors);\n      }\n      // general errors handling\n    }\n\n    ```\n\n1. Используйте агента для получения статусов по ранее отправленным документам:\n\n    ```javascript\n    try {\n      const status = agent.getOrderStatus(inn, id);\n      if (status) {\n        // Документ успешно обработан, status содержит данные документа\n      } else {\n        // Документ создан и добавлен в очередь на обработку, но еще не обработан\n      }\n    } catch (error) {\n      if (error instanceof OrangeDataError) {\n        // OrangeData errors contains additional info in `errors` property of type Array\n        console.log(error.message, error.errors);\n      }\n      // general errors handling\n    }\n\n    ```\n\n# Troubleshooting\n\n* Ошибка `error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag` означает неправильный pem формат приватного ключа.\n\n  Если вы воспользовались советом из протокола и сконвертировали xml в pem с помощью [онлайн-конвертора](https://superdry.apphb.com/tools/online-rsa-key-converter), то попробуйте изменить заголовок и окончание ключа.\n  Укажите `-----BEGIN PRIVATE KEY-----` вместо `-----BEGIN RSA PRIVATE KEY-----`.\n\n# License\n\nThis project is licensed under the MIT license, copyright (c) 2017 АО \"Оранж Дата\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forangedata-official%2Fnode-orangedata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forangedata-official%2Fnode-orangedata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forangedata-official%2Fnode-orangedata/lists"}