{"id":26781892,"url":"https://github.com/yet3/type-safe-mixpanel","last_synced_at":"2025-03-29T08:18:40.258Z","repository":{"id":282273875,"uuid":"948049067","full_name":"yet3/type-safe-mixpanel","owner":"yet3","description":"A set of utilities for defining type-safe mixpanel events","archived":false,"fork":false,"pushed_at":"2025-03-13T17:02:01.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T18:26:04.611Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yet3.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}},"created_at":"2025-03-13T16:59:49.000Z","updated_at":"2025-03-13T17:02:05.000Z","dependencies_parsed_at":"2025-03-13T18:36:15.054Z","dependency_job_id":null,"html_url":"https://github.com/yet3/type-safe-mixpanel","commit_stats":null,"previous_names":["yet3/type-safe-mixpanel"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yet3%2Ftype-safe-mixpanel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yet3%2Ftype-safe-mixpanel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yet3%2Ftype-safe-mixpanel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yet3%2Ftype-safe-mixpanel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yet3","download_url":"https://codeload.github.com/yet3/type-safe-mixpanel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246156400,"owners_count":20732397,"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","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-03-29T08:18:39.751Z","updated_at":"2025-03-29T08:18:40.240Z","avatar_url":"https://github.com/yet3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Type safe mixpanel\n\nA set of utilities for safely defining mixpanel events\n\n### Example\n\n```ts\nimport { defineMpEvents, createTrackEvent, mpinf, mperr, mpwarn } from \"@yet3/type-safe-mixpanel\";\n\nexport const MP = defineMpEvents({\n  APP_MOUNT: mpinf(\"App has mounted\"),\n\n  BTN: {\n    CLICKED: mpinf\u003c{ btnId: string }\u003e(\"User clicked button\"),\n  },\n\n  INPUT_ERR: mperr\u003c{ value: string }\u003e(\"Generic error\"),\n});\n\nconst trackEvent = createTrackEvent();\nconst trackUserEvent = createTrackEvent({\n  baseProps: () =\u003e ({\n    USER_ID: \"a3sd89z1kk4d1kl8\",\n  }),\n});\n\ntrackEvent(MP.APP_MOUNT);\ntrackUserEvent(MP.BTN.CLICKED, { btnId: \"v8u7\" });\ntry {\n  // ...\n} catch (e) {\n  trackEvent(MP.INPUT_ERR, { value: \"\", nativeError: e });\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyet3%2Ftype-safe-mixpanel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyet3%2Ftype-safe-mixpanel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyet3%2Ftype-safe-mixpanel/lists"}