@great-detail/whatsapp
Advanced tools
Comparing version 5.2.0 to 5.3.0
@@ -13,3 +13,2 @@ /// <reference types="node" /> | ||
import { IncomingMessage, ServerResponse } from "http"; | ||
export type ServerResponseTransform = (response: ServerResponse) => ServerResponse; | ||
export interface WebhookAPIRegisterReturn { | ||
@@ -44,3 +43,3 @@ /** | ||
*/ | ||
accept: (transform?: ServerResponseTransform) => ServerResponse; | ||
accept: () => ServerResponse; | ||
/** | ||
@@ -57,3 +56,3 @@ * Reject the Webhook Registration. | ||
*/ | ||
reject: (transform?: ServerResponseTransform) => ServerResponse; | ||
reject: () => ServerResponse; | ||
} | ||
@@ -73,3 +72,3 @@ export interface WebhookAPIEventNotificationReturn { | ||
*/ | ||
accept: (transform?: ServerResponseTransform) => ServerResponse; | ||
accept: () => ServerResponse; | ||
/** | ||
@@ -86,3 +85,3 @@ * Reject the Incoming Webhook. | ||
*/ | ||
reject: (transform?: ServerResponseTransform) => ServerResponse; | ||
reject: () => ServerResponse; | ||
/** | ||
@@ -89,0 +88,0 @@ * Check the integrity of the request body. |
@@ -35,7 +35,7 @@ "use strict"; | ||
challenge: hubChallenge, | ||
accept: transform => { | ||
return (transform?.(res) ?? res).end(hubChallenge); | ||
accept: () => { | ||
return res.end(hubChallenge); | ||
}, | ||
reject: transform => { | ||
return (transform?.(res) ?? res).end(); | ||
reject: () => { | ||
return res.end(); | ||
} | ||
@@ -76,7 +76,7 @@ }; | ||
}, | ||
accept: transform => { | ||
return (transform?.(res) ?? res).end(); | ||
accept: () => { | ||
return res.end(); | ||
}, | ||
reject: transform => { | ||
return (transform?.(res) ?? res).end(); | ||
reject: () => { | ||
return res.end(); | ||
} | ||
@@ -83,0 +83,0 @@ }; |
{ | ||
"name": "@great-detail/whatsapp", | ||
"version": "5.2.0", | ||
"version": "5.3.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "description": "SDK for interfacing with WhatsApp Business Platform in Typescript or Node.js using the Cloud API, hosted by Meta.", |
@@ -15,6 +15,2 @@ /** | ||
export type ServerResponseTransform = ( | ||
response: ServerResponse, | ||
) => ServerResponse; | ||
export interface WebhookAPIRegisterReturn { | ||
@@ -51,3 +47,3 @@ /** | ||
*/ | ||
accept: (transform?: ServerResponseTransform) => ServerResponse; | ||
accept: () => ServerResponse; | ||
@@ -65,3 +61,3 @@ /** | ||
*/ | ||
reject: (transform?: ServerResponseTransform) => ServerResponse; | ||
reject: () => ServerResponse; | ||
} | ||
@@ -82,3 +78,3 @@ | ||
*/ | ||
accept: (transform?: ServerResponseTransform) => ServerResponse; | ||
accept: () => ServerResponse; | ||
@@ -96,3 +92,3 @@ /** | ||
*/ | ||
reject: (transform?: ServerResponseTransform) => ServerResponse; | ||
reject: () => ServerResponse; | ||
@@ -177,7 +173,7 @@ /** | ||
challenge: hubChallenge, | ||
accept: (transform) => { | ||
return (transform?.(res) ?? res).end(hubChallenge); | ||
accept: () => { | ||
return res.end(hubChallenge); | ||
}, | ||
reject: (transform) => { | ||
return (transform?.(res) ?? res).end(); | ||
reject: () => { | ||
return res.end(); | ||
}, | ||
@@ -257,7 +253,7 @@ }; | ||
}, | ||
accept: (transform) => { | ||
return (transform?.(res) ?? res).end(); | ||
accept: () => { | ||
return res.end(); | ||
}, | ||
reject: (transform) => { | ||
return (transform?.(res) ?? res).end(); | ||
reject: () => { | ||
return res.end(); | ||
}, | ||
@@ -264,0 +260,0 @@ }; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
293662
8221