{"id":29925481,"url":"https://github.com/expressapp/smartapp-bridge","last_synced_at":"2025-09-13T07:41:22.413Z","repository":{"id":37447891,"uuid":"397640725","full_name":"ExpressApp/smartapp-bridge","owner":"ExpressApp","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-18T10:29:43.000Z","size":622,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-18T12:40:33.970Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ExpressApp.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":"2021-08-18T15:00:33.000Z","updated_at":"2025-03-17T09:19:28.000Z","dependencies_parsed_at":"2024-05-07T11:24:56.272Z","dependency_job_id":"51c7466a-e2a6-4467-8df8-ee927230dc90","html_url":"https://github.com/ExpressApp/smartapp-bridge","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ExpressApp/smartapp-bridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpressApp%2Fsmartapp-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpressApp%2Fsmartapp-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpressApp%2Fsmartapp-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpressApp%2Fsmartapp-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExpressApp","download_url":"https://codeload.github.com/ExpressApp/smartapp-bridge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpressApp%2Fsmartapp-bridge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268379998,"owners_count":24241163,"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-08-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2025-08-02T11:37:13.363Z","updated_at":"2025-08-02T11:39:09.482Z","avatar_url":"https://github.com/ExpressApp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SmartApp bridge library\n\nThis library provides a universal interface for exchanging events with an express client.\nAndriod, iOS and Web clients supported.\n\nAll types can be found [here](https://smartapp.ccsteam.xyz/smartapp-bridge/).\n\n### Send event to eXpress\n\n```js\nSmartAppBridge\n  .sendClientEvent(\n    {\n      method: 'get_weather',\n      params: {\n        city: 'Moscow',\n      },\n      files: []\n    }\n  )\n  .then(data =\u003e {\n    // Handle response\n    console.log('response', data)\n  })\n  .then(({ type: method, handler: express, payload: params, files }) =\u003e {\n    // Handle response data type, payload\n  })\n  .catch(() =\u003e {\n    // Do something on timeout\n  })\n```\n\n```js\nSmartAppBridge\n  .sendBotEvent(\n    {\n      method: 'get_weather',\n      params: {\n        city: 'Moscow',\n      },\n    }\n  )\n  .then(data =\u003e {\n    // Handle response\n    console.log('response', data)\n  })\n  .then(({ type: method, handler: botx, payload: params }) =\u003e {\n    // Handle response data type, payload\n  })\n  .catch(() =\u003e {\n    // Do something on timeout\n  })\n```\n\n### Receive event from eXpress\n```js\nSmartAppBridge.onRecieve(({ type, payload }) =\u003e {\n  // This callback triggers when eXpress client send data without ref\n})\n```\n\n### Enable/Disable renaming event params from camelCase to snake_case and vice versa\n- Params are renamed from camelCase to snake_case and vice versa by default\n- Call after sending `ready` event\n\n```js\nSmartAppBridge.disableRenameParams()\n```\n\n```js\nSmartAppBridge.enableRenameParams()\n```\n\n### Enable/disable logging smart app events\n\n```js\nSmartAppBridge.enableLogs()\n```\n\n```js\nSmartAppBridge.disableLogs()\n```\n\n### Logging via bridge on mobile devices\n- log your data inside a smart app:\n```typescript\n  import { Bridge as bridge } from '@unlimited/smartapp-bridge'\n\n  const data: string | value = { logs: 'test' }\n  bridge?.log?.(data)\n```\n- Search in mobile logs by 'SmartApp Log' string\n\n```js\nSmartAppBridge?.log?.(data)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpressapp%2Fsmartapp-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpressapp%2Fsmartapp-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpressapp%2Fsmartapp-bridge/lists"}