diff --git a/.changeset/neat-mirrors-move.md b/.changeset/neat-mirrors-move.md new file mode 100644 index 000000000..1655f4b92 --- /dev/null +++ b/.changeset/neat-mirrors-move.md @@ -0,0 +1,5 @@ +--- +"github.com/livekit/protocol": patch +--- + +Unifying data types for phone numbers diff --git a/livekit/livekit_phone_number.pb.go b/livekit/livekit_phone_number.pb.go index 43bcdadd8..50b3fcabd 100644 --- a/livekit/livekit_phone_number.pb.go +++ b/livekit/livekit_phone_number.pb.go @@ -22,65 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Telephony cost type enumeration -type TelephonyCostType int32 - -const ( - TelephonyCostType_TELEPHONY_COST_TYPE_UNSPECIFIED TelephonyCostType = 0 // Default value - TelephonyCostType_TELEPHONY_COST_TYPE_NUMBER_RENTAL TelephonyCostType = 1 // Monthly rental for the phone number - TelephonyCostType_TELEPHONY_COST_TYPE_VOICE_INBOUND TelephonyCostType = 2 // Inbound voice calls - TelephonyCostType_TELEPHONY_COST_TYPE_VOICE_OUTBOUND TelephonyCostType = 3 // Outbound voice calls - TelephonyCostType_TELEPHONY_COST_TYPE_SMS_INBOUND TelephonyCostType = 4 // Inbound SMS - TelephonyCostType_TELEPHONY_COST_TYPE_SMS_OUTBOUND TelephonyCostType = 5 // Outbound SMS -) - -// Enum value maps for TelephonyCostType. -var ( - TelephonyCostType_name = map[int32]string{ - 0: "TELEPHONY_COST_TYPE_UNSPECIFIED", - 1: "TELEPHONY_COST_TYPE_NUMBER_RENTAL", - 2: "TELEPHONY_COST_TYPE_VOICE_INBOUND", - 3: "TELEPHONY_COST_TYPE_VOICE_OUTBOUND", - 4: "TELEPHONY_COST_TYPE_SMS_INBOUND", - 5: "TELEPHONY_COST_TYPE_SMS_OUTBOUND", - } - TelephonyCostType_value = map[string]int32{ - "TELEPHONY_COST_TYPE_UNSPECIFIED": 0, - "TELEPHONY_COST_TYPE_NUMBER_RENTAL": 1, - "TELEPHONY_COST_TYPE_VOICE_INBOUND": 2, - "TELEPHONY_COST_TYPE_VOICE_OUTBOUND": 3, - "TELEPHONY_COST_TYPE_SMS_INBOUND": 4, - "TELEPHONY_COST_TYPE_SMS_OUTBOUND": 5, - } -) - -func (x TelephonyCostType) Enum() *TelephonyCostType { - p := new(TelephonyCostType) - *p = x - return p -} - -func (x TelephonyCostType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TelephonyCostType) Descriptor() protoreflect.EnumDescriptor { - return file_livekit_phone_number_proto_enumTypes[0].Descriptor() -} - -func (TelephonyCostType) Type() protoreflect.EnumType { - return &file_livekit_phone_number_proto_enumTypes[0] -} - -func (x TelephonyCostType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TelephonyCostType.Descriptor instead. -func (TelephonyCostType) EnumDescriptor() ([]byte, []int) { - return file_livekit_phone_number_proto_rawDescGZIP(), []int{0} -} - // Phone number status enumeration type PhoneNumberStatus int32 @@ -118,11 +59,11 @@ func (x PhoneNumberStatus) String() string { } func (PhoneNumberStatus) Descriptor() protoreflect.EnumDescriptor { - return file_livekit_phone_number_proto_enumTypes[1].Descriptor() + return file_livekit_phone_number_proto_enumTypes[0].Descriptor() } func (PhoneNumberStatus) Type() protoreflect.EnumType { - return &file_livekit_phone_number_proto_enumTypes[1] + return &file_livekit_phone_number_proto_enumTypes[0] } func (x PhoneNumberStatus) Number() protoreflect.EnumNumber { @@ -131,11 +72,11 @@ func (x PhoneNumberStatus) Number() protoreflect.EnumNumber { // Deprecated: Use PhoneNumberStatus.Descriptor instead. func (PhoneNumberStatus) EnumDescriptor() ([]byte, []int) { - return file_livekit_phone_number_proto_rawDescGZIP(), []int{1} + return file_livekit_phone_number_proto_rawDescGZIP(), []int{0} } -// ListPhoneNumberInventoryRequest - Request to list available phone numbers -type ListPhoneNumberInventoryRequest struct { +// SearchPhoneNumbersRequest - Request to search available phone numbers +type SearchPhoneNumbersRequest struct { state protoimpl.MessageState `protogen:"open.v1"` CountryCode string `protobuf:"bytes,1,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"` // Optional: Filter by country code (e.g., "US", "CA") AreaCode string `protobuf:"bytes,2,opt,name=area_code,json=areaCode,proto3" json:"area_code,omitempty"` // Optional: Filter by area code (e.g., "415") @@ -145,20 +86,20 @@ type ListPhoneNumberInventoryRequest struct { sizeCache protoimpl.SizeCache } -func (x *ListPhoneNumberInventoryRequest) Reset() { - *x = ListPhoneNumberInventoryRequest{} +func (x *SearchPhoneNumbersRequest) Reset() { + *x = SearchPhoneNumbersRequest{} mi := &file_livekit_phone_number_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ListPhoneNumberInventoryRequest) String() string { +func (x *SearchPhoneNumbersRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListPhoneNumberInventoryRequest) ProtoMessage() {} +func (*SearchPhoneNumbersRequest) ProtoMessage() {} -func (x *ListPhoneNumberInventoryRequest) ProtoReflect() protoreflect.Message { +func (x *SearchPhoneNumbersRequest) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -170,62 +111,62 @@ func (x *ListPhoneNumberInventoryRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListPhoneNumberInventoryRequest.ProtoReflect.Descriptor instead. -func (*ListPhoneNumberInventoryRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SearchPhoneNumbersRequest.ProtoReflect.Descriptor instead. +func (*SearchPhoneNumbersRequest) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{0} } -func (x *ListPhoneNumberInventoryRequest) GetCountryCode() string { +func (x *SearchPhoneNumbersRequest) GetCountryCode() string { if x != nil { return x.CountryCode } return "" } -func (x *ListPhoneNumberInventoryRequest) GetAreaCode() string { +func (x *SearchPhoneNumbersRequest) GetAreaCode() string { if x != nil { return x.AreaCode } return "" } -func (x *ListPhoneNumberInventoryRequest) GetLimit() int32 { +func (x *SearchPhoneNumbersRequest) GetLimit() int32 { if x != nil { return x.Limit } return 0 } -func (x *ListPhoneNumberInventoryRequest) GetPageToken() *TokenPagination { +func (x *SearchPhoneNumbersRequest) GetPageToken() *TokenPagination { if x != nil { return x.PageToken } return nil } -// ListPhoneNumberInventoryResponse - Response containing available phone numbers -type ListPhoneNumberInventoryResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Items []*PhoneNumberInventoryItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // List of available phone numbers - NextPageToken *TokenPagination `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // Token for next page (empty if no more pages) +// SearchPhoneNumbersResponse - Response containing available phone numbers +type SearchPhoneNumbersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*PhoneNumber `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // List of available phone numbers + NextPageToken *TokenPagination `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // Token for next page (empty if no more pages) unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ListPhoneNumberInventoryResponse) Reset() { - *x = ListPhoneNumberInventoryResponse{} +func (x *SearchPhoneNumbersResponse) Reset() { + *x = SearchPhoneNumbersResponse{} mi := &file_livekit_phone_number_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ListPhoneNumberInventoryResponse) String() string { +func (x *SearchPhoneNumbersResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListPhoneNumberInventoryResponse) ProtoMessage() {} +func (*SearchPhoneNumbersResponse) ProtoMessage() {} -func (x *ListPhoneNumberInventoryResponse) ProtoReflect() protoreflect.Message { +func (x *SearchPhoneNumbersResponse) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -237,19 +178,19 @@ func (x *ListPhoneNumberInventoryResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListPhoneNumberInventoryResponse.ProtoReflect.Descriptor instead. -func (*ListPhoneNumberInventoryResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SearchPhoneNumbersResponse.ProtoReflect.Descriptor instead. +func (*SearchPhoneNumbersResponse) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{1} } -func (x *ListPhoneNumberInventoryResponse) GetItems() []*PhoneNumberInventoryItem { +func (x *SearchPhoneNumbersResponse) GetItems() []*PhoneNumber { if x != nil { return x.Items } return nil } -func (x *ListPhoneNumberInventoryResponse) GetNextPageToken() *TokenPagination { +func (x *SearchPhoneNumbersResponse) GetNextPageToken() *TokenPagination { if x != nil { return x.NextPageToken } @@ -311,8 +252,8 @@ func (x *PurchasePhoneNumberRequest) GetSipDispatchRuleId() string { // PurchasePhoneNumberResponse - Response containing the purchased phone numbers type PurchasePhoneNumberResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - PhoneNumbers []*PurchasedPhoneNumber `protobuf:"bytes,1,rep,name=phone_numbers,json=phoneNumbers,proto3" json:"phone_numbers,omitempty"` // Details of the purchased phone numbers + state protoimpl.MessageState `protogen:"open.v1"` + PhoneNumbers []*PhoneNumber `protobuf:"bytes,1,rep,name=phone_numbers,json=phoneNumbers,proto3" json:"phone_numbers,omitempty"` // Details of the purchased phone numbers unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -347,15 +288,15 @@ func (*PurchasePhoneNumberResponse) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{3} } -func (x *PurchasePhoneNumberResponse) GetPhoneNumbers() []*PurchasedPhoneNumber { +func (x *PurchasePhoneNumberResponse) GetPhoneNumbers() []*PhoneNumber { if x != nil { return x.PhoneNumbers } return nil } -// ListPurchasedPhoneNumbersRequest - Request to list purchased phone numbers -type ListPurchasedPhoneNumbersRequest struct { +// ListPhoneNumbersRequest - Request to list phone numbers +type ListPhoneNumbersRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` // Optional: Maximum number of results (default: 50) Status PhoneNumberStatus `protobuf:"varint,2,opt,name=status,proto3,enum=livekit.PhoneNumberStatus" json:"status,omitempty"` // Optional: Filter by status (active, pending, released) @@ -365,20 +306,20 @@ type ListPurchasedPhoneNumbersRequest struct { sizeCache protoimpl.SizeCache } -func (x *ListPurchasedPhoneNumbersRequest) Reset() { - *x = ListPurchasedPhoneNumbersRequest{} +func (x *ListPhoneNumbersRequest) Reset() { + *x = ListPhoneNumbersRequest{} mi := &file_livekit_phone_number_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ListPurchasedPhoneNumbersRequest) String() string { +func (x *ListPhoneNumbersRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListPurchasedPhoneNumbersRequest) ProtoMessage() {} +func (*ListPhoneNumbersRequest) ProtoMessage() {} -func (x *ListPurchasedPhoneNumbersRequest) ProtoReflect() protoreflect.Message { +func (x *ListPhoneNumbersRequest) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -390,63 +331,63 @@ func (x *ListPurchasedPhoneNumbersRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListPurchasedPhoneNumbersRequest.ProtoReflect.Descriptor instead. -func (*ListPurchasedPhoneNumbersRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListPhoneNumbersRequest.ProtoReflect.Descriptor instead. +func (*ListPhoneNumbersRequest) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{4} } -func (x *ListPurchasedPhoneNumbersRequest) GetLimit() int32 { +func (x *ListPhoneNumbersRequest) GetLimit() int32 { if x != nil { return x.Limit } return 0 } -func (x *ListPurchasedPhoneNumbersRequest) GetStatus() PhoneNumberStatus { +func (x *ListPhoneNumbersRequest) GetStatus() PhoneNumberStatus { if x != nil { return x.Status } return PhoneNumberStatus_PHONE_NUMBER_STATUS_UNSPECIFIED } -func (x *ListPurchasedPhoneNumbersRequest) GetPageToken() *TokenPagination { +func (x *ListPhoneNumbersRequest) GetPageToken() *TokenPagination { if x != nil { return x.PageToken } return nil } -func (x *ListPurchasedPhoneNumbersRequest) GetSipDispatchRuleId() string { +func (x *ListPhoneNumbersRequest) GetSipDispatchRuleId() string { if x != nil { return x.SipDispatchRuleId } return "" } -// ListPurchasedPhoneNumbersResponse - Response containing purchased phone numbers -type ListPurchasedPhoneNumbersResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Items []*PurchasedPhoneNumber `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // List of purchased phone numbers - NextPageToken *TokenPagination `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // Token for next page (empty if no more pages) - TotalCount int32 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` // Total number of purchased phone numbers +// ListPhoneNumbersResponse - Response containing phone numbers +type ListPhoneNumbersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Items []*PhoneNumber `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // List of phone numbers + NextPageToken *TokenPagination `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // Token for next page (empty if no more pages) + TotalCount int32 `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` // Total number of phone numbers unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ListPurchasedPhoneNumbersResponse) Reset() { - *x = ListPurchasedPhoneNumbersResponse{} +func (x *ListPhoneNumbersResponse) Reset() { + *x = ListPhoneNumbersResponse{} mi := &file_livekit_phone_number_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ListPurchasedPhoneNumbersResponse) String() string { +func (x *ListPhoneNumbersResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListPurchasedPhoneNumbersResponse) ProtoMessage() {} +func (*ListPhoneNumbersResponse) ProtoMessage() {} -func (x *ListPurchasedPhoneNumbersResponse) ProtoReflect() protoreflect.Message { +func (x *ListPhoneNumbersResponse) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -458,55 +399,55 @@ func (x *ListPurchasedPhoneNumbersResponse) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use ListPurchasedPhoneNumbersResponse.ProtoReflect.Descriptor instead. -func (*ListPurchasedPhoneNumbersResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListPhoneNumbersResponse.ProtoReflect.Descriptor instead. +func (*ListPhoneNumbersResponse) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{5} } -func (x *ListPurchasedPhoneNumbersResponse) GetItems() []*PurchasedPhoneNumber { +func (x *ListPhoneNumbersResponse) GetItems() []*PhoneNumber { if x != nil { return x.Items } return nil } -func (x *ListPurchasedPhoneNumbersResponse) GetNextPageToken() *TokenPagination { +func (x *ListPhoneNumbersResponse) GetNextPageToken() *TokenPagination { if x != nil { return x.NextPageToken } return nil } -func (x *ListPurchasedPhoneNumbersResponse) GetTotalCount() int32 { +func (x *ListPhoneNumbersResponse) GetTotalCount() int32 { if x != nil { return x.TotalCount } return 0 } -// GetPurchasedPhoneNumberRequest - Request to get a purchased phone number -type GetPurchasedPhoneNumberRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PurchasedPhoneNumberId string `protobuf:"bytes,1,opt,name=purchased_phone_number_id,json=purchasedPhoneNumberId,proto3" json:"purchased_phone_number_id,omitempty"` // Optional: Use purchased phone number ID for direct lookup - PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // Optional: Use phone number string for lookup - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// GetPhoneNumberRequest - Request to get a phone number +type GetPhoneNumberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Optional: Use phone number ID for direct lookup + PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // Optional: Use phone number string for lookup + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GetPurchasedPhoneNumberRequest) Reset() { - *x = GetPurchasedPhoneNumberRequest{} +func (x *GetPhoneNumberRequest) Reset() { + *x = GetPhoneNumberRequest{} mi := &file_livekit_phone_number_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetPurchasedPhoneNumberRequest) String() string { +func (x *GetPhoneNumberRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPurchasedPhoneNumberRequest) ProtoMessage() {} +func (*GetPhoneNumberRequest) ProtoMessage() {} -func (x *GetPurchasedPhoneNumberRequest) ProtoReflect() protoreflect.Message { +func (x *GetPhoneNumberRequest) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -518,47 +459,47 @@ func (x *GetPurchasedPhoneNumberRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPurchasedPhoneNumberRequest.ProtoReflect.Descriptor instead. -func (*GetPurchasedPhoneNumberRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetPhoneNumberRequest.ProtoReflect.Descriptor instead. +func (*GetPhoneNumberRequest) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{6} } -func (x *GetPurchasedPhoneNumberRequest) GetPurchasedPhoneNumberId() string { +func (x *GetPhoneNumberRequest) GetId() string { if x != nil { - return x.PurchasedPhoneNumberId + return x.Id } return "" } -func (x *GetPurchasedPhoneNumberRequest) GetPhoneNumber() string { +func (x *GetPhoneNumberRequest) GetPhoneNumber() string { if x != nil { return x.PhoneNumber } return "" } -// GetPurchasedPhoneNumberResponse - Response containing the purchased phone number -type GetPurchasedPhoneNumberResponse struct { +// GetPhoneNumberResponse - Response containing the phone number +type GetPhoneNumberResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - PhoneNumber *PurchasedPhoneNumber `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // The purchased phone number details + PhoneNumber *PhoneNumber `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // The phone number details unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *GetPurchasedPhoneNumberResponse) Reset() { - *x = GetPurchasedPhoneNumberResponse{} +func (x *GetPhoneNumberResponse) Reset() { + *x = GetPhoneNumberResponse{} mi := &file_livekit_phone_number_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetPurchasedPhoneNumberResponse) String() string { +func (x *GetPhoneNumberResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPurchasedPhoneNumberResponse) ProtoMessage() {} +func (*GetPhoneNumberResponse) ProtoMessage() {} -func (x *GetPurchasedPhoneNumberResponse) ProtoReflect() protoreflect.Message { +func (x *GetPhoneNumberResponse) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -570,42 +511,42 @@ func (x *GetPurchasedPhoneNumberResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPurchasedPhoneNumberResponse.ProtoReflect.Descriptor instead. -func (*GetPurchasedPhoneNumberResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetPhoneNumberResponse.ProtoReflect.Descriptor instead. +func (*GetPhoneNumberResponse) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{7} } -func (x *GetPurchasedPhoneNumberResponse) GetPhoneNumber() *PurchasedPhoneNumber { +func (x *GetPhoneNumberResponse) GetPhoneNumber() *PhoneNumber { if x != nil { return x.PhoneNumber } return nil } -// UpdatePurchasedPhoneNumberRequest - Request to update a purchased phone number -type UpdatePurchasedPhoneNumberRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PurchasedPhoneNumberId string `protobuf:"bytes,1,opt,name=purchased_phone_number_id,json=purchasedPhoneNumberId,proto3" json:"purchased_phone_number_id,omitempty"` // Optional: Use purchased phone number ID for direct lookup - PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // Optional: Use phone number string for lookup - SipDispatchRuleId string `protobuf:"bytes,3,opt,name=sip_dispatch_rule_id,json=sipDispatchRuleId,proto3" json:"sip_dispatch_rule_id,omitempty"` // Optional: SIP dispatch rule ID to assign to the phone number - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// UpdatePhoneNumberRequest - Request to update a phone number +type UpdatePhoneNumberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Optional: Use phone number ID for direct lookup + PhoneNumber string `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // Optional: Use phone number string for lookup + SipDispatchRuleId string `protobuf:"bytes,3,opt,name=sip_dispatch_rule_id,json=sipDispatchRuleId,proto3" json:"sip_dispatch_rule_id,omitempty"` // Optional: SIP dispatch rule ID to assign to the phone number + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *UpdatePurchasedPhoneNumberRequest) Reset() { - *x = UpdatePurchasedPhoneNumberRequest{} +func (x *UpdatePhoneNumberRequest) Reset() { + *x = UpdatePhoneNumberRequest{} mi := &file_livekit_phone_number_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *UpdatePurchasedPhoneNumberRequest) String() string { +func (x *UpdatePhoneNumberRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdatePurchasedPhoneNumberRequest) ProtoMessage() {} +func (*UpdatePhoneNumberRequest) ProtoMessage() {} -func (x *UpdatePurchasedPhoneNumberRequest) ProtoReflect() protoreflect.Message { +func (x *UpdatePhoneNumberRequest) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -617,54 +558,54 @@ func (x *UpdatePurchasedPhoneNumberRequest) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use UpdatePurchasedPhoneNumberRequest.ProtoReflect.Descriptor instead. -func (*UpdatePurchasedPhoneNumberRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdatePhoneNumberRequest.ProtoReflect.Descriptor instead. +func (*UpdatePhoneNumberRequest) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{8} } -func (x *UpdatePurchasedPhoneNumberRequest) GetPurchasedPhoneNumberId() string { +func (x *UpdatePhoneNumberRequest) GetId() string { if x != nil { - return x.PurchasedPhoneNumberId + return x.Id } return "" } -func (x *UpdatePurchasedPhoneNumberRequest) GetPhoneNumber() string { +func (x *UpdatePhoneNumberRequest) GetPhoneNumber() string { if x != nil { return x.PhoneNumber } return "" } -func (x *UpdatePurchasedPhoneNumberRequest) GetSipDispatchRuleId() string { +func (x *UpdatePhoneNumberRequest) GetSipDispatchRuleId() string { if x != nil { return x.SipDispatchRuleId } return "" } -// UpdatePurchasedPhoneNumberResponse - Response containing the updated purchased phone number -type UpdatePurchasedPhoneNumberResponse struct { +// UpdatePhoneNumberResponse - Response containing the updated phone number +type UpdatePhoneNumberResponse struct { state protoimpl.MessageState `protogen:"open.v1"` - PhoneNumber *PurchasedPhoneNumber `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // The updated purchased phone number details + PhoneNumber *PhoneNumber `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // The updated phone number details unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *UpdatePurchasedPhoneNumberResponse) Reset() { - *x = UpdatePurchasedPhoneNumberResponse{} +func (x *UpdatePhoneNumberResponse) Reset() { + *x = UpdatePhoneNumberResponse{} mi := &file_livekit_phone_number_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *UpdatePurchasedPhoneNumberResponse) String() string { +func (x *UpdatePhoneNumberResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdatePurchasedPhoneNumberResponse) ProtoMessage() {} +func (*UpdatePhoneNumberResponse) ProtoMessage() {} -func (x *UpdatePurchasedPhoneNumberResponse) ProtoReflect() protoreflect.Message { +func (x *UpdatePhoneNumberResponse) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -676,41 +617,41 @@ func (x *UpdatePurchasedPhoneNumberResponse) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use UpdatePurchasedPhoneNumberResponse.ProtoReflect.Descriptor instead. -func (*UpdatePurchasedPhoneNumberResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdatePhoneNumberResponse.ProtoReflect.Descriptor instead. +func (*UpdatePhoneNumberResponse) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{9} } -func (x *UpdatePurchasedPhoneNumberResponse) GetPhoneNumber() *PurchasedPhoneNumber { +func (x *UpdatePhoneNumberResponse) GetPhoneNumber() *PhoneNumber { if x != nil { return x.PhoneNumber } return nil } -// ReleasePurchasedPhoneNumbersRequest - Request to release purchased phone numbers -type ReleasePurchasedPhoneNumbersRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - PurchasedPhoneNumberIds []string `protobuf:"bytes,1,rep,name=purchased_phone_number_ids,json=purchasedPhoneNumberIds,proto3" json:"purchased_phone_number_ids,omitempty"` // Optional: Use purchased phone number IDs for direct lookup - PhoneNumbers []string `protobuf:"bytes,2,rep,name=phone_numbers,json=phoneNumbers,proto3" json:"phone_numbers,omitempty"` // Optional: Use phone number strings for lookup - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// ReleasePhoneNumbersRequest - Request to release phone numbers +type ReleasePhoneNumbersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // Optional: Use phone number IDs for direct lookup + PhoneNumbers []string `protobuf:"bytes,2,rep,name=phone_numbers,json=phoneNumbers,proto3" json:"phone_numbers,omitempty"` // Optional: Use phone number strings for lookup + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *ReleasePurchasedPhoneNumbersRequest) Reset() { - *x = ReleasePurchasedPhoneNumbersRequest{} +func (x *ReleasePhoneNumbersRequest) Reset() { + *x = ReleasePhoneNumbersRequest{} mi := &file_livekit_phone_number_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ReleasePurchasedPhoneNumbersRequest) String() string { +func (x *ReleasePhoneNumbersRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ReleasePurchasedPhoneNumbersRequest) ProtoMessage() {} +func (*ReleasePhoneNumbersRequest) ProtoMessage() {} -func (x *ReleasePurchasedPhoneNumbersRequest) ProtoReflect() protoreflect.Message { +func (x *ReleasePhoneNumbersRequest) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -722,46 +663,46 @@ func (x *ReleasePurchasedPhoneNumbersRequest) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use ReleasePurchasedPhoneNumbersRequest.ProtoReflect.Descriptor instead. -func (*ReleasePurchasedPhoneNumbersRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ReleasePhoneNumbersRequest.ProtoReflect.Descriptor instead. +func (*ReleasePhoneNumbersRequest) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{10} } -func (x *ReleasePurchasedPhoneNumbersRequest) GetPurchasedPhoneNumberIds() []string { +func (x *ReleasePhoneNumbersRequest) GetIds() []string { if x != nil { - return x.PurchasedPhoneNumberIds + return x.Ids } return nil } -func (x *ReleasePurchasedPhoneNumbersRequest) GetPhoneNumbers() []string { +func (x *ReleasePhoneNumbersRequest) GetPhoneNumbers() []string { if x != nil { return x.PhoneNumbers } return nil } -// ReleasePurchasedPhoneNumbersResponse - Response for releasing purchased phone numbers -type ReleasePurchasedPhoneNumbersResponse struct { +// ReleasePhoneNumbersResponse - Response for releasing phone numbers +type ReleasePhoneNumbersResponse struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ReleasePurchasedPhoneNumbersResponse) Reset() { - *x = ReleasePurchasedPhoneNumbersResponse{} +func (x *ReleasePhoneNumbersResponse) Reset() { + *x = ReleasePhoneNumbersResponse{} mi := &file_livekit_phone_number_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ReleasePurchasedPhoneNumbersResponse) String() string { +func (x *ReleasePhoneNumbersResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ReleasePurchasedPhoneNumbersResponse) ProtoMessage() {} +func (*ReleasePhoneNumbersResponse) ProtoMessage() {} -func (x *ReleasePurchasedPhoneNumbersResponse) ProtoReflect() protoreflect.Message { +func (x *ReleasePhoneNumbersResponse) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -773,42 +714,47 @@ func (x *ReleasePurchasedPhoneNumbersResponse) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use ReleasePurchasedPhoneNumbersResponse.ProtoReflect.Descriptor instead. -func (*ReleasePurchasedPhoneNumbersResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ReleasePhoneNumbersResponse.ProtoReflect.Descriptor instead. +func (*ReleasePhoneNumbersResponse) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{11} } -// GlobalPhoneNumber represents a phone number with standardized format -type GlobalPhoneNumber struct { - state protoimpl.MessageState `protogen:"open.v1"` - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // unique identifier - E164Format string `protobuf:"bytes,2,opt,name=e164_format,json=e164Format,proto3" json:"e164_format,omitempty"` // e.g., "+14155552671" - CountryCode string `protobuf:"bytes,3,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"` // e.g., "US" - AreaCode string `protobuf:"bytes,4,opt,name=area_code,json=areaCode,proto3" json:"area_code,omitempty"` // e.g., "415" - NumberType string `protobuf:"bytes,5,opt,name=number_type,json=numberType,proto3" json:"number_type,omitempty"` // e.g., local, toll-free, national, mobile - Locality string `protobuf:"bytes,6,opt,name=locality,proto3" json:"locality,omitempty"` // City/locality (e.g., "San Francisco") - Region string `protobuf:"bytes,7,opt,name=region,proto3" json:"region,omitempty"` // State/region (e.g., "CA") - SpamScore float64 `protobuf:"fixed64,8,opt,name=spam_score,json=spamScore,proto3" json:"spam_score,omitempty"` // can be used later for fraud detection - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // timestamp when created - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // timestamp when updated - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache +// PhoneNumber - Unified phone number type for inventory and purchased numbers +type PhoneNumber struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier + E164Format string `protobuf:"bytes,2,opt,name=e164_format,json=e164Format,proto3" json:"e164_format,omitempty"` // Phone number in E.164 format (e.g., "+14155552671") + CountryCode string `protobuf:"bytes,3,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"` // Country code (e.g., "US") + AreaCode string `protobuf:"bytes,4,opt,name=area_code,json=areaCode,proto3" json:"area_code,omitempty"` // Area code (e.g., "415") + NumberType string `protobuf:"bytes,5,opt,name=number_type,json=numberType,proto3" json:"number_type,omitempty"` // Number type (e.g., local, toll-free, national, mobile) + Locality string `protobuf:"bytes,6,opt,name=locality,proto3" json:"locality,omitempty"` // City/locality (e.g., "San Francisco") + Region string `protobuf:"bytes,7,opt,name=region,proto3" json:"region,omitempty"` // State/region (e.g., "CA") + SpamScore float64 `protobuf:"fixed64,8,opt,name=spam_score,json=spamScore,proto3" json:"spam_score,omitempty"` // Spam score for fraud detection + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Creation timestamp + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Last update timestamp + Capabilities []string `protobuf:"bytes,11,rep,name=capabilities,proto3" json:"capabilities,omitempty"` // Available capabilities (e.g., "voice", "sms") + Status PhoneNumberStatus `protobuf:"varint,12,opt,name=status,proto3,enum=livekit.PhoneNumberStatus" json:"status,omitempty"` // Current status + AssignedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=assigned_at,json=assignedAt,proto3" json:"assigned_at,omitempty"` // Assignment timestamp + ReleasedAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=released_at,json=releasedAt,proto3" json:"released_at,omitempty"` // Release timestamp (if applicable) + SipDispatchRuleId string `protobuf:"bytes,15,opt,name=sip_dispatch_rule_id,json=sipDispatchRuleId,proto3" json:"sip_dispatch_rule_id,omitempty"` // Associated SIP dispatch rule ID + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (x *GlobalPhoneNumber) Reset() { - *x = GlobalPhoneNumber{} +func (x *PhoneNumber) Reset() { + *x = PhoneNumber{} mi := &file_livekit_phone_number_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GlobalPhoneNumber) String() string { +func (x *PhoneNumber) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GlobalPhoneNumber) ProtoMessage() {} +func (*PhoneNumber) ProtoMessage() {} -func (x *GlobalPhoneNumber) ProtoReflect() protoreflect.Message { +func (x *PhoneNumber) ProtoReflect() protoreflect.Message { mi := &file_livekit_phone_number_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -820,290 +766,110 @@ func (x *GlobalPhoneNumber) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GlobalPhoneNumber.ProtoReflect.Descriptor instead. -func (*GlobalPhoneNumber) Descriptor() ([]byte, []int) { +// Deprecated: Use PhoneNumber.ProtoReflect.Descriptor instead. +func (*PhoneNumber) Descriptor() ([]byte, []int) { return file_livekit_phone_number_proto_rawDescGZIP(), []int{12} } -func (x *GlobalPhoneNumber) GetId() string { +func (x *PhoneNumber) GetId() string { if x != nil { return x.Id } return "" } -func (x *GlobalPhoneNumber) GetE164Format() string { +func (x *PhoneNumber) GetE164Format() string { if x != nil { return x.E164Format } return "" } -func (x *GlobalPhoneNumber) GetCountryCode() string { +func (x *PhoneNumber) GetCountryCode() string { if x != nil { return x.CountryCode } return "" } -func (x *GlobalPhoneNumber) GetAreaCode() string { +func (x *PhoneNumber) GetAreaCode() string { if x != nil { return x.AreaCode } return "" } -func (x *GlobalPhoneNumber) GetNumberType() string { +func (x *PhoneNumber) GetNumberType() string { if x != nil { return x.NumberType } return "" } -func (x *GlobalPhoneNumber) GetLocality() string { +func (x *PhoneNumber) GetLocality() string { if x != nil { return x.Locality } return "" } -func (x *GlobalPhoneNumber) GetRegion() string { +func (x *PhoneNumber) GetRegion() string { if x != nil { return x.Region } return "" } -func (x *GlobalPhoneNumber) GetSpamScore() float64 { +func (x *PhoneNumber) GetSpamScore() float64 { if x != nil { return x.SpamScore } return 0 } -func (x *GlobalPhoneNumber) GetCreatedAt() *timestamppb.Timestamp { +func (x *PhoneNumber) GetCreatedAt() *timestamppb.Timestamp { if x != nil { return x.CreatedAt } return nil } -func (x *GlobalPhoneNumber) GetUpdatedAt() *timestamppb.Timestamp { +func (x *PhoneNumber) GetUpdatedAt() *timestamppb.Timestamp { if x != nil { return x.UpdatedAt } return nil } -// TelephonyCost represents the pricing structure for a specific telephony service -type TelephonyCost struct { - state protoimpl.MessageState `protogen:"open.v1"` - Resource TelephonyCostType `protobuf:"varint,1,opt,name=resource,proto3,enum=livekit.TelephonyCostType" json:"resource,omitempty"` // Type of telephony service - Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` // Currency code (e.g., "USD", "EUR") - Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"` // Price for this service - BillingUnit string `protobuf:"bytes,4,opt,name=billing_unit,json=billingUnit,proto3" json:"billing_unit,omitempty"` // Billing unit (e.g., "month", "minute", "message", "call") - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TelephonyCost) Reset() { - *x = TelephonyCost{} - mi := &file_livekit_phone_number_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TelephonyCost) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TelephonyCost) ProtoMessage() {} - -func (x *TelephonyCost) ProtoReflect() protoreflect.Message { - mi := &file_livekit_phone_number_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TelephonyCost.ProtoReflect.Descriptor instead. -func (*TelephonyCost) Descriptor() ([]byte, []int) { - return file_livekit_phone_number_proto_rawDescGZIP(), []int{13} -} - -func (x *TelephonyCost) GetResource() TelephonyCostType { - if x != nil { - return x.Resource - } - return TelephonyCostType_TELEPHONY_COST_TYPE_UNSPECIFIED -} - -func (x *TelephonyCost) GetCurrency() string { - if x != nil { - return x.Currency - } - return "" -} - -func (x *TelephonyCost) GetPrice() float64 { - if x != nil { - return x.Price - } - return 0 -} - -func (x *TelephonyCost) GetBillingUnit() string { - if x != nil { - return x.BillingUnit - } - return "" -} - -// PhoneNumberInventoryItem - Represents an available phone number for purchase -type PhoneNumberInventoryItem struct { - state protoimpl.MessageState `protogen:"open.v1"` - PhoneNumber *GlobalPhoneNumber `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // Common phone number fields - Capabilities []string `protobuf:"bytes,2,rep,name=capabilities,proto3" json:"capabilities,omitempty"` // Comma-separated capabilities (e.g., "voice,sms") - Costs []*TelephonyCost `protobuf:"bytes,3,rep,name=costs,proto3" json:"costs,omitempty"` // Array of costs for different services - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PhoneNumberInventoryItem) Reset() { - *x = PhoneNumberInventoryItem{} - mi := &file_livekit_phone_number_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PhoneNumberInventoryItem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PhoneNumberInventoryItem) ProtoMessage() {} - -func (x *PhoneNumberInventoryItem) ProtoReflect() protoreflect.Message { - mi := &file_livekit_phone_number_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PhoneNumberInventoryItem.ProtoReflect.Descriptor instead. -func (*PhoneNumberInventoryItem) Descriptor() ([]byte, []int) { - return file_livekit_phone_number_proto_rawDescGZIP(), []int{14} -} - -func (x *PhoneNumberInventoryItem) GetPhoneNumber() *GlobalPhoneNumber { - if x != nil { - return x.PhoneNumber - } - return nil -} - -func (x *PhoneNumberInventoryItem) GetCapabilities() []string { +func (x *PhoneNumber) GetCapabilities() []string { if x != nil { return x.Capabilities } return nil } -func (x *PhoneNumberInventoryItem) GetCosts() []*TelephonyCost { - if x != nil { - return x.Costs - } - return nil -} - -// PurchasedPhoneNumber - Represents a phone number owned by a LiveKit project -type PurchasedPhoneNumber struct { - state protoimpl.MessageState `protogen:"open.v1"` - PurchasedPhoneNumberId string `protobuf:"bytes,1,opt,name=purchased_phone_number_id,json=purchasedPhoneNumberId,proto3" json:"purchased_phone_number_id,omitempty"` // Unique identifier for the purchased phone number - PhoneNumber *GlobalPhoneNumber `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // Common phone number fields - Status PhoneNumberStatus `protobuf:"varint,3,opt,name=status,proto3,enum=livekit.PhoneNumberStatus" json:"status,omitempty"` // Current status of the phone number - AssignedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=assigned_at,json=assignedAt,proto3" json:"assigned_at,omitempty"` // Timestamp when the number was assigned - ReleasedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=released_at,json=releasedAt,proto3" json:"released_at,omitempty"` // Timestamp when the number was released (if applicable) - SipDispatchRuleId string `protobuf:"bytes,6,opt,name=sip_dispatch_rule_id,json=sipDispatchRuleId,proto3" json:"sip_dispatch_rule_id,omitempty"` // Optional: Associated SIP dispatch rule - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PurchasedPhoneNumber) Reset() { - *x = PurchasedPhoneNumber{} - mi := &file_livekit_phone_number_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PurchasedPhoneNumber) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PurchasedPhoneNumber) ProtoMessage() {} - -func (x *PurchasedPhoneNumber) ProtoReflect() protoreflect.Message { - mi := &file_livekit_phone_number_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PurchasedPhoneNumber.ProtoReflect.Descriptor instead. -func (*PurchasedPhoneNumber) Descriptor() ([]byte, []int) { - return file_livekit_phone_number_proto_rawDescGZIP(), []int{15} -} - -func (x *PurchasedPhoneNumber) GetPurchasedPhoneNumberId() string { - if x != nil { - return x.PurchasedPhoneNumberId - } - return "" -} - -func (x *PurchasedPhoneNumber) GetPhoneNumber() *GlobalPhoneNumber { - if x != nil { - return x.PhoneNumber - } - return nil -} - -func (x *PurchasedPhoneNumber) GetStatus() PhoneNumberStatus { +func (x *PhoneNumber) GetStatus() PhoneNumberStatus { if x != nil { return x.Status } return PhoneNumberStatus_PHONE_NUMBER_STATUS_UNSPECIFIED } -func (x *PurchasedPhoneNumber) GetAssignedAt() *timestamppb.Timestamp { +func (x *PhoneNumber) GetAssignedAt() *timestamppb.Timestamp { if x != nil { return x.AssignedAt } return nil } -func (x *PurchasedPhoneNumber) GetReleasedAt() *timestamppb.Timestamp { +func (x *PhoneNumber) GetReleasedAt() *timestamppb.Timestamp { if x != nil { return x.ReleasedAt } return nil } -func (x *PurchasedPhoneNumber) GetSipDispatchRuleId() string { +func (x *PhoneNumber) GetSipDispatchRuleId() string { if x != nil { return x.SipDispatchRuleId } @@ -1114,48 +880,48 @@ var File_livekit_phone_number_proto protoreflect.FileDescriptor const file_livekit_phone_number_proto_rawDesc = "" + "\n" + - "\x1alivekit_phone_number.proto\x12\alivekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14livekit_models.proto\"\xb0\x01\n" + - "\x1fListPhoneNumberInventoryRequest\x12!\n" + + "\x1alivekit_phone_number.proto\x12\alivekit\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x14livekit_models.proto\"\xaa\x01\n" + + "\x19SearchPhoneNumbersRequest\x12!\n" + "\fcountry_code\x18\x01 \x01(\tR\vcountryCode\x12\x1b\n" + "\tarea_code\x18\x02 \x01(\tR\bareaCode\x12\x14\n" + "\x05limit\x18\x03 \x01(\x05R\x05limit\x127\n" + "\n" + - "page_token\x18\x04 \x01(\v2\x18.livekit.TokenPaginationR\tpageToken\"\x9d\x01\n" + - " ListPhoneNumberInventoryResponse\x127\n" + - "\x05items\x18\x01 \x03(\v2!.livekit.PhoneNumberInventoryItemR\x05items\x12@\n" + + "page_token\x18\x04 \x01(\v2\x18.livekit.TokenPaginationR\tpageToken\"\x8a\x01\n" + + "\x1aSearchPhoneNumbersResponse\x12*\n" + + "\x05items\x18\x01 \x03(\v2\x14.livekit.PhoneNumberR\x05items\x12@\n" + "\x0fnext_page_token\x18\x02 \x01(\v2\x18.livekit.TokenPaginationR\rnextPageToken\"r\n" + "\x1aPurchasePhoneNumberRequest\x12#\n" + "\rphone_numbers\x18\x01 \x03(\tR\fphoneNumbers\x12/\n" + - "\x14sip_dispatch_rule_id\x18\x02 \x01(\tR\x11sipDispatchRuleId\"a\n" + - "\x1bPurchasePhoneNumberResponse\x12B\n" + - "\rphone_numbers\x18\x01 \x03(\v2\x1d.livekit.PurchasedPhoneNumberR\fphoneNumbers\"\xd6\x01\n" + - " ListPurchasedPhoneNumbersRequest\x12\x14\n" + + "\x14sip_dispatch_rule_id\x18\x02 \x01(\tR\x11sipDispatchRuleId\"X\n" + + "\x1bPurchasePhoneNumberResponse\x129\n" + + "\rphone_numbers\x18\x01 \x03(\v2\x14.livekit.PhoneNumberR\fphoneNumbers\"\xcd\x01\n" + + "\x17ListPhoneNumbersRequest\x12\x14\n" + "\x05limit\x18\x01 \x01(\x05R\x05limit\x122\n" + "\x06status\x18\x02 \x01(\x0e2\x1a.livekit.PhoneNumberStatusR\x06status\x127\n" + "\n" + "page_token\x18\x03 \x01(\v2\x18.livekit.TokenPaginationR\tpageToken\x12/\n" + - "\x14sip_dispatch_rule_id\x18\x04 \x01(\tR\x11sipDispatchRuleId\"\xbb\x01\n" + - "!ListPurchasedPhoneNumbersResponse\x123\n" + - "\x05items\x18\x01 \x03(\v2\x1d.livekit.PurchasedPhoneNumberR\x05items\x12@\n" + + "\x14sip_dispatch_rule_id\x18\x04 \x01(\tR\x11sipDispatchRuleId\"\xa9\x01\n" + + "\x18ListPhoneNumbersResponse\x12*\n" + + "\x05items\x18\x01 \x03(\v2\x14.livekit.PhoneNumberR\x05items\x12@\n" + "\x0fnext_page_token\x18\x02 \x01(\v2\x18.livekit.TokenPaginationR\rnextPageToken\x12\x1f\n" + "\vtotal_count\x18\x03 \x01(\x05R\n" + - "totalCount\"~\n" + - "\x1eGetPurchasedPhoneNumberRequest\x129\n" + - "\x19purchased_phone_number_id\x18\x01 \x01(\tR\x16purchasedPhoneNumberId\x12!\n" + - "\fphone_number\x18\x02 \x01(\tR\vphoneNumber\"c\n" + - "\x1fGetPurchasedPhoneNumberResponse\x12@\n" + - "\fphone_number\x18\x01 \x01(\v2\x1d.livekit.PurchasedPhoneNumberR\vphoneNumber\"\xb2\x01\n" + - "!UpdatePurchasedPhoneNumberRequest\x129\n" + - "\x19purchased_phone_number_id\x18\x01 \x01(\tR\x16purchasedPhoneNumberId\x12!\n" + + "totalCount\"J\n" + + "\x15GetPhoneNumberRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12!\n" + + "\fphone_number\x18\x02 \x01(\tR\vphoneNumber\"Q\n" + + "\x16GetPhoneNumberResponse\x127\n" + + "\fphone_number\x18\x01 \x01(\v2\x14.livekit.PhoneNumberR\vphoneNumber\"~\n" + + "\x18UpdatePhoneNumberRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12!\n" + "\fphone_number\x18\x02 \x01(\tR\vphoneNumber\x12/\n" + - "\x14sip_dispatch_rule_id\x18\x03 \x01(\tR\x11sipDispatchRuleId\"f\n" + - "\"UpdatePurchasedPhoneNumberResponse\x12@\n" + - "\fphone_number\x18\x01 \x01(\v2\x1d.livekit.PurchasedPhoneNumberR\vphoneNumber\"\x87\x01\n" + - "#ReleasePurchasedPhoneNumbersRequest\x12;\n" + - "\x1apurchased_phone_number_ids\x18\x01 \x03(\tR\x17purchasedPhoneNumberIds\x12#\n" + - "\rphone_numbers\x18\x02 \x03(\tR\fphoneNumbers\"&\n" + - "$ReleasePurchasedPhoneNumbersResponse\"\xee\x02\n" + - "\x11GlobalPhoneNumber\x12\x0e\n" + + "\x14sip_dispatch_rule_id\x18\x03 \x01(\tR\x11sipDispatchRuleId\"T\n" + + "\x19UpdatePhoneNumberResponse\x127\n" + + "\fphone_number\x18\x01 \x01(\v2\x14.livekit.PhoneNumberR\vphoneNumber\"S\n" + + "\x1aReleasePhoneNumbersRequest\x12\x10\n" + + "\x03ids\x18\x01 \x03(\tR\x03ids\x12#\n" + + "\rphone_numbers\x18\x02 \x03(\tR\fphoneNumbers\"\x1d\n" + + "\x1bReleasePhoneNumbersResponse\"\xeb\x04\n" + + "\vPhoneNumber\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" + "\ve164_format\x18\x02 \x01(\tR\n" + "e164Format\x12!\n" + @@ -1171,44 +937,26 @@ const file_livekit_phone_number_proto_rawDesc = "" + "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + "\n" + "updated_at\x18\n" + - " \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\x9c\x01\n" + - "\rTelephonyCost\x126\n" + - "\bresource\x18\x01 \x01(\x0e2\x1a.livekit.TelephonyCostTypeR\bresource\x12\x1a\n" + - "\bcurrency\x18\x02 \x01(\tR\bcurrency\x12\x14\n" + - "\x05price\x18\x03 \x01(\x01R\x05price\x12!\n" + - "\fbilling_unit\x18\x04 \x01(\tR\vbillingUnit\"\xab\x01\n" + - "\x18PhoneNumberInventoryItem\x12=\n" + - "\fphone_number\x18\x01 \x01(\v2\x1a.livekit.GlobalPhoneNumberR\vphoneNumber\x12\"\n" + - "\fcapabilities\x18\x02 \x03(\tR\fcapabilities\x12,\n" + - "\x05costs\x18\x03 \x03(\v2\x16.livekit.TelephonyCostR\x05costs\"\xef\x02\n" + - "\x14PurchasedPhoneNumber\x129\n" + - "\x19purchased_phone_number_id\x18\x01 \x01(\tR\x16purchasedPhoneNumberId\x12=\n" + - "\fphone_number\x18\x02 \x01(\v2\x1a.livekit.GlobalPhoneNumberR\vphoneNumber\x122\n" + - "\x06status\x18\x03 \x01(\x0e2\x1a.livekit.PhoneNumberStatusR\x06status\x12;\n" + - "\vassigned_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12\"\n" + + "\fcapabilities\x18\v \x03(\tR\fcapabilities\x122\n" + + "\x06status\x18\f \x01(\x0e2\x1a.livekit.PhoneNumberStatusR\x06status\x12;\n" + + "\vassigned_at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\n" + "assignedAt\x12;\n" + - "\vreleased_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "\vreleased_at\x18\x0e \x01(\v2\x1a.google.protobuf.TimestampR\n" + "releasedAt\x12/\n" + - "\x14sip_dispatch_rule_id\x18\x06 \x01(\tR\x11sipDispatchRuleId*\xf9\x01\n" + - "\x11TelephonyCostType\x12#\n" + - "\x1fTELEPHONY_COST_TYPE_UNSPECIFIED\x10\x00\x12%\n" + - "!TELEPHONY_COST_TYPE_NUMBER_RENTAL\x10\x01\x12%\n" + - "!TELEPHONY_COST_TYPE_VOICE_INBOUND\x10\x02\x12&\n" + - "\"TELEPHONY_COST_TYPE_VOICE_OUTBOUND\x10\x03\x12#\n" + - "\x1fTELEPHONY_COST_TYPE_SMS_INBOUND\x10\x04\x12$\n" + - " TELEPHONY_COST_TYPE_SMS_OUTBOUND\x10\x05*\x9b\x01\n" + + "\x14sip_dispatch_rule_id\x18\x0f \x01(\tR\x11sipDispatchRuleId*\x9b\x01\n" + "\x11PhoneNumberStatus\x12#\n" + "\x1fPHONE_NUMBER_STATUS_UNSPECIFIED\x10\x00\x12\x1e\n" + "\x1aPHONE_NUMBER_STATUS_ACTIVE\x10\x01\x12\x1f\n" + "\x1bPHONE_NUMBER_STATUS_PENDING\x10\x02\x12 \n" + - "\x1cPHONE_NUMBER_STATUS_RELEASED\x10\x032\xc8\x05\n" + - "\x12PhoneNumberService\x12q\n" + - "\x18ListPhoneNumberInventory\x12(.livekit.ListPhoneNumberInventoryRequest\x1a).livekit.ListPhoneNumberInventoryResponse\"\x00\x12b\n" + - "\x13PurchasePhoneNumber\x12#.livekit.PurchasePhoneNumberRequest\x1a$.livekit.PurchasePhoneNumberResponse\"\x00\x12t\n" + - "\x19ListPurchasedPhoneNumbers\x12).livekit.ListPurchasedPhoneNumbersRequest\x1a*.livekit.ListPurchasedPhoneNumbersResponse\"\x00\x12n\n" + - "\x17GetPurchasedPhoneNumber\x12'.livekit.GetPurchasedPhoneNumberRequest\x1a(.livekit.GetPurchasedPhoneNumberResponse\"\x00\x12w\n" + - "\x1aUpdatePurchasedPhoneNumber\x12*.livekit.UpdatePurchasedPhoneNumberRequest\x1a+.livekit.UpdatePurchasedPhoneNumberResponse\"\x00\x12|\n" + - "\x1bReleasePurchasedPhoneNumber\x12,.livekit.ReleasePurchasedPhoneNumbersRequest\x1a-.livekit.ReleasePurchasedPhoneNumbersResponse\"\x00B%Z#github.com/livekit/protocol/livekitb\x06proto3" + "\x1cPHONE_NUMBER_STATUS_RELEASED\x10\x032\xcb\x04\n" + + "\x12PhoneNumberService\x12_\n" + + "\x12SearchPhoneNumbers\x12\".livekit.SearchPhoneNumbersRequest\x1a#.livekit.SearchPhoneNumbersResponse\"\x00\x12b\n" + + "\x13PurchasePhoneNumber\x12#.livekit.PurchasePhoneNumberRequest\x1a$.livekit.PurchasePhoneNumberResponse\"\x00\x12Y\n" + + "\x10ListPhoneNumbers\x12 .livekit.ListPhoneNumbersRequest\x1a!.livekit.ListPhoneNumbersResponse\"\x00\x12S\n" + + "\x0eGetPhoneNumber\x12\x1e.livekit.GetPhoneNumberRequest\x1a\x1f.livekit.GetPhoneNumberResponse\"\x00\x12\\\n" + + "\x11UpdatePhoneNumber\x12!.livekit.UpdatePhoneNumberRequest\x1a\".livekit.UpdatePhoneNumberResponse\"\x00\x12b\n" + + "\x13ReleasePhoneNumbers\x12#.livekit.ReleasePhoneNumbersRequest\x1a$.livekit.ReleasePhoneNumbersResponse\"\x00B%Z#github.com/livekit/protocol/livekitb\x06proto3" var ( file_livekit_phone_number_proto_rawDescOnce sync.Once @@ -1222,67 +970,59 @@ func file_livekit_phone_number_proto_rawDescGZIP() []byte { return file_livekit_phone_number_proto_rawDescData } -var file_livekit_phone_number_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_livekit_phone_number_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_livekit_phone_number_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_livekit_phone_number_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_livekit_phone_number_proto_goTypes = []any{ - (TelephonyCostType)(0), // 0: livekit.TelephonyCostType - (PhoneNumberStatus)(0), // 1: livekit.PhoneNumberStatus - (*ListPhoneNumberInventoryRequest)(nil), // 2: livekit.ListPhoneNumberInventoryRequest - (*ListPhoneNumberInventoryResponse)(nil), // 3: livekit.ListPhoneNumberInventoryResponse - (*PurchasePhoneNumberRequest)(nil), // 4: livekit.PurchasePhoneNumberRequest - (*PurchasePhoneNumberResponse)(nil), // 5: livekit.PurchasePhoneNumberResponse - (*ListPurchasedPhoneNumbersRequest)(nil), // 6: livekit.ListPurchasedPhoneNumbersRequest - (*ListPurchasedPhoneNumbersResponse)(nil), // 7: livekit.ListPurchasedPhoneNumbersResponse - (*GetPurchasedPhoneNumberRequest)(nil), // 8: livekit.GetPurchasedPhoneNumberRequest - (*GetPurchasedPhoneNumberResponse)(nil), // 9: livekit.GetPurchasedPhoneNumberResponse - (*UpdatePurchasedPhoneNumberRequest)(nil), // 10: livekit.UpdatePurchasedPhoneNumberRequest - (*UpdatePurchasedPhoneNumberResponse)(nil), // 11: livekit.UpdatePurchasedPhoneNumberResponse - (*ReleasePurchasedPhoneNumbersRequest)(nil), // 12: livekit.ReleasePurchasedPhoneNumbersRequest - (*ReleasePurchasedPhoneNumbersResponse)(nil), // 13: livekit.ReleasePurchasedPhoneNumbersResponse - (*GlobalPhoneNumber)(nil), // 14: livekit.GlobalPhoneNumber - (*TelephonyCost)(nil), // 15: livekit.TelephonyCost - (*PhoneNumberInventoryItem)(nil), // 16: livekit.PhoneNumberInventoryItem - (*PurchasedPhoneNumber)(nil), // 17: livekit.PurchasedPhoneNumber - (*TokenPagination)(nil), // 18: livekit.TokenPagination - (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (PhoneNumberStatus)(0), // 0: livekit.PhoneNumberStatus + (*SearchPhoneNumbersRequest)(nil), // 1: livekit.SearchPhoneNumbersRequest + (*SearchPhoneNumbersResponse)(nil), // 2: livekit.SearchPhoneNumbersResponse + (*PurchasePhoneNumberRequest)(nil), // 3: livekit.PurchasePhoneNumberRequest + (*PurchasePhoneNumberResponse)(nil), // 4: livekit.PurchasePhoneNumberResponse + (*ListPhoneNumbersRequest)(nil), // 5: livekit.ListPhoneNumbersRequest + (*ListPhoneNumbersResponse)(nil), // 6: livekit.ListPhoneNumbersResponse + (*GetPhoneNumberRequest)(nil), // 7: livekit.GetPhoneNumberRequest + (*GetPhoneNumberResponse)(nil), // 8: livekit.GetPhoneNumberResponse + (*UpdatePhoneNumberRequest)(nil), // 9: livekit.UpdatePhoneNumberRequest + (*UpdatePhoneNumberResponse)(nil), // 10: livekit.UpdatePhoneNumberResponse + (*ReleasePhoneNumbersRequest)(nil), // 11: livekit.ReleasePhoneNumbersRequest + (*ReleasePhoneNumbersResponse)(nil), // 12: livekit.ReleasePhoneNumbersResponse + (*PhoneNumber)(nil), // 13: livekit.PhoneNumber + (*TokenPagination)(nil), // 14: livekit.TokenPagination + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp } var file_livekit_phone_number_proto_depIdxs = []int32{ - 18, // 0: livekit.ListPhoneNumberInventoryRequest.page_token:type_name -> livekit.TokenPagination - 16, // 1: livekit.ListPhoneNumberInventoryResponse.items:type_name -> livekit.PhoneNumberInventoryItem - 18, // 2: livekit.ListPhoneNumberInventoryResponse.next_page_token:type_name -> livekit.TokenPagination - 17, // 3: livekit.PurchasePhoneNumberResponse.phone_numbers:type_name -> livekit.PurchasedPhoneNumber - 1, // 4: livekit.ListPurchasedPhoneNumbersRequest.status:type_name -> livekit.PhoneNumberStatus - 18, // 5: livekit.ListPurchasedPhoneNumbersRequest.page_token:type_name -> livekit.TokenPagination - 17, // 6: livekit.ListPurchasedPhoneNumbersResponse.items:type_name -> livekit.PurchasedPhoneNumber - 18, // 7: livekit.ListPurchasedPhoneNumbersResponse.next_page_token:type_name -> livekit.TokenPagination - 17, // 8: livekit.GetPurchasedPhoneNumberResponse.phone_number:type_name -> livekit.PurchasedPhoneNumber - 17, // 9: livekit.UpdatePurchasedPhoneNumberResponse.phone_number:type_name -> livekit.PurchasedPhoneNumber - 19, // 10: livekit.GlobalPhoneNumber.created_at:type_name -> google.protobuf.Timestamp - 19, // 11: livekit.GlobalPhoneNumber.updated_at:type_name -> google.protobuf.Timestamp - 0, // 12: livekit.TelephonyCost.resource:type_name -> livekit.TelephonyCostType - 14, // 13: livekit.PhoneNumberInventoryItem.phone_number:type_name -> livekit.GlobalPhoneNumber - 15, // 14: livekit.PhoneNumberInventoryItem.costs:type_name -> livekit.TelephonyCost - 14, // 15: livekit.PurchasedPhoneNumber.phone_number:type_name -> livekit.GlobalPhoneNumber - 1, // 16: livekit.PurchasedPhoneNumber.status:type_name -> livekit.PhoneNumberStatus - 19, // 17: livekit.PurchasedPhoneNumber.assigned_at:type_name -> google.protobuf.Timestamp - 19, // 18: livekit.PurchasedPhoneNumber.released_at:type_name -> google.protobuf.Timestamp - 2, // 19: livekit.PhoneNumberService.ListPhoneNumberInventory:input_type -> livekit.ListPhoneNumberInventoryRequest - 4, // 20: livekit.PhoneNumberService.PurchasePhoneNumber:input_type -> livekit.PurchasePhoneNumberRequest - 6, // 21: livekit.PhoneNumberService.ListPurchasedPhoneNumbers:input_type -> livekit.ListPurchasedPhoneNumbersRequest - 8, // 22: livekit.PhoneNumberService.GetPurchasedPhoneNumber:input_type -> livekit.GetPurchasedPhoneNumberRequest - 10, // 23: livekit.PhoneNumberService.UpdatePurchasedPhoneNumber:input_type -> livekit.UpdatePurchasedPhoneNumberRequest - 12, // 24: livekit.PhoneNumberService.ReleasePurchasedPhoneNumber:input_type -> livekit.ReleasePurchasedPhoneNumbersRequest - 3, // 25: livekit.PhoneNumberService.ListPhoneNumberInventory:output_type -> livekit.ListPhoneNumberInventoryResponse - 5, // 26: livekit.PhoneNumberService.PurchasePhoneNumber:output_type -> livekit.PurchasePhoneNumberResponse - 7, // 27: livekit.PhoneNumberService.ListPurchasedPhoneNumbers:output_type -> livekit.ListPurchasedPhoneNumbersResponse - 9, // 28: livekit.PhoneNumberService.GetPurchasedPhoneNumber:output_type -> livekit.GetPurchasedPhoneNumberResponse - 11, // 29: livekit.PhoneNumberService.UpdatePurchasedPhoneNumber:output_type -> livekit.UpdatePurchasedPhoneNumberResponse - 13, // 30: livekit.PhoneNumberService.ReleasePurchasedPhoneNumber:output_type -> livekit.ReleasePurchasedPhoneNumbersResponse - 25, // [25:31] is the sub-list for method output_type - 19, // [19:25] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 14, // 0: livekit.SearchPhoneNumbersRequest.page_token:type_name -> livekit.TokenPagination + 13, // 1: livekit.SearchPhoneNumbersResponse.items:type_name -> livekit.PhoneNumber + 14, // 2: livekit.SearchPhoneNumbersResponse.next_page_token:type_name -> livekit.TokenPagination + 13, // 3: livekit.PurchasePhoneNumberResponse.phone_numbers:type_name -> livekit.PhoneNumber + 0, // 4: livekit.ListPhoneNumbersRequest.status:type_name -> livekit.PhoneNumberStatus + 14, // 5: livekit.ListPhoneNumbersRequest.page_token:type_name -> livekit.TokenPagination + 13, // 6: livekit.ListPhoneNumbersResponse.items:type_name -> livekit.PhoneNumber + 14, // 7: livekit.ListPhoneNumbersResponse.next_page_token:type_name -> livekit.TokenPagination + 13, // 8: livekit.GetPhoneNumberResponse.phone_number:type_name -> livekit.PhoneNumber + 13, // 9: livekit.UpdatePhoneNumberResponse.phone_number:type_name -> livekit.PhoneNumber + 15, // 10: livekit.PhoneNumber.created_at:type_name -> google.protobuf.Timestamp + 15, // 11: livekit.PhoneNumber.updated_at:type_name -> google.protobuf.Timestamp + 0, // 12: livekit.PhoneNumber.status:type_name -> livekit.PhoneNumberStatus + 15, // 13: livekit.PhoneNumber.assigned_at:type_name -> google.protobuf.Timestamp + 15, // 14: livekit.PhoneNumber.released_at:type_name -> google.protobuf.Timestamp + 1, // 15: livekit.PhoneNumberService.SearchPhoneNumbers:input_type -> livekit.SearchPhoneNumbersRequest + 3, // 16: livekit.PhoneNumberService.PurchasePhoneNumber:input_type -> livekit.PurchasePhoneNumberRequest + 5, // 17: livekit.PhoneNumberService.ListPhoneNumbers:input_type -> livekit.ListPhoneNumbersRequest + 7, // 18: livekit.PhoneNumberService.GetPhoneNumber:input_type -> livekit.GetPhoneNumberRequest + 9, // 19: livekit.PhoneNumberService.UpdatePhoneNumber:input_type -> livekit.UpdatePhoneNumberRequest + 11, // 20: livekit.PhoneNumberService.ReleasePhoneNumbers:input_type -> livekit.ReleasePhoneNumbersRequest + 2, // 21: livekit.PhoneNumberService.SearchPhoneNumbers:output_type -> livekit.SearchPhoneNumbersResponse + 4, // 22: livekit.PhoneNumberService.PurchasePhoneNumber:output_type -> livekit.PurchasePhoneNumberResponse + 6, // 23: livekit.PhoneNumberService.ListPhoneNumbers:output_type -> livekit.ListPhoneNumbersResponse + 8, // 24: livekit.PhoneNumberService.GetPhoneNumber:output_type -> livekit.GetPhoneNumberResponse + 10, // 25: livekit.PhoneNumberService.UpdatePhoneNumber:output_type -> livekit.UpdatePhoneNumberResponse + 12, // 26: livekit.PhoneNumberService.ReleasePhoneNumbers:output_type -> livekit.ReleasePhoneNumbersResponse + 21, // [21:27] is the sub-list for method output_type + 15, // [15:21] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_livekit_phone_number_proto_init() } @@ -1296,8 +1036,8 @@ func file_livekit_phone_number_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_livekit_phone_number_proto_rawDesc), len(file_livekit_phone_number_proto_rawDesc)), - NumEnums: 2, - NumMessages: 16, + NumEnums: 1, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/livekit/livekit_phone_number.twirp.go b/livekit/livekit_phone_number.twirp.go index 1d8b635ab..67ace85f8 100644 --- a/livekit/livekit_phone_number.twirp.go +++ b/livekit/livekit_phone_number.twirp.go @@ -28,23 +28,23 @@ const _ = twirp.TwirpPackageMinVersion_8_1_0 // Public Phone Number Service - External API for phone number management type PhoneNumberService interface { - // List available phone numbers in inventory - ListPhoneNumberInventory(context.Context, *ListPhoneNumberInventoryRequest) (*ListPhoneNumberInventoryResponse, error) + // Search available phone numbers in inventory + SearchPhoneNumbers(context.Context, *SearchPhoneNumbersRequest) (*SearchPhoneNumbersResponse, error) // Purchase a phone number from inventory PurchasePhoneNumber(context.Context, *PurchasePhoneNumberRequest) (*PurchasePhoneNumberResponse, error) - // List purchased phone numbers for a project - ListPurchasedPhoneNumbers(context.Context, *ListPurchasedPhoneNumbersRequest) (*ListPurchasedPhoneNumbersResponse, error) + // List phone numbers for a project + ListPhoneNumbers(context.Context, *ListPhoneNumbersRequest) (*ListPhoneNumbersResponse, error) - // Get a purchased phone number - GetPurchasedPhoneNumber(context.Context, *GetPurchasedPhoneNumberRequest) (*GetPurchasedPhoneNumberResponse, error) + // Get a phone number from a project + GetPhoneNumber(context.Context, *GetPhoneNumberRequest) (*GetPhoneNumberResponse, error) - // Update a purchased phone number - UpdatePurchasedPhoneNumber(context.Context, *UpdatePurchasedPhoneNumberRequest) (*UpdatePurchasedPhoneNumberResponse, error) + // Update a phone number in a project + UpdatePhoneNumber(context.Context, *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) - // Release a purchased phone number - ReleasePurchasedPhoneNumber(context.Context, *ReleasePurchasedPhoneNumbersRequest) (*ReleasePurchasedPhoneNumbersResponse, error) + // Release phone numbers + ReleasePhoneNumbers(context.Context, *ReleasePhoneNumbersRequest) (*ReleasePhoneNumbersResponse, error) } // ================================== @@ -82,12 +82,12 @@ func NewPhoneNumberServiceProtobufClient(baseURL string, client HTTPClient, opts serviceURL := sanitizeBaseURL(baseURL) serviceURL += baseServicePath(pathPrefix, "livekit", "PhoneNumberService") urls := [6]string{ - serviceURL + "ListPhoneNumberInventory", + serviceURL + "SearchPhoneNumbers", serviceURL + "PurchasePhoneNumber", - serviceURL + "ListPurchasedPhoneNumbers", - serviceURL + "GetPurchasedPhoneNumber", - serviceURL + "UpdatePurchasedPhoneNumber", - serviceURL + "ReleasePurchasedPhoneNumber", + serviceURL + "ListPhoneNumbers", + serviceURL + "GetPhoneNumber", + serviceURL + "UpdatePhoneNumber", + serviceURL + "ReleasePhoneNumbers", } return &phoneNumberServiceProtobufClient{ @@ -98,26 +98,26 @@ func NewPhoneNumberServiceProtobufClient(baseURL string, client HTTPClient, opts } } -func (c *phoneNumberServiceProtobufClient) ListPhoneNumberInventory(ctx context.Context, in *ListPhoneNumberInventoryRequest) (*ListPhoneNumberInventoryResponse, error) { +func (c *phoneNumberServiceProtobufClient) SearchPhoneNumbers(ctx context.Context, in *SearchPhoneNumbersRequest) (*SearchPhoneNumbersResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "ListPhoneNumberInventory") - caller := c.callListPhoneNumberInventory + ctx = ctxsetters.WithMethodName(ctx, "SearchPhoneNumbers") + caller := c.callSearchPhoneNumbers if c.interceptor != nil { - caller = func(ctx context.Context, req *ListPhoneNumberInventoryRequest) (*ListPhoneNumberInventoryResponse, error) { + caller = func(ctx context.Context, req *SearchPhoneNumbersRequest) (*SearchPhoneNumbersResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListPhoneNumberInventoryRequest) + typedReq, ok := req.(*SearchPhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListPhoneNumberInventoryRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*SearchPhoneNumbersRequest) when calling interceptor") } - return c.callListPhoneNumberInventory(ctx, typedReq) + return c.callSearchPhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ListPhoneNumberInventoryResponse) + typedResp, ok := resp.(*SearchPhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListPhoneNumberInventoryResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*SearchPhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -127,8 +127,8 @@ func (c *phoneNumberServiceProtobufClient) ListPhoneNumberInventory(ctx context. return caller(ctx, in) } -func (c *phoneNumberServiceProtobufClient) callListPhoneNumberInventory(ctx context.Context, in *ListPhoneNumberInventoryRequest) (*ListPhoneNumberInventoryResponse, error) { - out := new(ListPhoneNumberInventoryResponse) +func (c *phoneNumberServiceProtobufClient) callSearchPhoneNumbers(ctx context.Context, in *SearchPhoneNumbersRequest) (*SearchPhoneNumbersResponse, error) { + out := new(SearchPhoneNumbersResponse) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -190,26 +190,26 @@ func (c *phoneNumberServiceProtobufClient) callPurchasePhoneNumber(ctx context.C return out, nil } -func (c *phoneNumberServiceProtobufClient) ListPurchasedPhoneNumbers(ctx context.Context, in *ListPurchasedPhoneNumbersRequest) (*ListPurchasedPhoneNumbersResponse, error) { +func (c *phoneNumberServiceProtobufClient) ListPhoneNumbers(ctx context.Context, in *ListPhoneNumbersRequest) (*ListPhoneNumbersResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "ListPurchasedPhoneNumbers") - caller := c.callListPurchasedPhoneNumbers + ctx = ctxsetters.WithMethodName(ctx, "ListPhoneNumbers") + caller := c.callListPhoneNumbers if c.interceptor != nil { - caller = func(ctx context.Context, req *ListPurchasedPhoneNumbersRequest) (*ListPurchasedPhoneNumbersResponse, error) { + caller = func(ctx context.Context, req *ListPhoneNumbersRequest) (*ListPhoneNumbersResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListPurchasedPhoneNumbersRequest) + typedReq, ok := req.(*ListPhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListPurchasedPhoneNumbersRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*ListPhoneNumbersRequest) when calling interceptor") } - return c.callListPurchasedPhoneNumbers(ctx, typedReq) + return c.callListPhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ListPurchasedPhoneNumbersResponse) + typedResp, ok := resp.(*ListPhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListPurchasedPhoneNumbersResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*ListPhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -219,8 +219,8 @@ func (c *phoneNumberServiceProtobufClient) ListPurchasedPhoneNumbers(ctx context return caller(ctx, in) } -func (c *phoneNumberServiceProtobufClient) callListPurchasedPhoneNumbers(ctx context.Context, in *ListPurchasedPhoneNumbersRequest) (*ListPurchasedPhoneNumbersResponse, error) { - out := new(ListPurchasedPhoneNumbersResponse) +func (c *phoneNumberServiceProtobufClient) callListPhoneNumbers(ctx context.Context, in *ListPhoneNumbersRequest) (*ListPhoneNumbersResponse, error) { + out := new(ListPhoneNumbersResponse) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -236,26 +236,26 @@ func (c *phoneNumberServiceProtobufClient) callListPurchasedPhoneNumbers(ctx con return out, nil } -func (c *phoneNumberServiceProtobufClient) GetPurchasedPhoneNumber(ctx context.Context, in *GetPurchasedPhoneNumberRequest) (*GetPurchasedPhoneNumberResponse, error) { +func (c *phoneNumberServiceProtobufClient) GetPhoneNumber(ctx context.Context, in *GetPhoneNumberRequest) (*GetPhoneNumberResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "GetPurchasedPhoneNumber") - caller := c.callGetPurchasedPhoneNumber + ctx = ctxsetters.WithMethodName(ctx, "GetPhoneNumber") + caller := c.callGetPhoneNumber if c.interceptor != nil { - caller = func(ctx context.Context, req *GetPurchasedPhoneNumberRequest) (*GetPurchasedPhoneNumberResponse, error) { + caller = func(ctx context.Context, req *GetPhoneNumberRequest) (*GetPhoneNumberResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetPurchasedPhoneNumberRequest) + typedReq, ok := req.(*GetPhoneNumberRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetPurchasedPhoneNumberRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*GetPhoneNumberRequest) when calling interceptor") } - return c.callGetPurchasedPhoneNumber(ctx, typedReq) + return c.callGetPhoneNumber(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*GetPurchasedPhoneNumberResponse) + typedResp, ok := resp.(*GetPhoneNumberResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetPurchasedPhoneNumberResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*GetPhoneNumberResponse) when calling interceptor") } return typedResp, err } @@ -265,8 +265,8 @@ func (c *phoneNumberServiceProtobufClient) GetPurchasedPhoneNumber(ctx context.C return caller(ctx, in) } -func (c *phoneNumberServiceProtobufClient) callGetPurchasedPhoneNumber(ctx context.Context, in *GetPurchasedPhoneNumberRequest) (*GetPurchasedPhoneNumberResponse, error) { - out := new(GetPurchasedPhoneNumberResponse) +func (c *phoneNumberServiceProtobufClient) callGetPhoneNumber(ctx context.Context, in *GetPhoneNumberRequest) (*GetPhoneNumberResponse, error) { + out := new(GetPhoneNumberResponse) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -282,26 +282,26 @@ func (c *phoneNumberServiceProtobufClient) callGetPurchasedPhoneNumber(ctx conte return out, nil } -func (c *phoneNumberServiceProtobufClient) UpdatePurchasedPhoneNumber(ctx context.Context, in *UpdatePurchasedPhoneNumberRequest) (*UpdatePurchasedPhoneNumberResponse, error) { +func (c *phoneNumberServiceProtobufClient) UpdatePhoneNumber(ctx context.Context, in *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "UpdatePurchasedPhoneNumber") - caller := c.callUpdatePurchasedPhoneNumber + ctx = ctxsetters.WithMethodName(ctx, "UpdatePhoneNumber") + caller := c.callUpdatePhoneNumber if c.interceptor != nil { - caller = func(ctx context.Context, req *UpdatePurchasedPhoneNumberRequest) (*UpdatePurchasedPhoneNumberResponse, error) { + caller = func(ctx context.Context, req *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*UpdatePurchasedPhoneNumberRequest) + typedReq, ok := req.(*UpdatePhoneNumberRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*UpdatePurchasedPhoneNumberRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*UpdatePhoneNumberRequest) when calling interceptor") } - return c.callUpdatePurchasedPhoneNumber(ctx, typedReq) + return c.callUpdatePhoneNumber(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*UpdatePurchasedPhoneNumberResponse) + typedResp, ok := resp.(*UpdatePhoneNumberResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*UpdatePurchasedPhoneNumberResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*UpdatePhoneNumberResponse) when calling interceptor") } return typedResp, err } @@ -311,8 +311,8 @@ func (c *phoneNumberServiceProtobufClient) UpdatePurchasedPhoneNumber(ctx contex return caller(ctx, in) } -func (c *phoneNumberServiceProtobufClient) callUpdatePurchasedPhoneNumber(ctx context.Context, in *UpdatePurchasedPhoneNumberRequest) (*UpdatePurchasedPhoneNumberResponse, error) { - out := new(UpdatePurchasedPhoneNumberResponse) +func (c *phoneNumberServiceProtobufClient) callUpdatePhoneNumber(ctx context.Context, in *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) { + out := new(UpdatePhoneNumberResponse) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -328,26 +328,26 @@ func (c *phoneNumberServiceProtobufClient) callUpdatePurchasedPhoneNumber(ctx co return out, nil } -func (c *phoneNumberServiceProtobufClient) ReleasePurchasedPhoneNumber(ctx context.Context, in *ReleasePurchasedPhoneNumbersRequest) (*ReleasePurchasedPhoneNumbersResponse, error) { +func (c *phoneNumberServiceProtobufClient) ReleasePhoneNumbers(ctx context.Context, in *ReleasePhoneNumbersRequest) (*ReleasePhoneNumbersResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "ReleasePurchasedPhoneNumber") - caller := c.callReleasePurchasedPhoneNumber + ctx = ctxsetters.WithMethodName(ctx, "ReleasePhoneNumbers") + caller := c.callReleasePhoneNumbers if c.interceptor != nil { - caller = func(ctx context.Context, req *ReleasePurchasedPhoneNumbersRequest) (*ReleasePurchasedPhoneNumbersResponse, error) { + caller = func(ctx context.Context, req *ReleasePhoneNumbersRequest) (*ReleasePhoneNumbersResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ReleasePurchasedPhoneNumbersRequest) + typedReq, ok := req.(*ReleasePhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ReleasePurchasedPhoneNumbersRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*ReleasePhoneNumbersRequest) when calling interceptor") } - return c.callReleasePurchasedPhoneNumber(ctx, typedReq) + return c.callReleasePhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ReleasePurchasedPhoneNumbersResponse) + typedResp, ok := resp.(*ReleasePhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ReleasePurchasedPhoneNumbersResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*ReleasePhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -357,8 +357,8 @@ func (c *phoneNumberServiceProtobufClient) ReleasePurchasedPhoneNumber(ctx conte return caller(ctx, in) } -func (c *phoneNumberServiceProtobufClient) callReleasePurchasedPhoneNumber(ctx context.Context, in *ReleasePurchasedPhoneNumbersRequest) (*ReleasePurchasedPhoneNumbersResponse, error) { - out := new(ReleasePurchasedPhoneNumbersResponse) +func (c *phoneNumberServiceProtobufClient) callReleasePhoneNumbers(ctx context.Context, in *ReleasePhoneNumbersRequest) (*ReleasePhoneNumbersResponse, error) { + out := new(ReleasePhoneNumbersResponse) ctx, err := doProtobufRequest(ctx, c.client, c.opts.Hooks, c.urls[5], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -409,12 +409,12 @@ func NewPhoneNumberServiceJSONClient(baseURL string, client HTTPClient, opts ... serviceURL := sanitizeBaseURL(baseURL) serviceURL += baseServicePath(pathPrefix, "livekit", "PhoneNumberService") urls := [6]string{ - serviceURL + "ListPhoneNumberInventory", + serviceURL + "SearchPhoneNumbers", serviceURL + "PurchasePhoneNumber", - serviceURL + "ListPurchasedPhoneNumbers", - serviceURL + "GetPurchasedPhoneNumber", - serviceURL + "UpdatePurchasedPhoneNumber", - serviceURL + "ReleasePurchasedPhoneNumber", + serviceURL + "ListPhoneNumbers", + serviceURL + "GetPhoneNumber", + serviceURL + "UpdatePhoneNumber", + serviceURL + "ReleasePhoneNumbers", } return &phoneNumberServiceJSONClient{ @@ -425,26 +425,26 @@ func NewPhoneNumberServiceJSONClient(baseURL string, client HTTPClient, opts ... } } -func (c *phoneNumberServiceJSONClient) ListPhoneNumberInventory(ctx context.Context, in *ListPhoneNumberInventoryRequest) (*ListPhoneNumberInventoryResponse, error) { +func (c *phoneNumberServiceJSONClient) SearchPhoneNumbers(ctx context.Context, in *SearchPhoneNumbersRequest) (*SearchPhoneNumbersResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "ListPhoneNumberInventory") - caller := c.callListPhoneNumberInventory + ctx = ctxsetters.WithMethodName(ctx, "SearchPhoneNumbers") + caller := c.callSearchPhoneNumbers if c.interceptor != nil { - caller = func(ctx context.Context, req *ListPhoneNumberInventoryRequest) (*ListPhoneNumberInventoryResponse, error) { + caller = func(ctx context.Context, req *SearchPhoneNumbersRequest) (*SearchPhoneNumbersResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListPhoneNumberInventoryRequest) + typedReq, ok := req.(*SearchPhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListPhoneNumberInventoryRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*SearchPhoneNumbersRequest) when calling interceptor") } - return c.callListPhoneNumberInventory(ctx, typedReq) + return c.callSearchPhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ListPhoneNumberInventoryResponse) + typedResp, ok := resp.(*SearchPhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListPhoneNumberInventoryResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*SearchPhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -454,8 +454,8 @@ func (c *phoneNumberServiceJSONClient) ListPhoneNumberInventory(ctx context.Cont return caller(ctx, in) } -func (c *phoneNumberServiceJSONClient) callListPhoneNumberInventory(ctx context.Context, in *ListPhoneNumberInventoryRequest) (*ListPhoneNumberInventoryResponse, error) { - out := new(ListPhoneNumberInventoryResponse) +func (c *phoneNumberServiceJSONClient) callSearchPhoneNumbers(ctx context.Context, in *SearchPhoneNumbersRequest) (*SearchPhoneNumbersResponse, error) { + out := new(SearchPhoneNumbersResponse) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[0], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -517,26 +517,26 @@ func (c *phoneNumberServiceJSONClient) callPurchasePhoneNumber(ctx context.Conte return out, nil } -func (c *phoneNumberServiceJSONClient) ListPurchasedPhoneNumbers(ctx context.Context, in *ListPurchasedPhoneNumbersRequest) (*ListPurchasedPhoneNumbersResponse, error) { +func (c *phoneNumberServiceJSONClient) ListPhoneNumbers(ctx context.Context, in *ListPhoneNumbersRequest) (*ListPhoneNumbersResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "ListPurchasedPhoneNumbers") - caller := c.callListPurchasedPhoneNumbers + ctx = ctxsetters.WithMethodName(ctx, "ListPhoneNumbers") + caller := c.callListPhoneNumbers if c.interceptor != nil { - caller = func(ctx context.Context, req *ListPurchasedPhoneNumbersRequest) (*ListPurchasedPhoneNumbersResponse, error) { + caller = func(ctx context.Context, req *ListPhoneNumbersRequest) (*ListPhoneNumbersResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListPurchasedPhoneNumbersRequest) + typedReq, ok := req.(*ListPhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListPurchasedPhoneNumbersRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*ListPhoneNumbersRequest) when calling interceptor") } - return c.callListPurchasedPhoneNumbers(ctx, typedReq) + return c.callListPhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ListPurchasedPhoneNumbersResponse) + typedResp, ok := resp.(*ListPhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListPurchasedPhoneNumbersResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*ListPhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -546,8 +546,8 @@ func (c *phoneNumberServiceJSONClient) ListPurchasedPhoneNumbers(ctx context.Con return caller(ctx, in) } -func (c *phoneNumberServiceJSONClient) callListPurchasedPhoneNumbers(ctx context.Context, in *ListPurchasedPhoneNumbersRequest) (*ListPurchasedPhoneNumbersResponse, error) { - out := new(ListPurchasedPhoneNumbersResponse) +func (c *phoneNumberServiceJSONClient) callListPhoneNumbers(ctx context.Context, in *ListPhoneNumbersRequest) (*ListPhoneNumbersResponse, error) { + out := new(ListPhoneNumbersResponse) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[2], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -563,26 +563,26 @@ func (c *phoneNumberServiceJSONClient) callListPurchasedPhoneNumbers(ctx context return out, nil } -func (c *phoneNumberServiceJSONClient) GetPurchasedPhoneNumber(ctx context.Context, in *GetPurchasedPhoneNumberRequest) (*GetPurchasedPhoneNumberResponse, error) { +func (c *phoneNumberServiceJSONClient) GetPhoneNumber(ctx context.Context, in *GetPhoneNumberRequest) (*GetPhoneNumberResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "GetPurchasedPhoneNumber") - caller := c.callGetPurchasedPhoneNumber + ctx = ctxsetters.WithMethodName(ctx, "GetPhoneNumber") + caller := c.callGetPhoneNumber if c.interceptor != nil { - caller = func(ctx context.Context, req *GetPurchasedPhoneNumberRequest) (*GetPurchasedPhoneNumberResponse, error) { + caller = func(ctx context.Context, req *GetPhoneNumberRequest) (*GetPhoneNumberResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetPurchasedPhoneNumberRequest) + typedReq, ok := req.(*GetPhoneNumberRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetPurchasedPhoneNumberRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*GetPhoneNumberRequest) when calling interceptor") } - return c.callGetPurchasedPhoneNumber(ctx, typedReq) + return c.callGetPhoneNumber(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*GetPurchasedPhoneNumberResponse) + typedResp, ok := resp.(*GetPhoneNumberResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetPurchasedPhoneNumberResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*GetPhoneNumberResponse) when calling interceptor") } return typedResp, err } @@ -592,8 +592,8 @@ func (c *phoneNumberServiceJSONClient) GetPurchasedPhoneNumber(ctx context.Conte return caller(ctx, in) } -func (c *phoneNumberServiceJSONClient) callGetPurchasedPhoneNumber(ctx context.Context, in *GetPurchasedPhoneNumberRequest) (*GetPurchasedPhoneNumberResponse, error) { - out := new(GetPurchasedPhoneNumberResponse) +func (c *phoneNumberServiceJSONClient) callGetPhoneNumber(ctx context.Context, in *GetPhoneNumberRequest) (*GetPhoneNumberResponse, error) { + out := new(GetPhoneNumberResponse) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[3], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -609,26 +609,26 @@ func (c *phoneNumberServiceJSONClient) callGetPurchasedPhoneNumber(ctx context.C return out, nil } -func (c *phoneNumberServiceJSONClient) UpdatePurchasedPhoneNumber(ctx context.Context, in *UpdatePurchasedPhoneNumberRequest) (*UpdatePurchasedPhoneNumberResponse, error) { +func (c *phoneNumberServiceJSONClient) UpdatePhoneNumber(ctx context.Context, in *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "UpdatePurchasedPhoneNumber") - caller := c.callUpdatePurchasedPhoneNumber + ctx = ctxsetters.WithMethodName(ctx, "UpdatePhoneNumber") + caller := c.callUpdatePhoneNumber if c.interceptor != nil { - caller = func(ctx context.Context, req *UpdatePurchasedPhoneNumberRequest) (*UpdatePurchasedPhoneNumberResponse, error) { + caller = func(ctx context.Context, req *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*UpdatePurchasedPhoneNumberRequest) + typedReq, ok := req.(*UpdatePhoneNumberRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*UpdatePurchasedPhoneNumberRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*UpdatePhoneNumberRequest) when calling interceptor") } - return c.callUpdatePurchasedPhoneNumber(ctx, typedReq) + return c.callUpdatePhoneNumber(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*UpdatePurchasedPhoneNumberResponse) + typedResp, ok := resp.(*UpdatePhoneNumberResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*UpdatePurchasedPhoneNumberResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*UpdatePhoneNumberResponse) when calling interceptor") } return typedResp, err } @@ -638,8 +638,8 @@ func (c *phoneNumberServiceJSONClient) UpdatePurchasedPhoneNumber(ctx context.Co return caller(ctx, in) } -func (c *phoneNumberServiceJSONClient) callUpdatePurchasedPhoneNumber(ctx context.Context, in *UpdatePurchasedPhoneNumberRequest) (*UpdatePurchasedPhoneNumberResponse, error) { - out := new(UpdatePurchasedPhoneNumberResponse) +func (c *phoneNumberServiceJSONClient) callUpdatePhoneNumber(ctx context.Context, in *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) { + out := new(UpdatePhoneNumberResponse) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[4], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -655,26 +655,26 @@ func (c *phoneNumberServiceJSONClient) callUpdatePurchasedPhoneNumber(ctx contex return out, nil } -func (c *phoneNumberServiceJSONClient) ReleasePurchasedPhoneNumber(ctx context.Context, in *ReleasePurchasedPhoneNumbersRequest) (*ReleasePurchasedPhoneNumbersResponse, error) { +func (c *phoneNumberServiceJSONClient) ReleasePhoneNumbers(ctx context.Context, in *ReleasePhoneNumbersRequest) (*ReleasePhoneNumbersResponse, error) { ctx = ctxsetters.WithPackageName(ctx, "livekit") ctx = ctxsetters.WithServiceName(ctx, "PhoneNumberService") - ctx = ctxsetters.WithMethodName(ctx, "ReleasePurchasedPhoneNumber") - caller := c.callReleasePurchasedPhoneNumber + ctx = ctxsetters.WithMethodName(ctx, "ReleasePhoneNumbers") + caller := c.callReleasePhoneNumbers if c.interceptor != nil { - caller = func(ctx context.Context, req *ReleasePurchasedPhoneNumbersRequest) (*ReleasePurchasedPhoneNumbersResponse, error) { + caller = func(ctx context.Context, req *ReleasePhoneNumbersRequest) (*ReleasePhoneNumbersResponse, error) { resp, err := c.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ReleasePurchasedPhoneNumbersRequest) + typedReq, ok := req.(*ReleasePhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ReleasePurchasedPhoneNumbersRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*ReleasePhoneNumbersRequest) when calling interceptor") } - return c.callReleasePurchasedPhoneNumber(ctx, typedReq) + return c.callReleasePhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ReleasePurchasedPhoneNumbersResponse) + typedResp, ok := resp.(*ReleasePhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ReleasePurchasedPhoneNumbersResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*ReleasePhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -684,8 +684,8 @@ func (c *phoneNumberServiceJSONClient) ReleasePurchasedPhoneNumber(ctx context.C return caller(ctx, in) } -func (c *phoneNumberServiceJSONClient) callReleasePurchasedPhoneNumber(ctx context.Context, in *ReleasePurchasedPhoneNumbersRequest) (*ReleasePurchasedPhoneNumbersResponse, error) { - out := new(ReleasePurchasedPhoneNumbersResponse) +func (c *phoneNumberServiceJSONClient) callReleasePhoneNumbers(ctx context.Context, in *ReleasePhoneNumbersRequest) (*ReleasePhoneNumbersResponse, error) { + out := new(ReleasePhoneNumbersResponse) ctx, err := doJSONRequest(ctx, c.client, c.opts.Hooks, c.urls[5], in, out) if err != nil { twerr, ok := err.(twirp.Error) @@ -798,23 +798,23 @@ func (s *phoneNumberServiceServer) ServeHTTP(resp http.ResponseWriter, req *http } switch method { - case "ListPhoneNumberInventory": - s.serveListPhoneNumberInventory(ctx, resp, req) + case "SearchPhoneNumbers": + s.serveSearchPhoneNumbers(ctx, resp, req) return case "PurchasePhoneNumber": s.servePurchasePhoneNumber(ctx, resp, req) return - case "ListPurchasedPhoneNumbers": - s.serveListPurchasedPhoneNumbers(ctx, resp, req) + case "ListPhoneNumbers": + s.serveListPhoneNumbers(ctx, resp, req) return - case "GetPurchasedPhoneNumber": - s.serveGetPurchasedPhoneNumber(ctx, resp, req) + case "GetPhoneNumber": + s.serveGetPhoneNumber(ctx, resp, req) return - case "UpdatePurchasedPhoneNumber": - s.serveUpdatePurchasedPhoneNumber(ctx, resp, req) + case "UpdatePhoneNumber": + s.serveUpdatePhoneNumber(ctx, resp, req) return - case "ReleasePurchasedPhoneNumber": - s.serveReleasePurchasedPhoneNumber(ctx, resp, req) + case "ReleasePhoneNumbers": + s.serveReleasePhoneNumbers(ctx, resp, req) return default: msg := fmt.Sprintf("no handler for path %q", req.URL.Path) @@ -823,7 +823,7 @@ func (s *phoneNumberServiceServer) ServeHTTP(resp http.ResponseWriter, req *http } } -func (s *phoneNumberServiceServer) serveListPhoneNumberInventory(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveSearchPhoneNumbers(ctx context.Context, resp http.ResponseWriter, req *http.Request) { header := req.Header.Get("Content-Type") i := strings.Index(header, ";") if i == -1 { @@ -831,9 +831,9 @@ func (s *phoneNumberServiceServer) serveListPhoneNumberInventory(ctx context.Con } switch strings.TrimSpace(strings.ToLower(header[:i])) { case "application/json": - s.serveListPhoneNumberInventoryJSON(ctx, resp, req) + s.serveSearchPhoneNumbersJSON(ctx, resp, req) case "application/protobuf": - s.serveListPhoneNumberInventoryProtobuf(ctx, resp, req) + s.serveSearchPhoneNumbersProtobuf(ctx, resp, req) default: msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) twerr := badRouteError(msg, req.Method, req.URL.Path) @@ -841,9 +841,9 @@ func (s *phoneNumberServiceServer) serveListPhoneNumberInventory(ctx context.Con } } -func (s *phoneNumberServiceServer) serveListPhoneNumberInventoryJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveSearchPhoneNumbersJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "ListPhoneNumberInventory") + ctx = ctxsetters.WithMethodName(ctx, "SearchPhoneNumbers") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -856,29 +856,29 @@ func (s *phoneNumberServiceServer) serveListPhoneNumberInventoryJSON(ctx context s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - reqContent := new(ListPhoneNumberInventoryRequest) + reqContent := new(SearchPhoneNumbersRequest) unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - handler := s.PhoneNumberService.ListPhoneNumberInventory + handler := s.PhoneNumberService.SearchPhoneNumbers if s.interceptor != nil { - handler = func(ctx context.Context, req *ListPhoneNumberInventoryRequest) (*ListPhoneNumberInventoryResponse, error) { + handler = func(ctx context.Context, req *SearchPhoneNumbersRequest) (*SearchPhoneNumbersResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListPhoneNumberInventoryRequest) + typedReq, ok := req.(*SearchPhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListPhoneNumberInventoryRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*SearchPhoneNumbersRequest) when calling interceptor") } - return s.PhoneNumberService.ListPhoneNumberInventory(ctx, typedReq) + return s.PhoneNumberService.SearchPhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ListPhoneNumberInventoryResponse) + typedResp, ok := resp.(*SearchPhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListPhoneNumberInventoryResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*SearchPhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -887,7 +887,7 @@ func (s *phoneNumberServiceServer) serveListPhoneNumberInventoryJSON(ctx context } // Call service method - var respContent *ListPhoneNumberInventoryResponse + var respContent *SearchPhoneNumbersResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -898,7 +898,7 @@ func (s *phoneNumberServiceServer) serveListPhoneNumberInventoryJSON(ctx context return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ListPhoneNumberInventoryResponse and nil error while calling ListPhoneNumberInventory. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *SearchPhoneNumbersResponse and nil error while calling SearchPhoneNumbers. nil responses are not supported")) return } @@ -924,9 +924,9 @@ func (s *phoneNumberServiceServer) serveListPhoneNumberInventoryJSON(ctx context callResponseSent(ctx, s.hooks) } -func (s *phoneNumberServiceServer) serveListPhoneNumberInventoryProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveSearchPhoneNumbersProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "ListPhoneNumberInventory") + ctx = ctxsetters.WithMethodName(ctx, "SearchPhoneNumbers") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -938,28 +938,28 @@ func (s *phoneNumberServiceServer) serveListPhoneNumberInventoryProtobuf(ctx con s.handleRequestBodyError(ctx, resp, "failed to read request body", err) return } - reqContent := new(ListPhoneNumberInventoryRequest) + reqContent := new(SearchPhoneNumbersRequest) if err = proto.Unmarshal(buf, reqContent); err != nil { s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) return } - handler := s.PhoneNumberService.ListPhoneNumberInventory + handler := s.PhoneNumberService.SearchPhoneNumbers if s.interceptor != nil { - handler = func(ctx context.Context, req *ListPhoneNumberInventoryRequest) (*ListPhoneNumberInventoryResponse, error) { + handler = func(ctx context.Context, req *SearchPhoneNumbersRequest) (*SearchPhoneNumbersResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListPhoneNumberInventoryRequest) + typedReq, ok := req.(*SearchPhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListPhoneNumberInventoryRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*SearchPhoneNumbersRequest) when calling interceptor") } - return s.PhoneNumberService.ListPhoneNumberInventory(ctx, typedReq) + return s.PhoneNumberService.SearchPhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ListPhoneNumberInventoryResponse) + typedResp, ok := resp.(*SearchPhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListPhoneNumberInventoryResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*SearchPhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -968,7 +968,7 @@ func (s *phoneNumberServiceServer) serveListPhoneNumberInventoryProtobuf(ctx con } // Call service method - var respContent *ListPhoneNumberInventoryResponse + var respContent *SearchPhoneNumbersResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -979,7 +979,7 @@ func (s *phoneNumberServiceServer) serveListPhoneNumberInventoryProtobuf(ctx con return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ListPhoneNumberInventoryResponse and nil error while calling ListPhoneNumberInventory. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *SearchPhoneNumbersResponse and nil error while calling SearchPhoneNumbers. nil responses are not supported")) return } @@ -1183,7 +1183,7 @@ func (s *phoneNumberServiceServer) servePurchasePhoneNumberProtobuf(ctx context. callResponseSent(ctx, s.hooks) } -func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbers(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveListPhoneNumbers(ctx context.Context, resp http.ResponseWriter, req *http.Request) { header := req.Header.Get("Content-Type") i := strings.Index(header, ";") if i == -1 { @@ -1191,9 +1191,9 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbers(ctx context.Co } switch strings.TrimSpace(strings.ToLower(header[:i])) { case "application/json": - s.serveListPurchasedPhoneNumbersJSON(ctx, resp, req) + s.serveListPhoneNumbersJSON(ctx, resp, req) case "application/protobuf": - s.serveListPurchasedPhoneNumbersProtobuf(ctx, resp, req) + s.serveListPhoneNumbersProtobuf(ctx, resp, req) default: msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) twerr := badRouteError(msg, req.Method, req.URL.Path) @@ -1201,9 +1201,9 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbers(ctx context.Co } } -func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveListPhoneNumbersJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "ListPurchasedPhoneNumbers") + ctx = ctxsetters.WithMethodName(ctx, "ListPhoneNumbers") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1216,29 +1216,29 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersJSON(ctx contex s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - reqContent := new(ListPurchasedPhoneNumbersRequest) + reqContent := new(ListPhoneNumbersRequest) unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - handler := s.PhoneNumberService.ListPurchasedPhoneNumbers + handler := s.PhoneNumberService.ListPhoneNumbers if s.interceptor != nil { - handler = func(ctx context.Context, req *ListPurchasedPhoneNumbersRequest) (*ListPurchasedPhoneNumbersResponse, error) { + handler = func(ctx context.Context, req *ListPhoneNumbersRequest) (*ListPhoneNumbersResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListPurchasedPhoneNumbersRequest) + typedReq, ok := req.(*ListPhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListPurchasedPhoneNumbersRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*ListPhoneNumbersRequest) when calling interceptor") } - return s.PhoneNumberService.ListPurchasedPhoneNumbers(ctx, typedReq) + return s.PhoneNumberService.ListPhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ListPurchasedPhoneNumbersResponse) + typedResp, ok := resp.(*ListPhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListPurchasedPhoneNumbersResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*ListPhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -1247,7 +1247,7 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersJSON(ctx contex } // Call service method - var respContent *ListPurchasedPhoneNumbersResponse + var respContent *ListPhoneNumbersResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1258,7 +1258,7 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersJSON(ctx contex return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ListPurchasedPhoneNumbersResponse and nil error while calling ListPurchasedPhoneNumbers. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *ListPhoneNumbersResponse and nil error while calling ListPhoneNumbers. nil responses are not supported")) return } @@ -1284,9 +1284,9 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersJSON(ctx contex callResponseSent(ctx, s.hooks) } -func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveListPhoneNumbersProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "ListPurchasedPhoneNumbers") + ctx = ctxsetters.WithMethodName(ctx, "ListPhoneNumbers") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1298,28 +1298,28 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersProtobuf(ctx co s.handleRequestBodyError(ctx, resp, "failed to read request body", err) return } - reqContent := new(ListPurchasedPhoneNumbersRequest) + reqContent := new(ListPhoneNumbersRequest) if err = proto.Unmarshal(buf, reqContent); err != nil { s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) return } - handler := s.PhoneNumberService.ListPurchasedPhoneNumbers + handler := s.PhoneNumberService.ListPhoneNumbers if s.interceptor != nil { - handler = func(ctx context.Context, req *ListPurchasedPhoneNumbersRequest) (*ListPurchasedPhoneNumbersResponse, error) { + handler = func(ctx context.Context, req *ListPhoneNumbersRequest) (*ListPhoneNumbersResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ListPurchasedPhoneNumbersRequest) + typedReq, ok := req.(*ListPhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ListPurchasedPhoneNumbersRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*ListPhoneNumbersRequest) when calling interceptor") } - return s.PhoneNumberService.ListPurchasedPhoneNumbers(ctx, typedReq) + return s.PhoneNumberService.ListPhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ListPurchasedPhoneNumbersResponse) + typedResp, ok := resp.(*ListPhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ListPurchasedPhoneNumbersResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*ListPhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -1328,7 +1328,7 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersProtobuf(ctx co } // Call service method - var respContent *ListPurchasedPhoneNumbersResponse + var respContent *ListPhoneNumbersResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1339,7 +1339,7 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersProtobuf(ctx co return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ListPurchasedPhoneNumbersResponse and nil error while calling ListPurchasedPhoneNumbers. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *ListPhoneNumbersResponse and nil error while calling ListPhoneNumbers. nil responses are not supported")) return } @@ -1363,7 +1363,7 @@ func (s *phoneNumberServiceServer) serveListPurchasedPhoneNumbersProtobuf(ctx co callResponseSent(ctx, s.hooks) } -func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumber(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveGetPhoneNumber(ctx context.Context, resp http.ResponseWriter, req *http.Request) { header := req.Header.Get("Content-Type") i := strings.Index(header, ";") if i == -1 { @@ -1371,9 +1371,9 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumber(ctx context.Cont } switch strings.TrimSpace(strings.ToLower(header[:i])) { case "application/json": - s.serveGetPurchasedPhoneNumberJSON(ctx, resp, req) + s.serveGetPhoneNumberJSON(ctx, resp, req) case "application/protobuf": - s.serveGetPurchasedPhoneNumberProtobuf(ctx, resp, req) + s.serveGetPhoneNumberProtobuf(ctx, resp, req) default: msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) twerr := badRouteError(msg, req.Method, req.URL.Path) @@ -1381,9 +1381,9 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumber(ctx context.Cont } } -func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveGetPhoneNumberJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "GetPurchasedPhoneNumber") + ctx = ctxsetters.WithMethodName(ctx, "GetPhoneNumber") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1396,29 +1396,29 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberJSON(ctx context. s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - reqContent := new(GetPurchasedPhoneNumberRequest) + reqContent := new(GetPhoneNumberRequest) unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - handler := s.PhoneNumberService.GetPurchasedPhoneNumber + handler := s.PhoneNumberService.GetPhoneNumber if s.interceptor != nil { - handler = func(ctx context.Context, req *GetPurchasedPhoneNumberRequest) (*GetPurchasedPhoneNumberResponse, error) { + handler = func(ctx context.Context, req *GetPhoneNumberRequest) (*GetPhoneNumberResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetPurchasedPhoneNumberRequest) + typedReq, ok := req.(*GetPhoneNumberRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetPurchasedPhoneNumberRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*GetPhoneNumberRequest) when calling interceptor") } - return s.PhoneNumberService.GetPurchasedPhoneNumber(ctx, typedReq) + return s.PhoneNumberService.GetPhoneNumber(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*GetPurchasedPhoneNumberResponse) + typedResp, ok := resp.(*GetPhoneNumberResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetPurchasedPhoneNumberResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*GetPhoneNumberResponse) when calling interceptor") } return typedResp, err } @@ -1427,7 +1427,7 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberJSON(ctx context. } // Call service method - var respContent *GetPurchasedPhoneNumberResponse + var respContent *GetPhoneNumberResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1438,7 +1438,7 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberJSON(ctx context. return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *GetPurchasedPhoneNumberResponse and nil error while calling GetPurchasedPhoneNumber. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *GetPhoneNumberResponse and nil error while calling GetPhoneNumber. nil responses are not supported")) return } @@ -1464,9 +1464,9 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberJSON(ctx context. callResponseSent(ctx, s.hooks) } -func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveGetPhoneNumberProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "GetPurchasedPhoneNumber") + ctx = ctxsetters.WithMethodName(ctx, "GetPhoneNumber") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1478,28 +1478,28 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberProtobuf(ctx cont s.handleRequestBodyError(ctx, resp, "failed to read request body", err) return } - reqContent := new(GetPurchasedPhoneNumberRequest) + reqContent := new(GetPhoneNumberRequest) if err = proto.Unmarshal(buf, reqContent); err != nil { s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) return } - handler := s.PhoneNumberService.GetPurchasedPhoneNumber + handler := s.PhoneNumberService.GetPhoneNumber if s.interceptor != nil { - handler = func(ctx context.Context, req *GetPurchasedPhoneNumberRequest) (*GetPurchasedPhoneNumberResponse, error) { + handler = func(ctx context.Context, req *GetPhoneNumberRequest) (*GetPhoneNumberResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*GetPurchasedPhoneNumberRequest) + typedReq, ok := req.(*GetPhoneNumberRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*GetPurchasedPhoneNumberRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*GetPhoneNumberRequest) when calling interceptor") } - return s.PhoneNumberService.GetPurchasedPhoneNumber(ctx, typedReq) + return s.PhoneNumberService.GetPhoneNumber(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*GetPurchasedPhoneNumberResponse) + typedResp, ok := resp.(*GetPhoneNumberResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*GetPurchasedPhoneNumberResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*GetPhoneNumberResponse) when calling interceptor") } return typedResp, err } @@ -1508,7 +1508,7 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberProtobuf(ctx cont } // Call service method - var respContent *GetPurchasedPhoneNumberResponse + var respContent *GetPhoneNumberResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1519,7 +1519,7 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberProtobuf(ctx cont return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *GetPurchasedPhoneNumberResponse and nil error while calling GetPurchasedPhoneNumber. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *GetPhoneNumberResponse and nil error while calling GetPhoneNumber. nil responses are not supported")) return } @@ -1543,7 +1543,7 @@ func (s *phoneNumberServiceServer) serveGetPurchasedPhoneNumberProtobuf(ctx cont callResponseSent(ctx, s.hooks) } -func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumber(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveUpdatePhoneNumber(ctx context.Context, resp http.ResponseWriter, req *http.Request) { header := req.Header.Get("Content-Type") i := strings.Index(header, ";") if i == -1 { @@ -1551,9 +1551,9 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumber(ctx context.C } switch strings.TrimSpace(strings.ToLower(header[:i])) { case "application/json": - s.serveUpdatePurchasedPhoneNumberJSON(ctx, resp, req) + s.serveUpdatePhoneNumberJSON(ctx, resp, req) case "application/protobuf": - s.serveUpdatePurchasedPhoneNumberProtobuf(ctx, resp, req) + s.serveUpdatePhoneNumberProtobuf(ctx, resp, req) default: msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) twerr := badRouteError(msg, req.Method, req.URL.Path) @@ -1561,9 +1561,9 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumber(ctx context.C } } -func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveUpdatePhoneNumberJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "UpdatePurchasedPhoneNumber") + ctx = ctxsetters.WithMethodName(ctx, "UpdatePhoneNumber") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1576,29 +1576,29 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberJSON(ctx conte s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - reqContent := new(UpdatePurchasedPhoneNumberRequest) + reqContent := new(UpdatePhoneNumberRequest) unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - handler := s.PhoneNumberService.UpdatePurchasedPhoneNumber + handler := s.PhoneNumberService.UpdatePhoneNumber if s.interceptor != nil { - handler = func(ctx context.Context, req *UpdatePurchasedPhoneNumberRequest) (*UpdatePurchasedPhoneNumberResponse, error) { + handler = func(ctx context.Context, req *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*UpdatePurchasedPhoneNumberRequest) + typedReq, ok := req.(*UpdatePhoneNumberRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*UpdatePurchasedPhoneNumberRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*UpdatePhoneNumberRequest) when calling interceptor") } - return s.PhoneNumberService.UpdatePurchasedPhoneNumber(ctx, typedReq) + return s.PhoneNumberService.UpdatePhoneNumber(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*UpdatePurchasedPhoneNumberResponse) + typedResp, ok := resp.(*UpdatePhoneNumberResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*UpdatePurchasedPhoneNumberResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*UpdatePhoneNumberResponse) when calling interceptor") } return typedResp, err } @@ -1607,7 +1607,7 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberJSON(ctx conte } // Call service method - var respContent *UpdatePurchasedPhoneNumberResponse + var respContent *UpdatePhoneNumberResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1618,7 +1618,7 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberJSON(ctx conte return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *UpdatePurchasedPhoneNumberResponse and nil error while calling UpdatePurchasedPhoneNumber. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *UpdatePhoneNumberResponse and nil error while calling UpdatePhoneNumber. nil responses are not supported")) return } @@ -1644,9 +1644,9 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberJSON(ctx conte callResponseSent(ctx, s.hooks) } -func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveUpdatePhoneNumberProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "UpdatePurchasedPhoneNumber") + ctx = ctxsetters.WithMethodName(ctx, "UpdatePhoneNumber") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1658,28 +1658,28 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberProtobuf(ctx c s.handleRequestBodyError(ctx, resp, "failed to read request body", err) return } - reqContent := new(UpdatePurchasedPhoneNumberRequest) + reqContent := new(UpdatePhoneNumberRequest) if err = proto.Unmarshal(buf, reqContent); err != nil { s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) return } - handler := s.PhoneNumberService.UpdatePurchasedPhoneNumber + handler := s.PhoneNumberService.UpdatePhoneNumber if s.interceptor != nil { - handler = func(ctx context.Context, req *UpdatePurchasedPhoneNumberRequest) (*UpdatePurchasedPhoneNumberResponse, error) { + handler = func(ctx context.Context, req *UpdatePhoneNumberRequest) (*UpdatePhoneNumberResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*UpdatePurchasedPhoneNumberRequest) + typedReq, ok := req.(*UpdatePhoneNumberRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*UpdatePurchasedPhoneNumberRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*UpdatePhoneNumberRequest) when calling interceptor") } - return s.PhoneNumberService.UpdatePurchasedPhoneNumber(ctx, typedReq) + return s.PhoneNumberService.UpdatePhoneNumber(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*UpdatePurchasedPhoneNumberResponse) + typedResp, ok := resp.(*UpdatePhoneNumberResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*UpdatePurchasedPhoneNumberResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*UpdatePhoneNumberResponse) when calling interceptor") } return typedResp, err } @@ -1688,7 +1688,7 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberProtobuf(ctx c } // Call service method - var respContent *UpdatePurchasedPhoneNumberResponse + var respContent *UpdatePhoneNumberResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1699,7 +1699,7 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberProtobuf(ctx c return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *UpdatePurchasedPhoneNumberResponse and nil error while calling UpdatePurchasedPhoneNumber. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *UpdatePhoneNumberResponse and nil error while calling UpdatePhoneNumber. nil responses are not supported")) return } @@ -1723,7 +1723,7 @@ func (s *phoneNumberServiceServer) serveUpdatePurchasedPhoneNumberProtobuf(ctx c callResponseSent(ctx, s.hooks) } -func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumber(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveReleasePhoneNumbers(ctx context.Context, resp http.ResponseWriter, req *http.Request) { header := req.Header.Get("Content-Type") i := strings.Index(header, ";") if i == -1 { @@ -1731,9 +1731,9 @@ func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumber(ctx context. } switch strings.TrimSpace(strings.ToLower(header[:i])) { case "application/json": - s.serveReleasePurchasedPhoneNumberJSON(ctx, resp, req) + s.serveReleasePhoneNumbersJSON(ctx, resp, req) case "application/protobuf": - s.serveReleasePurchasedPhoneNumberProtobuf(ctx, resp, req) + s.serveReleasePhoneNumbersProtobuf(ctx, resp, req) default: msg := fmt.Sprintf("unexpected Content-Type: %q", req.Header.Get("Content-Type")) twerr := badRouteError(msg, req.Method, req.URL.Path) @@ -1741,9 +1741,9 @@ func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumber(ctx context. } } -func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumberJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveReleasePhoneNumbersJSON(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "ReleasePurchasedPhoneNumber") + ctx = ctxsetters.WithMethodName(ctx, "ReleasePhoneNumbers") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1756,29 +1756,29 @@ func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumberJSON(ctx cont s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - reqContent := new(ReleasePurchasedPhoneNumbersRequest) + reqContent := new(ReleasePhoneNumbersRequest) unmarshaler := protojson.UnmarshalOptions{DiscardUnknown: true} if err = unmarshaler.Unmarshal(rawReqBody, reqContent); err != nil { s.handleRequestBodyError(ctx, resp, "the json request could not be decoded", err) return } - handler := s.PhoneNumberService.ReleasePurchasedPhoneNumber + handler := s.PhoneNumberService.ReleasePhoneNumbers if s.interceptor != nil { - handler = func(ctx context.Context, req *ReleasePurchasedPhoneNumbersRequest) (*ReleasePurchasedPhoneNumbersResponse, error) { + handler = func(ctx context.Context, req *ReleasePhoneNumbersRequest) (*ReleasePhoneNumbersResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ReleasePurchasedPhoneNumbersRequest) + typedReq, ok := req.(*ReleasePhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ReleasePurchasedPhoneNumbersRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*ReleasePhoneNumbersRequest) when calling interceptor") } - return s.PhoneNumberService.ReleasePurchasedPhoneNumber(ctx, typedReq) + return s.PhoneNumberService.ReleasePhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ReleasePurchasedPhoneNumbersResponse) + typedResp, ok := resp.(*ReleasePhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ReleasePurchasedPhoneNumbersResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*ReleasePhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -1787,7 +1787,7 @@ func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumberJSON(ctx cont } // Call service method - var respContent *ReleasePurchasedPhoneNumbersResponse + var respContent *ReleasePhoneNumbersResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1798,7 +1798,7 @@ func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumberJSON(ctx cont return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ReleasePurchasedPhoneNumbersResponse and nil error while calling ReleasePurchasedPhoneNumber. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *ReleasePhoneNumbersResponse and nil error while calling ReleasePhoneNumbers. nil responses are not supported")) return } @@ -1824,9 +1824,9 @@ func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumberJSON(ctx cont callResponseSent(ctx, s.hooks) } -func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumberProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { +func (s *phoneNumberServiceServer) serveReleasePhoneNumbersProtobuf(ctx context.Context, resp http.ResponseWriter, req *http.Request) { var err error - ctx = ctxsetters.WithMethodName(ctx, "ReleasePurchasedPhoneNumber") + ctx = ctxsetters.WithMethodName(ctx, "ReleasePhoneNumbers") ctx, err = callRequestRouted(ctx, s.hooks) if err != nil { s.writeError(ctx, resp, err) @@ -1838,28 +1838,28 @@ func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumberProtobuf(ctx s.handleRequestBodyError(ctx, resp, "failed to read request body", err) return } - reqContent := new(ReleasePurchasedPhoneNumbersRequest) + reqContent := new(ReleasePhoneNumbersRequest) if err = proto.Unmarshal(buf, reqContent); err != nil { s.writeError(ctx, resp, malformedRequestError("the protobuf request could not be decoded")) return } - handler := s.PhoneNumberService.ReleasePurchasedPhoneNumber + handler := s.PhoneNumberService.ReleasePhoneNumbers if s.interceptor != nil { - handler = func(ctx context.Context, req *ReleasePurchasedPhoneNumbersRequest) (*ReleasePurchasedPhoneNumbersResponse, error) { + handler = func(ctx context.Context, req *ReleasePhoneNumbersRequest) (*ReleasePhoneNumbersResponse, error) { resp, err := s.interceptor( func(ctx context.Context, req interface{}) (interface{}, error) { - typedReq, ok := req.(*ReleasePurchasedPhoneNumbersRequest) + typedReq, ok := req.(*ReleasePhoneNumbersRequest) if !ok { - return nil, twirp.InternalError("failed type assertion req.(*ReleasePurchasedPhoneNumbersRequest) when calling interceptor") + return nil, twirp.InternalError("failed type assertion req.(*ReleasePhoneNumbersRequest) when calling interceptor") } - return s.PhoneNumberService.ReleasePurchasedPhoneNumber(ctx, typedReq) + return s.PhoneNumberService.ReleasePhoneNumbers(ctx, typedReq) }, )(ctx, req) if resp != nil { - typedResp, ok := resp.(*ReleasePurchasedPhoneNumbersResponse) + typedResp, ok := resp.(*ReleasePhoneNumbersResponse) if !ok { - return nil, twirp.InternalError("failed type assertion resp.(*ReleasePurchasedPhoneNumbersResponse) when calling interceptor") + return nil, twirp.InternalError("failed type assertion resp.(*ReleasePhoneNumbersResponse) when calling interceptor") } return typedResp, err } @@ -1868,7 +1868,7 @@ func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumberProtobuf(ctx } // Call service method - var respContent *ReleasePurchasedPhoneNumbersResponse + var respContent *ReleasePhoneNumbersResponse func() { defer ensurePanicResponses(ctx, resp, s.hooks) respContent, err = handler(ctx, reqContent) @@ -1879,7 +1879,7 @@ func (s *phoneNumberServiceServer) serveReleasePurchasedPhoneNumberProtobuf(ctx return } if respContent == nil { - s.writeError(ctx, resp, twirp.InternalError("received a nil *ReleasePurchasedPhoneNumbersResponse and nil error while calling ReleasePurchasedPhoneNumber. nil responses are not supported")) + s.writeError(ctx, resp, twirp.InternalError("received a nil *ReleasePhoneNumbersResponse and nil error while calling ReleasePhoneNumbers. nil responses are not supported")) return } @@ -1919,83 +1919,66 @@ func (s *phoneNumberServiceServer) PathPrefix() string { } var twirpFileDescriptor6 = []byte{ - // 1236 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xdd, 0x8e, 0xdb, 0x44, - 0x14, 0xae, 0x93, 0xcd, 0x76, 0x73, 0xd2, 0x96, 0xec, 0xb0, 0x6a, 0x5d, 0x2f, 0x6d, 0xb2, 0xde, - 0xb6, 0x84, 0x52, 0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0xa2, 0x88, 0x2e, 0x78, 0xbb, 0x64, - 0x12, 0x4b, 0xf7, 0xd7, 0x81, 0x26, 0x56, 0x6d, 0xb8, 0x91, 0xb1, 0x61, 0xa1, 0x8f, 0xa7, 0x0d, - 0x62, 0xe9, 0x0e, 0x28, 0xd5, 0x56, 0x03, 0x13, 0x7b, 0x5f, 0x83, 0x94, 0xbd, 0xb7, 0xa0, 0xa9, - 0xef, 0x2b, 0x17, 0x32, 0xe9, 0xd3, 0xb5, 0xb0, 0x89, 0xe1, 0x6f, 0x61, 0x77, 0xc9, 0xfa, 0x80, - 0x1e, 0x24, 0xb7, 0xad, 0xb1, 0xed, 0x48, 0x9f, 0xad, 0x89, 0x8e, 0xad, 0x1f, 0xde, 0xfd, 0x6a, - 0x7f, 0x44, 0xf8, 0x99, 0x37, 0xa8, 0x9b, 0x74, 0x7c, 0x10, 0x29, 0x87, 0xbf, 0xd3, 0x26, 0xb5, - 0x62, 0xc1, 0x60, 0x33, 0x90, 0x3c, 0xfc, 0x27, 0x00, 0x00, 0xff, 0xff, 0x82, 0x3a, 0x98, 0x8a, - 0x95, 0x0f, 0x00, 0x00, + // 965 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xe1, 0x8e, 0xdb, 0x44, + 0x10, 0x3e, 0x27, 0xb9, 0xeb, 0x65, 0x7c, 0x77, 0xcd, 0x2d, 0x47, 0x71, 0x7d, 0xb4, 0x49, 0x7d, + 0x20, 0x45, 0xfd, 0x91, 0x13, 0x01, 0x51, 0x55, 0xfc, 0x21, 0xbd, 0x4b, 0x4b, 0x50, 0x09, 0xc1, + 0xce, 0x21, 0x40, 0x48, 0xd6, 0xc6, 0xde, 0x26, 0xab, 0xda, 0x5e, 0xe3, 0x5d, 0x57, 0xdc, 0x1f, + 0x1e, 0x80, 0x57, 0xe0, 0x09, 0xe0, 0x55, 0x10, 0x4f, 0xc2, 0x4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x3a, 0xf0, 0x7e, 0x19, 0xc1, 0x1c, 0xbe, 0x1c, 0x0e, 0xac, 0xe1, 0x65, 0xab, 0xde, 0xff, + 0xb3, 0x01, 0xa8, 0xa8, 0x8e, 0x44, 0x6f, 0xa8, 0x43, 0x90, 0x0d, 0x68, 0x7d, 0xc3, 0x23, 0x23, + 0xaf, 0x4c, 0xe5, 0x7f, 0x15, 0xfd, 0x6c, 0x23, 0x47, 0x76, 0xe0, 0x0e, 0x9a, 0xc1, 0x3b, 0x25, + 0x2b, 0x14, 0xbd, 0xf5, 0xae, 0x5e, 0xea, 0xfa, 0x07, 0x9b, 0x49, 0xf9, 0x19, 0xdf, 0x43, 0x6b, + 0x75, 0xf7, 0xa0, 0x4e, 0xee, 0x5b, 0xb1, 0x66, 0xf5, 0x47, 0x1b, 0x18, 0x79, 0x68, 0x0b, 0x8e, + 0x6e, 0xce, 0x77, 0xf4, 0x30, 0x77, 0x2b, 0x5d, 0x22, 0x7a, 0xbb, 0xd2, 0x9e, 0x07, 0xfd, 0x11, + 0x8e, 0xd7, 0x26, 0x2c, 0x7a, 0x2b, 0xa7, 0x6a, 0xfa, 0xeb, 0xc6, 0x26, 0x4a, 0x31, 0xe3, 0x25, + 0x43, 0xb1, 0x90, 0xf1, 0xea, 0x39, 0x5c, 0xc8, 0xf8, 0xa6, 0xb9, 0xba, 0xf3, 0xec, 0xc3, 0x1f, + 0xce, 0xe6, 0x54, 0x2c, 0xe2, 0x59, 0xcf, 0x61, 0xfe, 0xb9, 0xf4, 0xc9, 0xfe, 0x0b, 0x3b, 0xcc, + 0x5b, 0x02, 0xb3, 0xbd, 0x14, 0xf9, 0xf8, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xd7, 0xf6, + 0x4b, 0x52, 0x0b, 0x00, 0x00, } diff --git a/protobufs/livekit_phone_number.proto b/protobufs/livekit_phone_number.proto index 935fcff80..ef23df625 100644 --- a/protobufs/livekit_phone_number.proto +++ b/protobufs/livekit_phone_number.proto @@ -7,15 +7,6 @@ option go_package = "github.com/livekit/protocol/livekit"; import "google/protobuf/timestamp.proto"; import "livekit_models.proto"; -// Telephony cost type enumeration -enum TelephonyCostType { - TELEPHONY_COST_TYPE_UNSPECIFIED = 0; // Default value - TELEPHONY_COST_TYPE_NUMBER_RENTAL = 1; // Monthly rental for the phone number - TELEPHONY_COST_TYPE_VOICE_INBOUND = 2; // Inbound voice calls - TELEPHONY_COST_TYPE_VOICE_OUTBOUND = 3; // Outbound voice calls - TELEPHONY_COST_TYPE_SMS_INBOUND = 4; // Inbound SMS - TELEPHONY_COST_TYPE_SMS_OUTBOUND = 5; // Outbound SMS -} // Phone number status enumeration enum PhoneNumberStatus { @@ -27,42 +18,42 @@ enum PhoneNumberStatus { // Public Phone Number Service - External API for phone number management service PhoneNumberService { - // List available phone numbers in inventory - rpc ListPhoneNumberInventory(ListPhoneNumberInventoryRequest) - returns (ListPhoneNumberInventoryResponse) {} + // Search available phone numbers in inventory + rpc SearchPhoneNumbers(SearchPhoneNumbersRequest) + returns (SearchPhoneNumbersResponse) {} // Purchase a phone number from inventory rpc PurchasePhoneNumber(PurchasePhoneNumberRequest) returns (PurchasePhoneNumberResponse) {} - // List purchased phone numbers for a project - rpc ListPurchasedPhoneNumbers(ListPurchasedPhoneNumbersRequest) - returns (ListPurchasedPhoneNumbersResponse) {} + // List phone numbers for a project + rpc ListPhoneNumbers(ListPhoneNumbersRequest) + returns (ListPhoneNumbersResponse) {} - // Get a purchased phone number - rpc GetPurchasedPhoneNumber(GetPurchasedPhoneNumberRequest) - returns (GetPurchasedPhoneNumberResponse) {} + // Get a phone number from a project + rpc GetPhoneNumber(GetPhoneNumberRequest) + returns (GetPhoneNumberResponse) {} - // Update a purchased phone number - rpc UpdatePurchasedPhoneNumber(UpdatePurchasedPhoneNumberRequest) - returns (UpdatePurchasedPhoneNumberResponse) {} + // Update a phone number in a project + rpc UpdatePhoneNumber(UpdatePhoneNumberRequest) + returns (UpdatePhoneNumberResponse) {} - // Release a purchased phone number - rpc ReleasePurchasedPhoneNumber(ReleasePurchasedPhoneNumbersRequest) - returns (ReleasePurchasedPhoneNumbersResponse) {} + // Release phone numbers + rpc ReleasePhoneNumbers(ReleasePhoneNumbersRequest) + returns (ReleasePhoneNumbersResponse) {} } -// ListPhoneNumberInventoryRequest - Request to list available phone numbers -message ListPhoneNumberInventoryRequest { +// SearchPhoneNumbersRequest - Request to search available phone numbers +message SearchPhoneNumbersRequest { string country_code = 1; // Optional: Filter by country code (e.g., "US", "CA") string area_code = 2; // Optional: Filter by area code (e.g., "415") int32 limit = 3; // Optional: Maximum number of results (default: 50) TokenPagination page_token = 4; // Optional: Token for pagination (empty for first page) } -// ListPhoneNumberInventoryResponse - Response containing available phone numbers -message ListPhoneNumberInventoryResponse { - repeated PhoneNumberInventoryItem items = 1; // List of available phone numbers +// SearchPhoneNumbersResponse - Response containing available phone numbers +message SearchPhoneNumbersResponse { + repeated PhoneNumber items = 1; // List of available phone numbers TokenPagination next_page_token = 2; // Token for next page (empty if no more pages) } @@ -74,95 +65,73 @@ message PurchasePhoneNumberRequest { // PurchasePhoneNumberResponse - Response containing the purchased phone numbers message PurchasePhoneNumberResponse { - repeated PurchasedPhoneNumber phone_numbers = 1; // Details of the purchased phone numbers + repeated PhoneNumber phone_numbers = 1; // Details of the purchased phone numbers } -// ListPurchasedPhoneNumbersRequest - Request to list purchased phone numbers -message ListPurchasedPhoneNumbersRequest { +// ListPhoneNumbersRequest - Request to list phone numbers +message ListPhoneNumbersRequest { int32 limit = 1; // Optional: Maximum number of results (default: 50) PhoneNumberStatus status = 2; // Optional: Filter by status (active, pending, released) TokenPagination page_token = 3; // Optional: Token for pagination (empty for first page) string sip_dispatch_rule_id = 4; // Optional: Filter by SIP dispatch rule ID } -// ListPurchasedPhoneNumbersResponse - Response containing purchased phone numbers -message ListPurchasedPhoneNumbersResponse { - repeated PurchasedPhoneNumber items = 1; // List of purchased phone numbers +// ListPhoneNumbersResponse - Response containing phone numbers +message ListPhoneNumbersResponse { + repeated PhoneNumber items = 1; // List of phone numbers TokenPagination next_page_token = 2; // Token for next page (empty if no more pages) - int32 total_count = 3; // Total number of purchased phone numbers + int32 total_count = 3; // Total number of phone numbers } -// GetPurchasedPhoneNumberRequest - Request to get a purchased phone number -message GetPurchasedPhoneNumberRequest { - string purchased_phone_number_id = 1; // Optional: Use purchased phone number ID for direct lookup +// GetPhoneNumberRequest - Request to get a phone number +message GetPhoneNumberRequest { + string id = 1; // Optional: Use phone number ID for direct lookup string phone_number = 2; // Optional: Use phone number string for lookup } -// GetPurchasedPhoneNumberResponse - Response containing the purchased phone number -message GetPurchasedPhoneNumberResponse { - PurchasedPhoneNumber phone_number = 1; // The purchased phone number details +// GetPhoneNumberResponse - Response containing the phone number +message GetPhoneNumberResponse { + PhoneNumber phone_number = 1; // The phone number details } -// UpdatePurchasedPhoneNumberRequest - Request to update a purchased phone number -message UpdatePurchasedPhoneNumberRequest { - string purchased_phone_number_id = 1; // Optional: Use purchased phone number ID for direct lookup +// UpdatePhoneNumberRequest - Request to update a phone number +message UpdatePhoneNumberRequest { + string id = 1; // Optional: Use phone number ID for direct lookup string phone_number = 2; // Optional: Use phone number string for lookup string sip_dispatch_rule_id = 3; // Optional: SIP dispatch rule ID to assign to the phone number } -// UpdatePurchasedPhoneNumberResponse - Response containing the updated purchased phone number -message UpdatePurchasedPhoneNumberResponse { - PurchasedPhoneNumber phone_number = 1; // The updated purchased phone number details +// UpdatePhoneNumberResponse - Response containing the updated phone number +message UpdatePhoneNumberResponse { + PhoneNumber phone_number = 1; // The updated phone number details } -// ReleasePurchasedPhoneNumbersRequest - Request to release purchased phone numbers -message ReleasePurchasedPhoneNumbersRequest { - repeated string purchased_phone_number_ids = 1; // Optional: Use purchased phone number IDs for direct lookup +// ReleasePhoneNumbersRequest - Request to release phone numbers +message ReleasePhoneNumbersRequest { + repeated string ids = 1; // Optional: Use phone number IDs for direct lookup repeated string phone_numbers = 2; // Optional: Use phone number strings for lookup } -// ReleasePurchasedPhoneNumbersResponse - Response for releasing purchased phone numbers -message ReleasePurchasedPhoneNumbersResponse { +// ReleasePhoneNumbersResponse - Response for releasing phone numbers +message ReleasePhoneNumbersResponse { // Empty response - operation completed successfully } -// GlobalPhoneNumber represents a phone number with standardized format -message GlobalPhoneNumber { - string id = 1; // unique identifier - string e164_format = 2; // e.g., "+14155552671" - string country_code = 3; // e.g., "US" - string area_code = 4; // e.g., "415" - string number_type = 5; // e.g., local, toll-free, national, mobile +// PhoneNumber - Unified phone number type for inventory and purchased numbers +message PhoneNumber { + string id = 1; // Unique identifier + string e164_format = 2; // Phone number in E.164 format (e.g., "+14155552671") + string country_code = 3; // Country code (e.g., "US") + string area_code = 4; // Area code (e.g., "415") + string number_type = 5; // Number type (e.g., local, toll-free, national, mobile) string locality = 6; // City/locality (e.g., "San Francisco") string region = 7; // State/region (e.g., "CA") - double spam_score = 8; // can be used later for fraud detection - google.protobuf.Timestamp created_at = 9; // timestamp when created - google.protobuf.Timestamp updated_at = 10; // timestamp when updated -} - -// TelephonyCost represents the pricing structure for a specific telephony service -message TelephonyCost { - TelephonyCostType resource = 1; // Type of telephony service - string currency = 2; // Currency code (e.g., "USD", "EUR") - double price = 3; // Price for this service - string billing_unit = 4; // Billing unit (e.g., "month", "minute", "message", "call") -} - - - -// PhoneNumberInventoryItem - Represents an available phone number for purchase -message PhoneNumberInventoryItem { - GlobalPhoneNumber phone_number = 1; // Common phone number fields - repeated string capabilities = 2; // Comma-separated capabilities (e.g., "voice,sms") - repeated TelephonyCost costs = 3; // Array of costs for different services -} - -// PurchasedPhoneNumber - Represents a phone number owned by a LiveKit project -message PurchasedPhoneNumber { - string purchased_phone_number_id = 1; // Unique identifier for the purchased phone number - GlobalPhoneNumber phone_number = 2; // Common phone number fields - PhoneNumberStatus status = 3; // Current status of the phone number - google.protobuf.Timestamp assigned_at = 4; // Timestamp when the number was assigned - google.protobuf.Timestamp released_at = 5; // Timestamp when the number was released (if applicable) - string sip_dispatch_rule_id = 6; // Optional: Associated SIP dispatch rule + double spam_score = 8; // Spam score for fraud detection + google.protobuf.Timestamp created_at = 9; // Creation timestamp + google.protobuf.Timestamp updated_at = 10; // Last update timestamp + repeated string capabilities = 11; // Available capabilities (e.g., "voice", "sms") + PhoneNumberStatus status = 12; // Current status + google.protobuf.Timestamp assigned_at = 13; // Assignment timestamp + google.protobuf.Timestamp released_at = 14; // Release timestamp (if applicable) + string sip_dispatch_rule_id = 15; // Associated SIP dispatch rule ID }