{"id":20596922,"url":"https://github.com/tradle/bot-products","last_synced_at":"2026-02-14T16:03:41.449Z","repository":{"id":41494835,"uuid":"81413775","full_name":"tradle/bot-products","owner":"tradle","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-10T21:37:54.000Z","size":353,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T23:52:31.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tradle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-02-09T05:43:46.000Z","updated_at":"2025-03-21T08:15:51.000Z","dependencies_parsed_at":"2024-11-10T22:35:36.110Z","dependency_job_id":null,"html_url":"https://github.com/tradle/bot-products","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tradle/bot-products","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fbot-products","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fbot-products/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fbot-products/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fbot-products/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tradle","download_url":"https://codeload.github.com/tradle/bot-products/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradle%2Fbot-products/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29448971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T15:52:44.973Z","status":"ssl_error","status_checked_at":"2026-02-14T15:52:11.208Z","response_time":53,"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":[],"created_at":"2024-11-16T08:19:33.325Z","updated_at":"2026-02-14T16:03:41.416Z","avatar_url":"https://github.com/tradle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# @tradle/bot-products\n\nSell your users some products. They have waaaaaay too much money\n\nThis is a strategy creator, meaning you can give you a set of models and it will create a products strategy around them. In the example below, a bot is created that offers the user a choice of several age-verification related products, the models for which can be found in ['./test/fixtures/agemodels.js'](./test/fixtures/agemodels.js)\n\n## Usage \n\nTo get this bot to sell your products, just ask nicely:\n\n```js\n// example.js\nconst createProductsStrategy = require('@tradle/bot-products')\n// ./test/fixtures/agemodels.js\nconst ageModels = require('./test/fixtures/agemodels')\nconst ageVerificationStrategy = createProductsStrategy({\n  namespace: 'only.people.old',\n  models: {\n    all: ageModels,\n    private: {},\n    biz: {}\n  },\n  products: getProductModelIds(ageModels)\n})\n\nfunction getProductModelIds (models) {\n  return Object.keys(models)\n    .filter(id =\u003e models[id].subClassOf === 'tradle.FinancialProduct')\n}\n\nmodule.exports = ageVerificationStrategy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradle%2Fbot-products","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftradle%2Fbot-products","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradle%2Fbot-products/lists"}