{"id":48844033,"url":"https://github.com/swiftly-developed/swiftlyfeedbackkit-javascript-sdk","last_synced_at":"2026-04-15T04:01:29.410Z","repository":{"id":337400240,"uuid":"1152760504","full_name":"Swiftly-Developed/SwiftlyFeedbackKit-Javascript-SDK","owner":"Swiftly-Developed","description":"FeedbackKit JavaScript SDK - Collect and manage user feedback in web applications   ","archived":false,"fork":false,"pushed_at":"2026-04-15T02:28:29.000Z","size":34402,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-15T03:22:07.147Z","etag":null,"topics":["feedback","feedback-systems"],"latest_commit_sha":null,"homepage":"https://feedbackkit.swiftly-workspace.com","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/Swiftly-Developed.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-08T11:47:52.000Z","updated_at":"2026-04-15T01:29:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Swiftly-Developed/SwiftlyFeedbackKit-Javascript-SDK","commit_stats":null,"previous_names":["swiftly-developed/swiftlyfeedbackkit-javascript-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Swiftly-Developed/SwiftlyFeedbackKit-Javascript-SDK","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Swiftly-Developed%2FSwiftlyFeedbackKit-Javascript-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Swiftly-Developed%2FSwiftlyFeedbackKit-Javascript-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Swiftly-Developed%2FSwiftlyFeedbackKit-Javascript-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Swiftly-Developed%2FSwiftlyFeedbackKit-Javascript-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Swiftly-Developed","download_url":"https://codeload.github.com/Swiftly-Developed/SwiftlyFeedbackKit-Javascript-SDK/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Swiftly-Developed%2FSwiftlyFeedbackKit-Javascript-SDK/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31825515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"online","status_checked_at":"2026-04-15T02:00:06.175Z","response_time":63,"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":["feedback","feedback-systems"],"created_at":"2026-04-15T04:01:27.610Z","updated_at":"2026-04-15T04:01:29.399Z","avatar_url":"https://github.com/Swiftly-Developed.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FeedbackKit JavaScript SDK\n\nJavaScript/TypeScript SDK for [FeedbackKit](https://swiftly-developed.com/feedbackkit) - In-app feedback collection.\n\n![npm](https://img.shields.io/npm/v/feedbackkit-js)\n![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue)\n![License](https://img.shields.io/npm/l/feedbackkit-js)\n\n## Features\n\n- **TypeScript-first** - Full type definitions included\n- **Zero dependencies** - Uses native fetch\n- **Tree-shakeable** - Only import what you need\n- **Universal** - Works in Node.js 18+ and modern browsers\n\n## Installation\n\n```bash\nnpm install feedbackkit-js\n# or\nyarn add feedbackkit-js\n# or\npnpm add feedbackkit-js\n```\n\n## Quick Start\n\n```typescript\nimport { FeedbackKit, FeedbackCategory } from 'feedbackkit-js';\n\n// Initialize the client\nconst feedbackKit = new FeedbackKit({\n  apiKey: 'sf_your_api_key',\n  userId: 'user_12345' // optional, for hasVoted state\n});\n\n// List feedback\nconst feedbacks = await feedbackKit.feedback.list();\n\n// Submit feedback\nconst newFeedback = await feedbackKit.feedback.create({\n  title: 'Add dark mode',\n  description: 'Please add dark mode support.',\n  category: FeedbackCategory.FeatureRequest,\n  userId: 'user_12345'\n});\n\n// Vote for feedback\nconst voteResult = await feedbackKit.votes.vote('feedback-id', {\n  userId: 'user_12345'\n});\n```\n\n## API Reference\n\n### Configuration\n\n```typescript\nconst feedbackKit = new FeedbackKit({\n  apiKey: 'sf_your_api_key',      // Required: Your project API key\n  userId: 'user_12345',            // Optional: Current user ID\n  timeout: 30000                   // Optional: Request timeout (ms)\n});\n```\n\n### Feedback\n\n```typescript\n// List all feedback\nconst feedbacks = await feedbackKit.feedback.list();\n\n// Filter by status\nconst pending = await feedbackKit.feedback.list({\n  status: FeedbackStatus.Pending\n});\n\n// Filter by category\nconst bugs = await feedbackKit.feedback.list({\n  category: FeedbackCategory.BugReport\n});\n\n// Get single feedback\nconst feedback = await feedbackKit.feedback.get('feedback-id');\n\n// Submit feedback\nconst newFeedback = await feedbackKit.feedback.create({\n  title: 'Feature title',\n  description: 'Detailed description...',\n  category: FeedbackCategory.FeatureRequest,\n  userId: 'user_12345',\n  userEmail: 'user@example.com' // optional\n});\n```\n\n### Voting\n\n```typescript\n// Vote for feedback\nconst result = await feedbackKit.votes.vote('feedback-id', {\n  userId: 'user_12345'\n});\n\n// Vote with email notification opt-in\nconst result = await feedbackKit.votes.vote('feedback-id', {\n  userId: 'user_12345',\n  email: 'user@example.com',\n  notifyStatusChange: true\n});\n\n// Remove vote\nconst result = await feedbackKit.votes.unvote('feedback-id', {\n  userId: 'user_12345'\n});\n```\n\n### Comments\n\n```typescript\n// List comments\nconst comments = await feedbackKit.comments.list('feedback-id');\n\n// Add comment\nconst comment = await feedbackKit.comments.create('feedback-id', {\n  content: 'Great idea!',\n  userId: 'user_12345',\n  isAdmin: false\n});\n```\n\n### User Registration\n\n```typescript\n// Register/update user\nconst user = await feedbackKit.users.register({\n  userId: 'user_12345',\n  mrr: 9.99 // Monthly Recurring Revenue (optional)\n});\n```\n\n### Event Tracking\n\n```typescript\n// Track custom event\nawait feedbackKit.events.track({\n  eventName: 'feedback_list',\n  userId: 'user_12345',\n  properties: {\n    filter: 'feature_request'\n  }\n});\n```\n\n## Error Handling\n\n```typescript\nimport {\n  FeedbackKit,\n  AuthenticationError,\n  PaymentRequiredError,\n  ForbiddenError,\n  NotFoundError,\n  ConflictError\n} from 'feedbackkit-js';\n\ntry {\n  await feedbackKit.votes.vote('feedback-id', { userId: 'user_123' });\n} catch (error) {\n  if (error instanceof AuthenticationError) {\n    // Invalid API key (401)\n  } else if (error instanceof PaymentRequiredError) {\n    // Subscription limit exceeded (402)\n  } else if (error instanceof ForbiddenError) {\n    // Action not allowed - archived project or voting blocked (403)\n  } else if (error instanceof NotFoundError) {\n    // Feedback not found (404)\n  } else if (error instanceof ConflictError) {\n    // Already voted (409)\n  }\n}\n```\n\n## Types\n\nAll types are exported for TypeScript users:\n\n```typescript\nimport type {\n  Feedback,\n  FeedbackStatus,\n  FeedbackCategory,\n  Comment,\n  VoteResponse,\n  SDKUser,\n  TrackedEvent\n} from 'feedbackkit-js';\n```\n\n## Feedback Statuses\n\n| Status | Description | Can Vote |\n|--------|-------------|----------|\n| `pending` | New, awaiting review | Yes |\n| `approved` | Accepted for consideration | Yes |\n| `in_progress` | Being worked on | Yes |\n| `testflight` | Available in beta | Yes |\n| `completed` | Shipped | No |\n| `rejected` | Won't implement | No |\n\n## Feedback Categories\n\n| Category | Description |\n|----------|-------------|\n| `feature_request` | New functionality |\n| `bug_report` | Issue or problem |\n| `improvement` | Enhancement |\n| `other` | General feedback |\n\n## Related Packages\n\n- **Swift SDK**: [SwiftlyFeedbackKit](https://github.com/Swiftly-Developed/SwiftlyFeedbackKit)\n- **React Native**: [feedbackkit-react-native](https://www.npmjs.com/package/feedbackkit-react-native)\n- **Flutter**: Coming soon\n- **Kotlin**: Coming soon\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftly-developed%2Fswiftlyfeedbackkit-javascript-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftly-developed%2Fswiftlyfeedbackkit-javascript-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftly-developed%2Fswiftlyfeedbackkit-javascript-sdk/lists"}