Skip to content

feat: Add create webhook endpoint sunco api#139

Merged
Vico1993 merged 5 commits into
mainfrom
victor.piolin/sunco-webhook
Jun 3, 2025
Merged

feat: Add create webhook endpoint sunco api#139
Vico1993 merged 5 commits into
mainfrom
victor.piolin/sunco-webhook

Conversation

@Vico1993

Copy link
Copy Markdown
Contributor

Description

This PR adds the functionality to create webhooks in the Sunshine Conversation API service.

  • Added new interfaces ISuncoWebhookResponseWebhook and ICreateSuncoWebhookResponse to model the webhook creation response.
  • Implemented createWebhook method in SunshineConversationApiService to call the API endpoint for webhook creation with specified target, triggers, and client inclusion.
  • Added unit tests in sunshine-conversation-api-service.spec.ts to verify the createWebhook method sends the correct API request.

How to manually test

  1. Ensure you have the latest version of the Sunshine Conversation API service.
  2. Call the createWebhook method on the SunshineConversationApiService instance with appropriate parameters (target URL, array of triggers, and includeClient boolean).
  3. Verify the API request is made correctly to the URL https://api.smooch.io/v1.1/apps/[appId]/webhooks with a POST method and correct JSON payload.
  4. Confirm the response contains the expected webhook details matching the new interfaces.

Include label

  • Version: Minor

Acceptation criteria

  • Added the corrected label to my pull request
  • Added/updated tests impacted by the change
  • Documentation is up-to-date (README.md / INSTALL.md)
  • Manually tested?

@Vico1993 Vico1993 self-assigned this May 28, 2025
github-actions[bot]
github-actions Bot previously approved these changes May 28, 2025

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🤖 🚀 🔥

Base automatically changed from victor.piolin/zis-bundle to main June 2, 2025 16:58
@github-actions github-actions Bot dismissed their stale review June 2, 2025 16:59

Dismiss bot.

@github-actions

github-actions Bot commented Jun 2, 2025

Copy link
Copy Markdown

Bump version from 0.9.0 to 0.10.0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🤖 🚀 🔥

@Vico1993 Vico1993 marked this pull request as ready for review June 2, 2025 17:02
@Vico1993 Vico1993 enabled auto-merge June 2, 2025 17:02
@Vico1993 Vico1993 added this pull request to the merge queue Jun 3, 2025
Merged via the queue into main with commit fc075ac Jun 3, 2025
@Vico1993 Vico1993 deleted the victor.piolin/sunco-webhook branch June 3, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants