Skip to content

Commit e889283

Browse files
committed
pr feedback
1 parent e29a9b9 commit e889283

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

connector/errors.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ package connector
1717
import "github.com/livekit/psrpc"
1818

1919
var (
20-
ErrMissingWhatsAppPhoneNumberId = psrpc.NewErrorf(psrpc.InvalidArgument, "whatsapp phone number id is required")
21-
ErrMissingWhatsAppToNumber = psrpc.NewErrorf(psrpc.InvalidArgument, "whatsapp to_phone_number is required")
22-
ErrMissingWhatsAppCallId = psrpc.NewErrorf(psrpc.InvalidArgument, "whatsapp call id is required")
23-
ErrMissingWhatsAppApiKey = psrpc.NewErrorf(psrpc.InvalidArgument, "whatsapp api key is required")
24-
ErrIncorrectSDPType = psrpc.NewErrorf(psrpc.InvalidArgument, "incorrect sdp type")
25-
ErrConnectorNotFound = psrpc.NewErrorf(psrpc.NotFound, "connector not found")
26-
ErrWhatsAppCallNotFound = psrpc.NewErrorf(psrpc.NotFound, "whatsapp call not found")
20+
ErrMissingWhatsAppPhoneNumberId = psrpc.NewErrorf(psrpc.InvalidArgument, "whatsapp phone number id is required")
21+
ErrMissingWhatsAppToNumber = psrpc.NewErrorf(psrpc.InvalidArgument, "whatsapp to_phone_number is required")
22+
ErrMissingWhatsAppCallId = psrpc.NewErrorf(psrpc.InvalidArgument, "whatsapp call id is required")
23+
ErrMissingWhatsAppApiKey = psrpc.NewErrorf(psrpc.InvalidArgument, "whatsapp api key is required")
24+
ErrIncorrectSDPType = psrpc.NewErrorf(psrpc.InvalidArgument, "incorrect sdp type")
25+
ErrConnectorNotFound = psrpc.NewErrorf(psrpc.NotFound, "connector not found")
26+
ErrWhatsAppCallNotFound = psrpc.NewErrorf(psrpc.NotFound, "whatsapp call not found")
27+
ErrWhatsAppCloudApiVersionNotSupported = psrpc.NewErrorf(psrpc.InvalidArgument, "whatsapp cloud api version not supported")
2728
)

protobufs/livekit_connector_whatsapp.proto

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ message DialWhatsAppCallRequest {
2929
string whatsapp_to_phone_number = 2;
3030
// The API key of the business that is initiating the call
3131
string whatsapp_api_key = 3;
32+
// WhatsApp Cloud API version, 23.0 and 24.0 are supported as of today
33+
string whatsapp_cloud_api_version = 12;
3234
// An arbitrary string you can pass in that is useful for tracking and logging purposes.
3335
string whatsapp_biz_opaque_callback_data = 4;
3436
// What LiveKit room should this participant be connected too
@@ -45,8 +47,7 @@ message DialWhatsAppCallRequest {
4547
map<string, string> participant_attributes = 10;
4648
// Country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
4749
string destination_country = 11;
48-
// Meta cloud API version
49-
float whatsapp_cloud_api_version = 12;
50+
// Next - 13
5051
}
5152

5253
message DialWhatsAppCallResponse {
@@ -79,6 +80,8 @@ message AcceptWhatsAppCallRequest {
7980
string whatsapp_phone_number_id = 1;
8081
// The API key of the business that is connecting the call
8182
string whatsapp_api_key = 2;
83+
// WhatsApp Cloud API version, 23.0 and 24.0 are supported as of today
84+
string whatsapp_cloud_api_version = 13;
8285
// Call ID sent by Meta
8386
string whatsapp_call_id = 3;
8487
// An arbitrary string you can pass in that is useful for tracking and logging purposes.
@@ -100,8 +103,7 @@ message AcceptWhatsAppCallRequest {
100103
map<string, string> participant_attributes = 11;
101104
// Country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
102105
string destination_country = 12;
103-
// Meta cloud API version
104-
float whatsapp_cloud_api_version = 13;
106+
// Next - 14
105107
}
106108

107109
message AcceptWhatsAppCallResponse {

0 commit comments

Comments
 (0)