{"id":19163221,"url":"https://github.com/oada/client","last_synced_at":"2026-03-02T23:35:36.253Z","repository":{"id":37864945,"uuid":"248121504","full_name":"OADA/client","owner":"OADA","description":"A lightweight client tool for interacting with an OADA-compliant server","archived":false,"fork":false,"pushed_at":"2025-03-21T19:58:17.000Z","size":13394,"stargazers_count":0,"open_issues_count":20,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T11:39:44.379Z","etag":null,"topics":["http","https","oada","watch","websockets"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OADA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2020-03-18T02:37:53.000Z","updated_at":"2025-03-21T19:57:19.000Z","dependencies_parsed_at":"2024-02-19T19:13:53.926Z","dependency_job_id":"919ef2ac-566c-4a2a-922b-e67404789ba2","html_url":"https://github.com/OADA/client","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/OADA/client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OADA%2Fclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OADA%2Fclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OADA%2Fclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OADA%2Fclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OADA","download_url":"https://codeload.github.com/OADA/client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OADA%2Fclient/sbom","scorecard":{"id":103347,"data":{"date":"2025-08-11","repo":{"name":"github.com/OADA/client","commit":"68118af136c815145ff0a80e3e0f538bf8d20384"},"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":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: topLevel 'security-events' permission set to 'write': .github/workflows/build-and-publish.yml:19","Info: topLevel 'contents' permission set to 'read': .github/workflows/build-and-publish.yml:23","Info: topLevel 'issues' permission set to 'read': .github/workflows/build-and-publish.yml:25","Info: topLevel 'pages' permission set to 'read': .github/workflows/build-and-publish.yml:27","Info: topLevel 'pull-requests' permission set to 'read': .github/workflows/build-and-publish.yml:28","Info: topLevel 'repository-projects' permission set to 'read': .github/workflows/build-and-publish.yml:29","Warn: topLevel 'packages' permission set to 'write': .github/workflows/build-and-publish.yml:18","Info: topLevel 'actions' permission set to 'read': .github/workflows/build-and-publish.yml:21","Info: topLevel 'checks' permission set to 'read': .github/workflows/build-and-publish.yml:22","Info: topLevel 'deployments' permission set to 'read': .github/workflows/build-and-publish.yml:24","Info: topLevel 'discussions' permission set to 'read': .github/workflows/build-and-publish.yml:26","Info: topLevel 'statuses' permission set to 'read': .github/workflows/build-and-publish.yml:30","Info: topLevel 'attestations' permission set to 'read': .github/workflows/build-and-publish.yml:31","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/build-and-publish.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/OADA/client/build-and-publish.yml/master?enable=pin","Info:   0 out of   1 third-party GitHubAction 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":"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":"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":"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: Apache License 2.0: 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":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-pppg-cpfq-h7wr","Warn: Project is vulnerable to: GHSA-hw8r-x6gr-5gjp"],"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-15T10:37:59.123Z","repository_id":37864945,"created_at":"2025-08-15T10:37:59.123Z","updated_at":"2025-08-15T10:37:59.123Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273618505,"owners_count":25138232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["http","https","oada","watch","websockets"],"created_at":"2024-11-09T09:14:31.884Z","updated_at":"2026-03-02T23:35:31.206Z","avatar_url":"https://github.com/OADA.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @oada/client\n\n[![npm](https://img.shields.io/npm/v/@oada/client)](https://www.npmjs.com/package/@oada/client)\n[![Downloads/week](https://img.shields.io/npm/dw/@oada/client.svg)](https://npmjs.org/package/@oada/client)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![License](https://img.shields.io/github/license/OADA/client)](LICENSE)\n\nA lightweight client tool for interacting with an OADA-compliant server\n\n## Installation\n\nThis module is available through npm. To install the module, simply run:\n\n```shell\nnpm install @oada/client\n```\n\n## Usage\n\n### Connect\n\n```typescript\nimport { connect } from '@oada/client';\nconst connection = await connect({\n  domain: 'api.oada.com', // domain of OADA server\n  token: 'abc', // token\n});\n```\n\n### GET\n\n#### Single GET\n\n```typescript\nconst response = await connection.get({\n  path: '/bookmarks/test',\n  timeout: 1000, // timeout in milliseconds (optional)\n});\n```\n\n#### Recursive GET\n\n```typescript\nconst dataTree = {\n  bookmarks: {\n    _type: 'application/vnd.oada.bookmarks.1+json',\n    _rev: 0,\n    thing: {\n      _type: 'application/json',\n      _rev: 0,\n      abc: {\n        '*': {\n          _type: 'application/json',\n          _rev: 0,\n        },\n      },\n    },\n  },\n};\nconst response = await connection.get({\n  path: '/bookmarks/thing',\n  tree: dataTree,\n  timeout: 1000, // timeout in milliseconds (optional)\n});\n```\n\n#### Watch\n\nA watch request can be issued by sending a `watch` request as follows.\n\n```typescript\n// Resolves once the watch is established\nconst { changes } = await connection.watch({\n  path: '/bookmarks/test',\n  rev: 1, // optional\n  timeout: 1000, // timeout in milliseconds (optional)\n});\n\n// Async iterator for all changes since the watch was started (or since `rev`)\nfor await (const change of changes) {\n  console.log(change);\n}\n```\n\nYou can also GET the current state of the resource when establishing a watch as follows.\n\n```typescript\n// Resolves once the watch is established\nconst { data, changes } = await connection.watch({\n  initialMethod: 'get',\n  path: '/bookmarks/test',\n});\n\n// Current body of the resource\nconsole.dir(data);\n\n// Async iterator for all changes since the watch was started\nfor await (const change of changes) {\n  console.log(change);\n}\n```\n\n### PUT\n\n#### Single PUT\n\n```typescript\nconst response = await connection.put({\n  path: '/bookmarks/test',\n  data: { thing: 'abc' },\n  contentType: 'application/json',\n  timeout: 1000, // timeout in milliseconds (optional)\n});\n```\n\n#### Tree PUT\n\n```typescript\nconst dataTree = {\n  bookmarks: {\n    _type: 'application/vnd.oada.bookmarks.1+json',\n    _rev: 0,\n    thing: {\n      _type: 'application/json',\n      _rev: 0,\n      abc: {\n        '*': {\n          _type: 'application/json',\n          _rev: 0,\n        },\n      },\n    },\n  },\n};\nconst response = await connection.put({\n  path: '/bookmarks/thing/abc/xyz/zzz',\n  tree: dataTree,\n  data: { test: 'something' },\n  timeout: 1000, // timeout in milliseconds (optional)\n});\n```\n\n### HEAD\n\n```typescript\nconst response = await connection.head({\n  path: '/bookmarks/test',\n  timeout: 1000, // timeout in milliseconds (optional)\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foada%2Fclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foada%2Fclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foada%2Fclient/lists"}