-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Refactor KrispCall components to use new v3 API #17809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis update revises multiple KrispCall component files by updating documentation URLs to the new v3 API, incrementing version numbers, and clarifying alert messages. The base application file updates example values and switches the development base URL to v3. No functional or logic changes are introduced in any component. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/krispcall/actions/delete-contact/delete-contact.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/krispcall/actions/new-mms/new-mms.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/krispcall/actions/add-contact/add-contact.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
components/krispcall/sources/common/base.mjs (1)
11-15: Correct brand capitalization in the alert copy“KrispCall” is camel-cased elsewhere (file name, props key).
Keeping the same formatting avoids tiny UX inconsistencies.- content: "Note: Krispcall webhook triggers will emit events for changes made via the KrispCall UI, but not via the API.", + content: "Note: KrispCall webhook triggers will emit events for changes made via the KrispCall UI, but not via the API.",components/krispcall/sources/new-call-instant/new-call-instant.mjs (1)
9-9: Optional: keep version numbers in lock-stepOther instant sources are now
0.0.5, while this one is0.0.4.
Not harmful (each was bumped by +1), but a uniform patch level makes tracking easier.No change required if this is intentional.
components/krispcall/actions/add-contact/add-contact.mjs (2)
6-6: Use a canonical docs URL instead of a transient Postman sharePostman “documenter” links occasionally change or become private. If KrispCall has a stable, version-specific docs domain (e.g.
https://docs.krispcall.com/api/v3/#add-contact), prefer that to prevent future 404s.
7-7: Version bump looks good – don’t forget the changelogIncrementing to
0.0.5is consistent with the other components. Ensure the corresponding package/monorepo CHANGELOG is updated so consumers know why this patch was published.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (11)
components/krispcall/actions/add-contact/add-contact.mjs(1 hunks)components/krispcall/actions/delete-contact/delete-contact.mjs(1 hunks)components/krispcall/actions/new-mms/new-mms.mjs(1 hunks)components/krispcall/actions/new-sms/new-sms.mjs(1 hunks)components/krispcall/krispcall.app.mjs(2 hunks)components/krispcall/package.json(1 hunks)components/krispcall/sources/common/base.mjs(1 hunks)components/krispcall/sources/new-call-instant/new-call-instant.mjs(1 hunks)components/krispcall/sources/new-contact-instant/new-contact-instant.mjs(1 hunks)components/krispcall/sources/new-sms-or-mms-instant/new-sms-or-mms-instant.mjs(1 hunks)components/krispcall/sources/new-voicemail-instant/new-voicemail-instant.mjs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (9)
components/krispcall/sources/common/base.mjs (1)
35-41: VerifydeleteWebhookpayload – id vs. URL
activate()storesdata.id(a numeric/UUID hook id) in the DB, butdeactivate()sends it back ashookUrl.
If the v3 API expects the webhook ID (most APIs do), deletion will fail with a 4xx.- hookUrl: hookId, + id: hookId, # or, if the API expects the field name `hookId`: +# hookId,Please confirm the v3 API spec.
IfhookUrlis truly correct, ignore this.
Otherwise, adjust before shipping to prod.components/krispcall/package.json (1)
3-3: Patch-level bump looks goodVersion bump to
0.2.3is consistent with per-component patch bumps.
No further action needed.components/krispcall/sources/new-contact-instant/new-contact-instant.mjs (1)
9-9: LGTM – metadata onlyPatch bump to
0.0.5aligns with most other sources/actions.components/krispcall/sources/new-voicemail-instant/new-voicemail-instant.mjs (1)
9-9: LGTM – metadata onlyPatch bump to
0.0.5looks correct.components/krispcall/sources/new-sms-or-mms-instant/new-sms-or-mms-instant.mjs (1)
9-9: LGTM: Version increment is consistent with v3 API migration.The version bump from "0.0.4" to "0.0.5" aligns with the coordinated update across all KrispCall components for the v3 API migration.
components/krispcall/actions/new-mms/new-mms.mjs (1)
6-7: Documentation URL Accessibility Verified
- components/krispcall/actions/new-mms/new-mms.mjs (lines 6–7): The new Postman documentation link returns HTTP 200 and serves the expected v3 API documentation.
- Version bumped to “0.0.5” is consistent with other action components.
Changes are metadata-only and approved.
components/krispcall/actions/delete-contact/delete-contact.mjs (1)
7-8: LGTM: Consistent metadata updates for v3 API migration.The documentation URL update and version increment are consistent with the coordinated v3 API migration across all KrispCall components.
components/krispcall/krispcall.app.mjs (1)
10-10: Good UX improvement with example phone number format.Adding the example phone number format (
+16789296543) helps users understand the expected input format.components/krispcall/actions/new-sms/new-sms.mjs (1)
6-7: LGTM: Final component completes the coordinated v3 API migration.The documentation URL update and version increment complete the consistent metadata updates across all KrispCall components for the v3 API migration.
GTFalcao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Resolves #17585
@vunguyenhung Hold off on merging this one until I switch the
base_urlback from Development to Production.Summary by CodeRabbit
Documentation
Chores
Style