meta-cloud-api 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { B as BusinessProfileApi } from './BusinessProfileApi-WXscSgo-.js';
|
|
|
10
10
|
export { T as TemplateApi } from './TemplateApi-xGgIZt89.js';
|
|
11
11
|
export { T as TwoStepVerificationApi } from './TwoStepVerificationApi-DfNPIz-C.js';
|
|
12
12
|
export { W as WebhookContact, a as WebhookEvent, b as WebhookMessage } from './WebhookProcessor-BXYunz4N.js';
|
|
13
|
-
export { i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest } from './
|
|
13
|
+
export { M as MetaError, i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest, c as isMetaError } from './isMetaError-CXWJwW58.js';
|
|
14
14
|
export { webhookHandler as ExpressWebhook } from './core/webhook/frameworks/express.js';
|
|
15
15
|
export { webhookHandler as NextJsWebhook } from './core/webhook/frameworks/nextjs.js';
|
|
16
16
|
import './request-vYMaEfk5.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import'./chunk-RWCVPWRC.js';export{a as ExpressWebhook}from'./chunk-NOJFGTRT.js';export{a as NextJsWebhook}from'./chunk-YXZ4L2OK.js';import'./chunk-JPGXONBQ.js';export{a as isFlowDataExchangeRequest,b as isFlowErrorRequest,c as isFlowPingRequest}from'./chunk-WGGN32O2.js';export{b as WhatsApp,b as WhatsAppLegacy}from'./chunk-BAOZ4U74.js';
|
|
1
|
+
import'./chunk-RWCVPWRC.js';export{a as ExpressWebhook}from'./chunk-NOJFGTRT.js';export{a as NextJsWebhook}from'./chunk-YXZ4L2OK.js';import'./chunk-JPGXONBQ.js';export{a as isFlowDataExchangeRequest,b as isFlowErrorRequest,c as isFlowPingRequest}from'./chunk-WGGN32O2.js';export{b as WhatsApp,b as WhatsAppLegacy}from'./chunk-BAOZ4U74.js';export{c as isMetaError}from'./chunk-FKXSL2JK.js';import'./chunk-AMHQGG6Z.js';export{a as TemplateApi}from'./chunk-VHAODWCN.js';import'./chunk-JPAV644F.js';import'./chunk-PHPQ5HP3.js';import'./chunk-IYSR44P6.js';export{b as TwoStepVerificationApi}from'./chunk-SNNRWNGZ.js';import'./chunk-L4ESAO2S.js';export{b as MessagesApi}from'./chunk-7QBIZCJ4.js';export{b as MediaApi}from'./chunk-JXCLRKQ7.js';export{b as BusinessProfileApi}from'./chunk-LV3TULSI.js';import'./chunk-CRZ7EUYR.js';export{b as FlowApi}from'./chunk-JC6YMVID.js';export{a as FlowTypeEnum}from'./chunk-NLF2JGYY.js';export{b as PhoneNumberApi}from'./chunk-FSKBLPGE.js';import'./chunk-MJEG3K4V.js';import'./chunk-RIL6QABY.js';export{i as ComponentTypesEnum,f as InteractiveTypesEnum,v as LanguagesEnum,d as MessageTypesEnum,e as ParametersTypesEnum}from'./chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -40,4 +40,24 @@ declare function isFlowErrorRequest(request: FlowEndpointRequest): request is Fl
|
|
|
40
40
|
*/
|
|
41
41
|
declare function isFlowPingRequest(request: FlowEndpointRequest): request is FlowHealthCheckRequest;
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
interface MetaError extends Error {
|
|
44
|
+
error: {
|
|
45
|
+
message: string;
|
|
46
|
+
type: string;
|
|
47
|
+
code: number;
|
|
48
|
+
error_data?: {
|
|
49
|
+
messaging_product: 'whatsapp';
|
|
50
|
+
details: string;
|
|
51
|
+
};
|
|
52
|
+
error_subcode?: number;
|
|
53
|
+
fbtrace_id: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Determines if the error is a Meta API error response
|
|
58
|
+
* @param error Any error object to check
|
|
59
|
+
* @returns Type guard indicating if error is a Meta API error
|
|
60
|
+
*/
|
|
61
|
+
declare function isMetaError(error: any): error is MetaError;
|
|
62
|
+
|
|
63
|
+
export { type MetaError as M, isFlowErrorRequest as a, isFlowPingRequest as b, isMetaError as c, isFlowDataExchangeRequest as i };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WabaConfigType } from '../types/config.js';
|
|
2
|
+
export { M as MetaError, i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest, c as isMetaError } from '../isMetaError-CXWJwW58.js';
|
|
2
3
|
import { L as LoggerInterface } from '../logger-BdE0Vyim.js';
|
|
3
|
-
export { i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest } from '../flowTypeGuards-B5hBzkZ4.js';
|
|
4
4
|
import '../enums-BZd9T2ul.js';
|
|
5
5
|
import '../common-lV0NsO7t.js';
|
|
6
6
|
import '../request-vYMaEfk5.js';
|
|
@@ -15,26 +15,6 @@ declare function buildFieldsQueryString(fields?: string[] | string): string;
|
|
|
15
15
|
*/
|
|
16
16
|
declare function formatConfigTable(config: WabaConfigType): string;
|
|
17
17
|
|
|
18
|
-
interface MetaError extends Error {
|
|
19
|
-
error: {
|
|
20
|
-
message: string;
|
|
21
|
-
type: string;
|
|
22
|
-
code: number;
|
|
23
|
-
error_data?: {
|
|
24
|
-
messaging_product: 'whatsapp';
|
|
25
|
-
details: string;
|
|
26
|
-
};
|
|
27
|
-
error_subcode?: number;
|
|
28
|
-
fbtrace_id: string;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Determines if the error is a Meta API error response
|
|
33
|
-
* @param error Any error object to check
|
|
34
|
-
* @returns Type guard indicating if error is a Meta API error
|
|
35
|
-
*/
|
|
36
|
-
declare function isMetaError(error: any): error is MetaError;
|
|
37
|
-
|
|
38
18
|
declare class Logger implements LoggerInterface {
|
|
39
19
|
private name;
|
|
40
20
|
private debug;
|
|
@@ -56,4 +36,4 @@ declare function getVersion(): string;
|
|
|
56
36
|
*/
|
|
57
37
|
declare function getUserAgent(): string;
|
|
58
38
|
|
|
59
|
-
export { Logger,
|
|
39
|
+
export { Logger, buildFieldsQueryString, formatConfigTable, getUserAgent, getVersion, objectToQueryString };
|