Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"authorizationToken": { "index": 8, "kind": "property", "displayName": "Authorization Token", "group": "security", "label": "security", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "Authorization Token taken from WhatsApp Meta for Developers Dashboard" }
},
"headers": {
"CamelWhatsAppPhoneNumberId": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "autowired": false, "secret": false, "description": "Phone Number ID taken from WhatsApp Meta for Developers Dashboard", "constantName": "org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_PHONE_NUMBER_ID" },
"CamelWhatsAppRecipientPhoneNumberId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "autowired": false, "secret": false, "description": "Recipient phone number associated with Phone Number ID", "constantName": "org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_RECIPIENT_PHONE_NUMBER_ID" }
"CamelWhatsAppPhoneNumberId": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": true, "deprecationNote": "Never read by the component: the phone number ID comes from the endpoint URI, as the phoneNumberId path parameter", "autowired": false, "secret": false, "description": "Phone Number ID taken from WhatsApp Meta for Developers Dashboard. Deprecation note: Never read by the component: the phone number ID comes from the endpoint URI, as the phoneNumberId path parameter", "constantName": "org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_PHONE_NUMBER_ID" },
"CamelWhatsAppRecipientPhoneNumberId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": true, "deprecationNote": "Never read by the component: the recipient comes from the to field of the BaseMessage the body is converted to", "autowired": false, "secret": false, "description": "Recipient phone number associated with Phone Number ID. Deprecation note: Never read by the component: the recipient comes from the to field of the BaseMessage the body is converted to", "constantName": "org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_RECIPIENT_PHONE_NUMBER_ID" }
},
"bodyTypes": {
"consumerOut": { "carriers": [ "text", "null" ], "description": "In webhook mode (webhook:whatsapp:...), the event that WhatsApp posts, as JSON text. The verification request of WhatsApp (a GET) also reaches the route, with the hub.challenge as the body when hub.mode is subscribe and hub.verify_token matches webhookVerifyToken, else with no body (403, or 400 when the parameters are missing). An event without a valid X-Hub-Signature-256 is answered with 403 and does not reach the route, unless webhookVerification is false" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"authorizationToken": { "index": 8, "kind": "property", "displayName": "Authorization Token", "group": "security", "label": "security", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "Authorization Token taken from WhatsApp Meta for Developers Dashboard" }
},
"headers": {
"CamelWhatsAppPhoneNumberId": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "autowired": false, "secret": false, "description": "Phone Number ID taken from WhatsApp Meta for Developers Dashboard", "constantName": "org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_PHONE_NUMBER_ID" },
"CamelWhatsAppRecipientPhoneNumberId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": false, "autowired": false, "secret": false, "description": "Recipient phone number associated with Phone Number ID", "constantName": "org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_RECIPIENT_PHONE_NUMBER_ID" }
"CamelWhatsAppPhoneNumberId": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": true, "deprecationNote": "Never read by the component: the phone number ID comes from the endpoint URI, as the phoneNumberId path parameter", "autowired": false, "secret": false, "description": "Phone Number ID taken from WhatsApp Meta for Developers Dashboard. Deprecation note: Never read by the component: the phone number ID comes from the endpoint URI, as the phoneNumberId path parameter", "constantName": "org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_PHONE_NUMBER_ID" },
"CamelWhatsAppRecipientPhoneNumberId": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Object", "deprecated": true, "deprecationNote": "Never read by the component: the recipient comes from the to field of the BaseMessage the body is converted to", "autowired": false, "secret": false, "description": "Recipient phone number associated with Phone Number ID. Deprecation note: Never read by the component: the recipient comes from the to field of the BaseMessage the body is converted to", "constantName": "org.apache.camel.component.whatsapp.WhatsAppConstants#WHATSAPP_RECIPIENT_PHONE_NUMBER_ID" }
},
"bodyTypes": {
"consumerOut": { "carriers": [ "text", "null" ], "description": "In webhook mode (webhook:whatsapp:...), the event that WhatsApp posts, as JSON text. The verification request of WhatsApp (a GET) also reaches the route, with the hub.challenge as the body when hub.mode is subscribe and hub.verify_token matches webhookVerifyToken, else with no body (403, or 400 when the parameters are missing). An event without a valid X-Hub-Signature-256 is answered with 403 and does not reach the route, unless webhookVerification is false" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@
public final class WhatsAppConstants {

@Metadata(label = "producer", description = "Phone Number ID taken from WhatsApp Meta for Developers Dashboard",
javaType = "Object")
javaType = "Object",
deprecationNote = "Never read by the component: the phone number ID comes from the endpoint URI, as the"
+ " phoneNumberId path parameter")
@Deprecated
public static final String WHATSAPP_PHONE_NUMBER_ID = "CamelWhatsAppPhoneNumberId";

@Metadata(label = "producer", description = "Recipient phone number associated with Phone Number ID", javaType = "Object")
@Metadata(label = "producer", description = "Recipient phone number associated with Phone Number ID", javaType = "Object",
deprecationNote = "Never read by the component: the recipient comes from the to field of the BaseMessage the body"
+ " is converted to")
@Deprecated
public static final String WHATSAPP_RECIPIENT_PHONE_NUMBER_ID = "CamelWhatsAppRecipientPhoneNumberId";

private WhatsAppConstants() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9343,6 +9343,32 @@ the permission with `CamelKeycloakPermissionId`

Each is now deprecated, with a `deprecationNote` carrying the same information.

=== camel-whatsapp - both documented headers are deprecated

`CamelWhatsAppPhoneNumberId` and `CamelWhatsAppRecipientPhoneNumberId` were the only two headers the component
documented, and it reads neither. A route that sets them gets no error and no effect.

The phone number ID is the path parameter of the endpoint, so set it in the URI:

[source,java]
----
from("direct:start")
.to("whatsapp:1234567890?authorizationToken=token");
----

The recipient is the `to` field of the `BaseMessage` the producer converts the body to, since `WhatsAppProducer` sends
`exchange.getIn().getBody(BaseMessage.class)` as it is:

[source,java]
----
TextMessageRequest request = new TextMessageRequest();
request.setTo("15550001111");
request.setText(new TextMessage());
request.getText().setBody("Hello");
----

Both headers are now deprecated, each with a `deprecationNote` that names the replacement.

=== camel-docker - the loggingFilter and followRedirectFilter options are deprecated

Neither option has had any effect since Camel 2.18, when the docker-java 3.x upgrade removed the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -908,18 +908,23 @@ public static class WhatsAppHeaderNameBuilder {

/**
* Phone Number ID taken from WhatsApp Meta for Developers Dashboard.
* Deprecation note: Never read by the component: the phone number ID
* comes from the endpoint URI, as the phoneNumberId path parameter.
*
* The option is a: {@code Object} type.
*
* Group: producer
*
* @return the name of the header {@code WhatsAppPhoneNumberId}.
*/
@Deprecated
public String whatsAppPhoneNumberId() {
return "CamelWhatsAppPhoneNumberId";
}
/**
* Recipient phone number associated with Phone Number ID.
* Recipient phone number associated with Phone Number ID. Deprecation
* note: Never read by the component: the recipient comes from the to
* field of the BaseMessage the body is converted to.
*
* The option is a: {@code Object} type.
*
Expand All @@ -928,6 +933,7 @@ public String whatsAppPhoneNumberId() {
* @return the name of the header {@code
* WhatsAppRecipientPhoneNumberId}.
*/
@Deprecated
public String whatsAppRecipientPhoneNumberId() {
return "CamelWhatsAppRecipientPhoneNumberId";
}
Expand Down
Loading