-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(dashboard,api-service): WhatsApp Embedded Signup with inbound connection test fixes NV-8062 #11591
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
Open
scopsy
wants to merge
9
commits into
next
Choose a base branch
from
cursor/whatsapp-embedded-signup-inbound-test
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(dashboard,api-service): WhatsApp Embedded Signup with inbound connection test fixes NV-8062 #11591
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6411b15
feat(dashboard): add WhatsApp Embedded Signup with inbound connection…
scopsy 2b84db4
refactor(dashboard,api): code quality pass on WhatsApp Embedded Signup
scopsy fa72af6
chore(dashboard): fix import order and quote style from formatter
scopsy 5d2ec6f
chore(api,dashboard): deslop WhatsApp Embedded Signup
scopsy 3762249
Merge branch 'next' into cursor/whatsapp-embedded-signup-inbound-test
scopsy 1f8dc20
fix(api): narrow phone details response type in embedded signup
cursoragent 7d56edf
fix(api,dashboard): address CodeQL and Greptile review findings for e…
cursoragent 117f329
fix(api): align WhatsApp test template with embedded signup contract
cursoragent bde34fa
Merge branch 'next' into cursor/whatsapp-embedded-signup-inbound-test
scopsy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
apps/api/src/app/integrations/dtos/whatsapp-embedded-signup.dto.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | ||
| import { IsNotEmpty, IsString } from 'class-validator'; | ||
|
|
||
| import type { ConfigureWhatsAppWebhookFailure } from '../../agents/channels/whatsapp/configure-whatsapp-webhook/configure-whatsapp-webhook.usecase'; | ||
|
|
||
| export class WhatsAppEmbeddedSignupRequestDto { | ||
| @ApiProperty({ | ||
| type: String, | ||
| description: 'Authorization code returned by Meta Embedded Signup via the Facebook JS SDK', | ||
| }) | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| code: string; | ||
|
|
||
| @ApiProperty({ type: String, description: 'WhatsApp Business Account ID from the WA_EMBEDDED_SIGNUP session event' }) | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| wabaId: string; | ||
|
|
||
| @ApiProperty({ type: String, description: 'Phone number ID from the WA_EMBEDDED_SIGNUP session event' }) | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| phoneNumberId: string; | ||
|
|
||
| @ApiProperty({ type: String, description: 'Identifier of the WhatsApp integration to update' }) | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| integrationIdentifier: string; | ||
|
|
||
| @ApiProperty({ type: String, description: 'Agent identifier used to configure the webhook callback URL' }) | ||
| @IsString() | ||
| @IsNotEmpty() | ||
| agentIdentifier: string; | ||
| } | ||
|
|
||
| export type WhatsAppEmbeddedSignupFailure = { | ||
| code: | ||
| | 'feature_disabled' | ||
| | 'missing_platform_config' | ||
| | 'token_exchange_failed' | ||
| | 'meta_validation_failed' | ||
| | 'integration_not_found' | ||
| | 'phone_registration_failed' | ||
| | 'webhook_configuration_failed' | ||
| | 'unknown'; | ||
| message: string; | ||
| }; | ||
|
|
||
| export class WhatsAppEmbeddedSignupFailureDto { | ||
| @ApiProperty({ type: String }) | ||
| code: WhatsAppEmbeddedSignupFailure['code']; | ||
|
|
||
| @ApiProperty({ type: String }) | ||
| message: string; | ||
| } | ||
|
|
||
| export class WhatsAppEmbeddedSignupResponseDto { | ||
| @ApiProperty({ type: Boolean }) | ||
| success: boolean; | ||
|
|
||
| @ApiPropertyOptional({ type: String }) | ||
| integrationId?: string; | ||
|
|
||
| @ApiPropertyOptional({ type: String }) | ||
| integrationIdentifier?: string; | ||
|
|
||
| @ApiPropertyOptional({ type: String }) | ||
| callbackUrl?: string; | ||
|
|
||
| @ApiPropertyOptional({ type: String }) | ||
| wabaId?: string; | ||
|
|
||
| @ApiPropertyOptional({ | ||
| type: String, | ||
| description: 'Human-readable WhatsApp business phone number saved on the integration for onboarding deep links', | ||
| }) | ||
| displayPhoneNumber?: string; | ||
|
|
||
| @ApiPropertyOptional({ | ||
| type: String, | ||
| description: 'Present when phone registration failed but credentials were saved', | ||
| }) | ||
| phoneRegistrationWarning?: string; | ||
|
|
||
| @ApiPropertyOptional({ type: WhatsAppEmbeddedSignupFailureDto }) | ||
| error?: WhatsAppEmbeddedSignupFailure; | ||
|
|
||
| @ApiPropertyOptional({ | ||
| type: Object, | ||
| description: 'Populated when webhook auto-configure fails after credentials save', | ||
| }) | ||
| webhookReason?: ConfigureWhatsAppWebhookFailure; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Document the new API WhatsApp env vars in the example file.
Lines 67-68 add the flag toggle, but the API example still omits
NOVU_WHATSAPP_APP_IDandNOVU_WHATSAPP_APP_SECRET, which are required for the embedded-signup backend path. This can lead to silent misconfiguration in self-hosted setups.Suggested diff
🤖 Prompt for AI Agents