meta-cloud-api 0.2.12 → 0.2.13
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/README.md +5 -2
- package/dist/api/index.d.mts +495 -27
- package/dist/api/index.mjs +1 -1
- package/dist/api/index.mjs.map +1 -1
- package/dist/chunk-KZQQJAPX.mjs +2 -0
- package/dist/chunk-KZQQJAPX.mjs.map +1 -0
- package/dist/chunk-N7A7DQDX.mjs +2 -0
- package/dist/chunk-N7A7DQDX.mjs.map +1 -0
- package/dist/chunk-QE4PKOSW.mjs +2 -0
- package/dist/chunk-QE4PKOSW.mjs.map +1 -0
- package/dist/chunk-R4CFE2XP.mjs +2 -0
- package/dist/chunk-R4CFE2XP.mjs.map +1 -0
- package/dist/chunk-XVYL7ZTG.mjs +2 -0
- package/dist/chunk-XVYL7ZTG.mjs.map +1 -0
- package/dist/index.d.mts +142 -43
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +512 -19
- package/dist/types/index.mjs +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/dist/utils/index.d.mts +70 -21
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/dist/waba-RRlZTQUG.d.mts +2229 -0
- package/dist/{types/whatsapp.d.ts → whatsapp-BNHXjrds.d.mts} +2 -17
- package/package.json +52 -18
- package/dist/api/base.d.mts +0 -15
- package/dist/api/base.d.ts +0 -15
- package/dist/api/base.js +0 -2
- package/dist/api/base.js.map +0 -1
- package/dist/api/base.mjs +0 -2
- package/dist/api/base.mjs.map +0 -1
- package/dist/api/businessProfile.d.mts +0 -145
- package/dist/api/businessProfile.d.ts +0 -145
- package/dist/api/businessProfile.js +0 -2
- package/dist/api/businessProfile.js.map +0 -1
- package/dist/api/businessProfile.mjs +0 -2
- package/dist/api/businessProfile.mjs.map +0 -1
- package/dist/api/encryption.d.mts +0 -15
- package/dist/api/encryption.d.ts +0 -15
- package/dist/api/encryption.js +0 -2
- package/dist/api/encryption.js.map +0 -1
- package/dist/api/encryption.mjs +0 -2
- package/dist/api/encryption.mjs.map +0 -1
- package/dist/api/flow.d.mts +0 -126
- package/dist/api/flow.d.ts +0 -126
- package/dist/api/flow.js +0 -2
- package/dist/api/flow.js.map +0 -1
- package/dist/api/flow.mjs +0 -2
- package/dist/api/flow.mjs.map +0 -1
- package/dist/api/index.d.ts +0 -28
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +0 -1
- package/dist/api/media.d.mts +0 -17
- package/dist/api/media.d.ts +0 -17
- package/dist/api/media.js +0 -2
- package/dist/api/media.js.map +0 -1
- package/dist/api/media.mjs +0 -2
- package/dist/api/media.mjs.map +0 -1
- package/dist/api/messages.d.mts +0 -193
- package/dist/api/messages.d.ts +0 -193
- package/dist/api/messages.js +0 -2
- package/dist/api/messages.js.map +0 -1
- package/dist/api/messages.mjs +0 -2
- package/dist/api/messages.mjs.map +0 -1
- package/dist/api/phoneNumber.d.mts +0 -17
- package/dist/api/phoneNumber.d.ts +0 -17
- package/dist/api/phoneNumber.js +0 -2
- package/dist/api/phoneNumber.js.map +0 -1
- package/dist/api/phoneNumber.mjs +0 -2
- package/dist/api/phoneNumber.mjs.map +0 -1
- package/dist/api/qrCode.d.mts +0 -18
- package/dist/api/qrCode.d.ts +0 -18
- package/dist/api/qrCode.js +0 -2
- package/dist/api/qrCode.js.map +0 -1
- package/dist/api/qrCode.mjs +0 -2
- package/dist/api/qrCode.mjs.map +0 -1
- package/dist/api/registration.d.mts +0 -14
- package/dist/api/registration.d.ts +0 -14
- package/dist/api/registration.js +0 -2
- package/dist/api/registration.js.map +0 -1
- package/dist/api/registration.mjs +0 -2
- package/dist/api/registration.mjs.map +0 -1
- package/dist/api/template.d.mts +0 -18
- package/dist/api/template.d.ts +0 -18
- package/dist/api/template.js +0 -2
- package/dist/api/template.js.map +0 -1
- package/dist/api/template.mjs +0 -2
- package/dist/api/template.mjs.map +0 -1
- package/dist/api/twoStepVerification.d.mts +0 -13
- package/dist/api/twoStepVerification.d.ts +0 -13
- package/dist/api/twoStepVerification.js +0 -2
- package/dist/api/twoStepVerification.js.map +0 -1
- package/dist/api/twoStepVerification.mjs +0 -2
- package/dist/api/twoStepVerification.mjs.map +0 -1
- package/dist/api/waba.d.mts +0 -16
- package/dist/api/waba.d.ts +0 -16
- package/dist/api/waba.js +0 -2
- package/dist/api/waba.js.map +0 -1
- package/dist/api/waba.mjs +0 -2
- package/dist/api/waba.mjs.map +0 -1
- package/dist/enums-CI7vzKhn.d.mts +0 -687
- package/dist/enums-CI7vzKhn.d.ts +0 -687
- package/dist/httpsClient.d.mts +0 -22
- package/dist/httpsClient.d.ts +0 -22
- package/dist/httpsClient.js +0 -2
- package/dist/httpsClient.js.map +0 -1
- package/dist/httpsClient.mjs +0 -2
- package/dist/httpsClient.mjs.map +0 -1
- package/dist/index.d.ts +0 -46
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/dist/request.d.mts +0 -25
- package/dist/request.d.ts +0 -25
- package/dist/request.js +0 -2
- package/dist/request.js.map +0 -1
- package/dist/request.mjs +0 -2
- package/dist/request.mjs.map +0 -1
- package/dist/types/base.d.mts +0 -8
- package/dist/types/base.d.ts +0 -8
- package/dist/types/base.js +0 -2
- package/dist/types/base.js.map +0 -1
- package/dist/types/base.mjs +0 -1
- package/dist/types/base.mjs.map +0 -1
- package/dist/types/businessProfile.d.mts +0 -153
- package/dist/types/businessProfile.d.ts +0 -153
- package/dist/types/businessProfile.js +0 -2
- package/dist/types/businessProfile.js.map +0 -1
- package/dist/types/businessProfile.mjs +0 -1
- package/dist/types/businessProfile.mjs.map +0 -1
- package/dist/types/config.d.mts +0 -62
- package/dist/types/config.d.ts +0 -62
- package/dist/types/config.js +0 -2
- package/dist/types/config.js.map +0 -1
- package/dist/types/config.mjs +0 -1
- package/dist/types/config.mjs.map +0 -1
- package/dist/types/encryption.d.mts +0 -13
- package/dist/types/encryption.d.ts +0 -13
- package/dist/types/encryption.js +0 -2
- package/dist/types/encryption.js.map +0 -1
- package/dist/types/encryption.mjs +0 -1
- package/dist/types/encryption.mjs.map +0 -1
- package/dist/types/enums.d.mts +0 -1
- package/dist/types/enums.d.ts +0 -1
- package/dist/types/enums.js +0 -2
- package/dist/types/enums.js.map +0 -1
- package/dist/types/enums.mjs +0 -2
- package/dist/types/enums.mjs.map +0 -1
- package/dist/types/flow.d.mts +0 -404
- package/dist/types/flow.d.ts +0 -404
- package/dist/types/flow.js +0 -2
- package/dist/types/flow.js.map +0 -1
- package/dist/types/flow.mjs +0 -2
- package/dist/types/flow.mjs.map +0 -1
- package/dist/types/httpsClient.d.mts +0 -19
- package/dist/types/httpsClient.d.ts +0 -19
- package/dist/types/httpsClient.js +0 -2
- package/dist/types/httpsClient.js.map +0 -1
- package/dist/types/httpsClient.mjs +0 -1
- package/dist/types/httpsClient.mjs.map +0 -1
- package/dist/types/index.d.ts +0 -20
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/types/logger.d.mts +0 -9
- package/dist/types/logger.d.ts +0 -9
- package/dist/types/logger.js +0 -2
- package/dist/types/logger.js.map +0 -1
- package/dist/types/logger.mjs +0 -1
- package/dist/types/logger.mjs.map +0 -1
- package/dist/types/media.d.mts +0 -31
- package/dist/types/media.d.ts +0 -31
- package/dist/types/media.js +0 -2
- package/dist/types/media.js.map +0 -1
- package/dist/types/media.mjs +0 -1
- package/dist/types/media.mjs.map +0 -1
- package/dist/types/messages.d.mts +0 -558
- package/dist/types/messages.d.ts +0 -558
- package/dist/types/messages.js +0 -2
- package/dist/types/messages.js.map +0 -1
- package/dist/types/messages.mjs +0 -1
- package/dist/types/messages.mjs.map +0 -1
- package/dist/types/phoneNumber.d.mts +0 -82
- package/dist/types/phoneNumber.d.ts +0 -82
- package/dist/types/phoneNumber.js +0 -2
- package/dist/types/phoneNumber.js.map +0 -1
- package/dist/types/phoneNumber.mjs +0 -1
- package/dist/types/phoneNumber.mjs.map +0 -1
- package/dist/types/qrCode.d.mts +0 -27
- package/dist/types/qrCode.d.ts +0 -27
- package/dist/types/qrCode.js +0 -2
- package/dist/types/qrCode.js.map +0 -1
- package/dist/types/qrCode.mjs +0 -1
- package/dist/types/qrCode.mjs.map +0 -1
- package/dist/types/registration.d.mts +0 -14
- package/dist/types/registration.d.ts +0 -14
- package/dist/types/registration.js +0 -2
- package/dist/types/registration.js.map +0 -1
- package/dist/types/registration.mjs +0 -1
- package/dist/types/registration.mjs.map +0 -1
- package/dist/types/request.d.mts +0 -50
- package/dist/types/request.d.ts +0 -50
- package/dist/types/request.js +0 -2
- package/dist/types/request.js.map +0 -1
- package/dist/types/request.mjs +0 -1
- package/dist/types/request.mjs.map +0 -1
- package/dist/types/template.d.mts +0 -106
- package/dist/types/template.d.ts +0 -106
- package/dist/types/template.js +0 -2
- package/dist/types/template.js.map +0 -1
- package/dist/types/template.mjs +0 -1
- package/dist/types/template.mjs.map +0 -1
- package/dist/types/twoStepVerification.d.mts +0 -11
- package/dist/types/twoStepVerification.d.ts +0 -11
- package/dist/types/twoStepVerification.js +0 -2
- package/dist/types/twoStepVerification.js.map +0 -1
- package/dist/types/twoStepVerification.mjs +0 -1
- package/dist/types/twoStepVerification.mjs.map +0 -1
- package/dist/types/waba.d.mts +0 -78
- package/dist/types/waba.d.ts +0 -78
- package/dist/types/waba.js +0 -2
- package/dist/types/waba.js.map +0 -1
- package/dist/types/waba.mjs +0 -2
- package/dist/types/waba.mjs.map +0 -1
- package/dist/types/webhook.d.mts +0 -486
- package/dist/types/webhook.d.ts +0 -486
- package/dist/types/webhook.js +0 -2
- package/dist/types/webhook.js.map +0 -1
- package/dist/types/webhook.mjs +0 -2
- package/dist/types/webhook.mjs.map +0 -1
- package/dist/types/whatsapp.d.mts +0 -61
- package/dist/types/whatsapp.js +0 -2
- package/dist/types/whatsapp.js.map +0 -1
- package/dist/types/whatsapp.mjs +0 -1
- package/dist/types/whatsapp.mjs.map +0 -1
- package/dist/utils/buildFieldsQueryString.d.mts +0 -3
- package/dist/utils/buildFieldsQueryString.d.ts +0 -3
- package/dist/utils/buildFieldsQueryString.js +0 -2
- package/dist/utils/buildFieldsQueryString.js.map +0 -1
- package/dist/utils/buildFieldsQueryString.mjs +0 -2
- package/dist/utils/buildFieldsQueryString.mjs.map +0 -1
- package/dist/utils/filters.d.mts +0 -144
- package/dist/utils/filters.d.ts +0 -144
- package/dist/utils/filters.js +0 -2
- package/dist/utils/filters.js.map +0 -1
- package/dist/utils/filters.mjs +0 -2
- package/dist/utils/filters.mjs.map +0 -1
- package/dist/utils/flowTypeGuards.d.mts +0 -46
- package/dist/utils/flowTypeGuards.d.ts +0 -46
- package/dist/utils/flowTypeGuards.js +0 -2
- package/dist/utils/flowTypeGuards.js.map +0 -1
- package/dist/utils/flowTypeGuards.mjs +0 -2
- package/dist/utils/flowTypeGuards.mjs.map +0 -1
- package/dist/utils/generateXHub256Sig.d.mts +0 -3
- package/dist/utils/generateXHub256Sig.d.ts +0 -3
- package/dist/utils/generateXHub256Sig.js +0 -2
- package/dist/utils/generateXHub256Sig.js.map +0 -1
- package/dist/utils/generateXHub256Sig.mjs +0 -2
- package/dist/utils/generateXHub256Sig.mjs.map +0 -1
- package/dist/utils/importConfig.d.mts +0 -21
- package/dist/utils/importConfig.d.ts +0 -21
- package/dist/utils/importConfig.js +0 -2
- package/dist/utils/importConfig.js.map +0 -1
- package/dist/utils/importConfig.mjs +0 -2
- package/dist/utils/importConfig.mjs.map +0 -1
- package/dist/utils/index.d.ts +0 -22
- package/dist/utils/index.js +0 -2
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/isMetaError.d.mts +0 -21
- package/dist/utils/isMetaError.d.ts +0 -21
- package/dist/utils/isMetaError.js +0 -2
- package/dist/utils/isMetaError.js.map +0 -1
- package/dist/utils/isMetaError.mjs +0 -2
- package/dist/utils/isMetaError.mjs.map +0 -1
- package/dist/utils/logger.d.mts +0 -13
- package/dist/utils/logger.d.ts +0 -13
- package/dist/utils/logger.js +0 -2
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/logger.mjs +0 -2
- package/dist/utils/logger.mjs.map +0 -1
- package/dist/utils/objectToQueryString.d.mts +0 -3
- package/dist/utils/objectToQueryString.d.ts +0 -3
- package/dist/utils/objectToQueryString.js +0 -2
- package/dist/utils/objectToQueryString.js.map +0 -1
- package/dist/utils/objectToQueryString.mjs +0 -2
- package/dist/utils/objectToQueryString.mjs.map +0 -1
- package/dist/webhook.d.mts +0 -123
- package/dist/webhook.d.ts +0 -123
- package/dist/webhook.js +0 -3
- package/dist/webhook.js.map +0 -1
- package/dist/webhook.mjs +0 -3
- package/dist/webhook.mjs.map +0 -1
- package/dist/whatsapp.d.mts +0 -58
- package/dist/whatsapp.d.ts +0 -58
- package/dist/whatsapp.js +0 -2
- package/dist/whatsapp.js.map +0 -1
- package/dist/whatsapp.mjs +0 -2
- package/dist/whatsapp.mjs.map +0 -1
package/dist/request.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/httpsClient.ts","../src/utils/logger.ts","../src/utils/isMetaError.ts","../src/request.ts"],"sourcesContent":["import { Agent } from 'https';\n\nimport Logger from './utils/logger';\nimport { HttpMethodsEnum } from './types/enums';\nimport { HttpsClientClass, HttpsClientResponseClass, ResponseHeaders, ResponseJSONBody } from './types/httpsClient';\n\nconst LIB_NAME = 'HttpsClient';\nconst LOG_LOCAL = false;\nconst LOGGER = new Logger(LIB_NAME, process.env.DEBUG === 'true' || LOG_LOCAL);\n\nexport default class HttpsClient implements HttpsClientClass {\n agent: Agent;\n\n constructor() {\n this.agent = new Agent({ keepAlive: true });\n }\n\n clearSockets(): boolean {\n this.agent.destroy();\n return true;\n }\n\n async sendRequest(\n hostname: string,\n path: string,\n method: HttpMethodsEnum,\n headers: HeadersInit,\n timeout: number,\n body?: BodyInit | null,\n ): Promise<HttpsClientResponseClass> {\n const url = `https://${hostname}/${path}`;\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), timeout);\n\n try {\n const response = await fetch(url, {\n method,\n headers,\n body,\n signal: controller.signal,\n });\n LOGGER.log(`${method} : ${url} - ${JSON.stringify(response)}`);\n\n clearTimeout(timeoutId);\n return new HttpsClientResponse(response);\n } catch (error) {\n throw error;\n }\n }\n}\n\nexport class HttpsClientResponse implements HttpsClientResponseClass {\n res: Response;\n respStatusCode: number;\n respHeaders: ResponseHeaders;\n\n constructor(resp: Response) {\n this.res = resp;\n this.respStatusCode = resp.status;\n this.respHeaders = Object.fromEntries(resp.headers.entries());\n }\n\n statusCode(): number {\n return this.respStatusCode;\n }\n\n headers(): ResponseHeaders {\n return this.respHeaders;\n }\n\n rawResponse(): Response {\n return this.res;\n }\n\n async json(): Promise<ResponseJSONBody> {\n try {\n return (await this.res.json()) as ResponseJSONBody;\n } catch (err) {\n // TODO Error Handling\n throw new Error('Failed to parse response body to JSON: ' + (err as Error).message);\n }\n }\n}\n","// @ts-nocheck\nimport type { LoggerInterface } from '../types/logger';\n\nexport default class Logger implements LoggerInterface {\n private name: string;\n private debug: boolean;\n\n constructor(name: string, debug: boolean = false) {\n this.name = name;\n this.debug = debug;\n }\n\n log(...data: any[]) {\n if (this.debug) {\n let prefix = `[ ${Date.now()} ]`;\n if (this.name) {\n prefix += ` - ${this.name}`;\n }\n console.log.apply(console, [prefix, ': ', ...data]);\n }\n }\n\n error(...data: any[]) {\n let prefix = `[ ${Date.now()} ] - ERROR`;\n if (this.name) {\n prefix += ` - ${this.name}`;\n }\n console.error.apply(console, [prefix, ': ', ...data]);\n }\n\n warn(...data: any[]) {\n let prefix = `[ ${Date.now()} ] - WARN`;\n if (this.name) {\n prefix += ` - ${this.name}`;\n }\n console.warn.apply(console, [prefix, ': ', ...data]);\n }\n\n info(...data: any[]) {\n let prefix = `[ ${Date.now()} ] - INFO`;\n if (this.name) {\n prefix += ` - ${this.name}`;\n }\n console.info.apply(console, [prefix, ': ', ...data]);\n }\n}\n","export interface MetaError extends Error {\n error: {\n message: string;\n type: string;\n code: number;\n error_data?: {\n messaging_product: 'whatsapp';\n details: string;\n };\n error_subcode?: number;\n fbtrace_id: string;\n };\n}\n\n/**\n * Determines if the error is a Meta API error response\n * @param error Any error object to check\n * @returns Type guard indicating if error is a Meta API error\n */\nexport function isMetaError(error: any): error is MetaError {\n return (\n error != null &&\n typeof error === 'object' &&\n 'error' in error &&\n typeof error.error === 'object' &&\n error.error != null &&\n 'message' in error.error &&\n typeof error.error.message === 'string' &&\n 'type' in error.error &&\n typeof error.error.type === 'string' &&\n 'code' in error.error &&\n typeof error.error.code === 'number' &&\n 'fbtrace_id' in error.error &&\n typeof error.error.fbtrace_id === 'string' &&\n (!('error_data' in error.error) ||\n (typeof error.error.error_data === 'object' &&\n error.error.error_data != null &&\n 'messaging_product' in error.error.error_data &&\n error.error.error_data.messaging_product === 'whatsapp' &&\n 'details' in error.error.error_data &&\n typeof error.error.error_data.details === 'string')) &&\n (!('error_subcode' in error.error) || typeof error.error.error_subcode === 'number')\n );\n}\n","import HttpsClient from './httpsClient';\nimport type { HttpMethodsEnum } from './types/enums';\nimport type { RequesterClass } from './types/request';\nimport { isMetaError, MetaError } from './utils/isMetaError';\nimport Logger from './utils/logger';\n\nconst LIB_NAME = 'REQUESTER';\nconst LOG_LOCAL = false;\nconst LOGGER = new Logger(LIB_NAME, process.env.DEBUG === 'true' || LOG_LOCAL);\n\nexport default class Requester implements RequesterClass {\n client: Readonly<HttpsClient>;\n accessToken: Readonly<string>;\n phoneNumberId: Readonly<number>;\n businessAcctId: Readonly<string>;\n apiVersion: Readonly<string>;\n userAgent: Readonly<string>;\n host: Readonly<string>;\n protocol: Readonly<string> = 'https:';\n\n constructor(\n apiVersion: string,\n phoneNumberId: number,\n accessToken: string,\n businessAcctId: string,\n userAgent: string,\n ) {\n this.client = new HttpsClient();\n this.host = 'graph.facebook.com';\n this.apiVersion = apiVersion || '22';\n this.phoneNumberId = phoneNumberId;\n this.accessToken = accessToken;\n this.businessAcctId = businessAcctId;\n this.userAgent = userAgent;\n }\n\n buildHeader(contentType: string, additionalHeaders?: Record<string, string>): HeadersInit {\n const headers: HeadersInit = {\n Authorization: `Bearer ${this.accessToken}`,\n 'User-Agent': this.userAgent,\n };\n\n if (contentType !== 'multipart/form-data') {\n headers['Content-Type'] = contentType;\n }\n\n if (additionalHeaders) {\n Object.assign(headers, additionalHeaders);\n }\n\n return headers;\n }\n\n buildCAPIPath(endpoint: string): string {\n return `v${this.apiVersion}.0/${endpoint}`;\n }\n\n async sendRequest(\n method: HttpMethodsEnum,\n endpoint: string,\n timeout: number,\n body?: any,\n contentType: string = 'application/json',\n additionalHeaders?: Record<string, string>,\n ) {\n let effectiveContentType = contentType;\n\n if (body instanceof FormData) {\n effectiveContentType = 'multipart/form-data';\n } else if (typeof body === 'string' && body.startsWith('<?xml')) {\n effectiveContentType = 'application/xml';\n }\n\n const path = `${this.protocol.toLowerCase()}//${this.host}/${this.buildCAPIPath(endpoint)}`;\n\n LOGGER.log(`${method} : ${path} (${effectiveContentType})`);\n\n try {\n const response = await this.client.sendRequest(\n this.host,\n this.buildCAPIPath(endpoint),\n method,\n this.buildHeader(effectiveContentType, additionalHeaders),\n timeout,\n method === 'POST' || method === 'PUT' ? body : undefined,\n );\n\n if (!response.rawResponse().ok) {\n const errorData = await response.json();\n if (isMetaError(errorData)) {\n throw errorData;\n }\n // If the error doesn't match Meta's format, create a generic MetaError\n throw {\n name: 'MetaError',\n message: 'Unknown error occurred',\n error: {\n message: errorData.message || 'Unknown error occurred',\n type: 'UnknownError',\n code: response.statusCode(),\n fbtrace_id: '',\n },\n } as MetaError;\n }\n\n return response;\n } catch (error) {\n if (isMetaError(error)) {\n throw error;\n }\n // Handle network errors or other unexpected errors\n throw {\n name: 'MetaError',\n message: error instanceof Error ? error.message : 'Network error occurred',\n error: {\n message: error instanceof Error ? error.message : 'Network error occurred',\n type: 'NetworkError',\n code: 500,\n fbtrace_id: '',\n },\n } as MetaError;\n }\n }\n\n async getJson<T>(\n method: HttpMethodsEnum,\n endpoint: string,\n timeout: number,\n body?: any,\n additionalHeaders?: Record<string, string>,\n ): Promise<T> {\n const res = await this.sendRequest(method, endpoint, timeout, body, 'application/json', additionalHeaders);\n return (await res.json()) as T;\n }\n\n async sendFormData<T>(\n method: HttpMethodsEnum,\n endpoint: string,\n timeout: number,\n formData: FormData,\n additionalHeaders?: Record<string, string>,\n ): Promise<T> {\n const res = await this.sendRequest(\n method,\n endpoint,\n timeout,\n formData,\n 'multipart/form-data',\n additionalHeaders,\n );\n return (await res.json()) as T;\n }\n\n async sendUrlEncodedForm<T>(\n method: HttpMethodsEnum,\n endpoint: string,\n timeout: number,\n formData: Record<string, string>,\n additionalHeaders?: Record<string, string>,\n ): Promise<T> {\n const urlEncodedBody = new URLSearchParams(formData).toString();\n const res = await this.sendRequest(\n method,\n endpoint,\n timeout,\n urlEncodedBody,\n 'application/x-www-form-urlencoded',\n additionalHeaders,\n );\n return (await res.json()) as T;\n }\n}\n"],"mappings":"AAAA,OAAS,SAAAA,MAAa,QCGtB,IAAqBC,EAArB,KAAuD,CAC3C,KACA,MAER,YAAYC,EAAcC,EAAiB,GAAO,CAC9C,KAAK,KAAOD,EACZ,KAAK,MAAQC,CACjB,CAEA,OAAOC,EAAa,CAChB,GAAI,KAAK,MAAO,CACZ,IAAIC,EAAS,KAAK,KAAK,IAAI,CAAC,KACxB,KAAK,OACLA,GAAU,MAAM,KAAK,IAAI,IAE7B,QAAQ,IAAI,MAAM,QAAS,CAACA,EAAQ,KAAM,GAAGD,CAAI,CAAC,CACtD,CACJ,CAEA,SAASA,EAAa,CAClB,IAAIC,EAAS,KAAK,KAAK,IAAI,CAAC,aACxB,KAAK,OACLA,GAAU,MAAM,KAAK,IAAI,IAE7B,QAAQ,MAAM,MAAM,QAAS,CAACA,EAAQ,KAAM,GAAGD,CAAI,CAAC,CACxD,CAEA,QAAQA,EAAa,CACjB,IAAIC,EAAS,KAAK,KAAK,IAAI,CAAC,YACxB,KAAK,OACLA,GAAU,MAAM,KAAK,IAAI,IAE7B,QAAQ,KAAK,MAAM,QAAS,CAACA,EAAQ,KAAM,GAAGD,CAAI,CAAC,CACvD,CAEA,QAAQA,EAAa,CACjB,IAAIC,EAAS,KAAK,KAAK,IAAI,CAAC,YACxB,KAAK,OACLA,GAAU,MAAM,KAAK,IAAI,IAE7B,QAAQ,KAAK,MAAM,QAAS,CAACA,EAAQ,KAAM,GAAGD,CAAI,CAAC,CACvD,CACJ,EDvCA,IAAME,EAAW,cACXC,EAAY,GACZC,EAAS,IAAIC,EAAOH,EAAU,QAAQ,IAAI,QAAU,QAAUC,CAAS,EAExDG,EAArB,KAA6D,CACzD,MAEA,aAAc,CACV,KAAK,MAAQ,IAAIC,EAAM,CAAE,UAAW,EAAK,CAAC,CAC9C,CAEA,cAAwB,CACpB,YAAK,MAAM,QAAQ,EACZ,EACX,CAEA,MAAM,YACFC,EACAC,EACAC,EACAC,EACAC,EACAC,EACiC,CACjC,IAAMC,EAAM,WAAWN,CAAQ,IAAIC,CAAI,GACjCM,EAAa,IAAI,gBACjBC,EAAY,WAAW,IAAMD,EAAW,MAAM,EAAGH,CAAO,EAE9D,GAAI,CACA,IAAMK,EAAW,MAAM,MAAMH,EAAK,CAC9B,OAAAJ,EACA,QAAAC,EACA,KAAAE,EACA,OAAQE,EAAW,MACvB,CAAC,EACD,OAAAX,EAAO,IAAI,GAAGM,CAAM,MAAMI,CAAG,MAAM,KAAK,UAAUG,CAAQ,CAAC,EAAE,EAE7D,aAAaD,CAAS,EACf,IAAIE,EAAoBD,CAAQ,CAC3C,OAASE,EAAO,CACZ,MAAMA,CACV,CACJ,CACJ,EAEaD,EAAN,KAA8D,CACjE,IACA,eACA,YAEA,YAAYE,EAAgB,CACxB,KAAK,IAAMA,EACX,KAAK,eAAiBA,EAAK,OAC3B,KAAK,YAAc,OAAO,YAAYA,EAAK,QAAQ,QAAQ,CAAC,CAChE,CAEA,YAAqB,CACjB,OAAO,KAAK,cAChB,CAEA,SAA2B,CACvB,OAAO,KAAK,WAChB,CAEA,aAAwB,CACpB,OAAO,KAAK,GAChB,CAEA,MAAM,MAAkC,CACpC,GAAI,CACA,OAAQ,MAAM,KAAK,IAAI,KAAK,CAChC,OAASC,EAAK,CAEV,MAAM,IAAI,MAAM,0CAA6CA,EAAc,OAAO,CACtF,CACJ,CACJ,EE/DO,SAASC,EAAYC,EAAgC,CACxD,OACIA,GAAS,MACT,OAAOA,GAAU,UACjB,UAAWA,GACX,OAAOA,EAAM,OAAU,UACvBA,EAAM,OAAS,MACf,YAAaA,EAAM,OACnB,OAAOA,EAAM,MAAM,SAAY,UAC/B,SAAUA,EAAM,OAChB,OAAOA,EAAM,MAAM,MAAS,UAC5B,SAAUA,EAAM,OAChB,OAAOA,EAAM,MAAM,MAAS,UAC5B,eAAgBA,EAAM,OACtB,OAAOA,EAAM,MAAM,YAAe,WACjC,EAAE,eAAgBA,EAAM,QACpB,OAAOA,EAAM,MAAM,YAAe,UAC/BA,EAAM,MAAM,YAAc,MAC1B,sBAAuBA,EAAM,MAAM,YACnCA,EAAM,MAAM,WAAW,oBAAsB,YAC7C,YAAaA,EAAM,MAAM,YACzB,OAAOA,EAAM,MAAM,WAAW,SAAY,YACjD,EAAE,kBAAmBA,EAAM,QAAU,OAAOA,EAAM,MAAM,eAAkB,SAEnF,CCrCA,IAAMC,EAAW,YACXC,EAAY,GACZC,EAAS,IAAIC,EAAOH,EAAU,QAAQ,IAAI,QAAU,QAAUC,CAAS,EAExDG,EAArB,KAAyD,CACrD,OACA,YACA,cACA,eACA,WACA,UACA,KACA,SAA6B,SAE7B,YACIC,EACAC,EACAC,EACAC,EACAC,EACF,CACE,KAAK,OAAS,IAAIC,EAClB,KAAK,KAAO,qBACZ,KAAK,WAAaL,GAAc,KAChC,KAAK,cAAgBC,EACrB,KAAK,YAAcC,EACnB,KAAK,eAAiBC,EACtB,KAAK,UAAYC,CACrB,CAEA,YAAYE,EAAqBC,EAAyD,CACtF,IAAMC,EAAuB,CACzB,cAAe,UAAU,KAAK,WAAW,GACzC,aAAc,KAAK,SACvB,EAEA,OAAIF,IAAgB,wBAChBE,EAAQ,cAAc,EAAIF,GAG1BC,GACA,OAAO,OAAOC,EAASD,CAAiB,EAGrCC,CACX,CAEA,cAAcC,EAA0B,CACpC,MAAO,IAAI,KAAK,UAAU,MAAMA,CAAQ,EAC5C,CAEA,MAAM,YACFC,EACAD,EACAE,EACAC,EACAN,EAAsB,mBACtBC,EACF,CACE,IAAIM,EAAuBP,EAEvBM,aAAgB,SAChBC,EAAuB,sBAChB,OAAOD,GAAS,UAAYA,EAAK,WAAW,OAAO,IAC1DC,EAAuB,mBAG3B,IAAMC,EAAO,GAAG,KAAK,SAAS,YAAY,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,cAAcL,CAAQ,CAAC,GAEzFZ,EAAO,IAAI,GAAGa,CAAM,MAAMI,CAAI,KAAKD,CAAoB,GAAG,EAE1D,GAAI,CACA,IAAME,EAAW,MAAM,KAAK,OAAO,YAC/B,KAAK,KACL,KAAK,cAAcN,CAAQ,EAC3BC,EACA,KAAK,YAAYG,EAAsBN,CAAiB,EACxDI,EACAD,IAAW,QAAUA,IAAW,MAAQE,EAAO,MACnD,EAEA,GAAI,CAACG,EAAS,YAAY,EAAE,GAAI,CAC5B,IAAMC,EAAY,MAAMD,EAAS,KAAK,EACtC,MAAIE,EAAYD,CAAS,EACfA,EAGJ,CACF,KAAM,YACN,QAAS,yBACT,MAAO,CACH,QAASA,EAAU,SAAW,yBAC9B,KAAM,eACN,KAAMD,EAAS,WAAW,EAC1B,WAAY,EAChB,CACJ,CACJ,CAEA,OAAOA,CACX,OAASG,EAAO,CACZ,MAAID,EAAYC,CAAK,EACXA,EAGJ,CACF,KAAM,YACN,QAASA,aAAiB,MAAQA,EAAM,QAAU,yBAClD,MAAO,CACH,QAASA,aAAiB,MAAQA,EAAM,QAAU,yBAClD,KAAM,eACN,KAAM,IACN,WAAY,EAChB,CACJ,CACJ,CACJ,CAEA,MAAM,QACFR,EACAD,EACAE,EACAC,EACAL,EACU,CAEV,OAAQ,MADI,MAAM,KAAK,YAAYG,EAAQD,EAAUE,EAASC,EAAM,mBAAoBL,CAAiB,GACvF,KAAK,CAC3B,CAEA,MAAM,aACFG,EACAD,EACAE,EACAQ,EACAZ,EACU,CASV,OAAQ,MARI,MAAM,KAAK,YACnBG,EACAD,EACAE,EACAQ,EACA,sBACAZ,CACJ,GACkB,KAAK,CAC3B,CAEA,MAAM,mBACFG,EACAD,EACAE,EACAQ,EACAZ,EACU,CACV,IAAMa,EAAiB,IAAI,gBAAgBD,CAAQ,EAAE,SAAS,EAS9D,OAAQ,MARI,MAAM,KAAK,YACnBT,EACAD,EACAE,EACAS,EACA,oCACAb,CACJ,GACkB,KAAK,CAC3B,CACJ","names":["Agent","Logger","name","debug","data","prefix","LIB_NAME","LOG_LOCAL","LOGGER","Logger","HttpsClient","Agent","hostname","path","method","headers","timeout","body","url","controller","timeoutId","response","HttpsClientResponse","error","resp","err","isMetaError","error","LIB_NAME","LOG_LOCAL","LOGGER","Logger","Requester","apiVersion","phoneNumberId","accessToken","businessAcctId","userAgent","HttpsClient","contentType","additionalHeaders","headers","endpoint","method","timeout","body","effectiveContentType","path","response","errorData","isMetaError","error","formData","urlEncodedBody"]}
|
package/dist/types/base.d.mts
DELETED
package/dist/types/base.d.ts
DELETED
package/dist/types/base.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(a,o,s,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of i(o))!n.call(a,e)&&e!==s&&r(a,e,{get:()=>o[e],enumerable:!(c=f(o,e))||c.enumerable});return a};var t=a=>p(r({},"__esModule",{value:!0}),a);var g={};module.exports=t(g);
|
|
2
|
-
//# sourceMappingURL=base.js.map
|
package/dist/types/base.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/base.ts"],"sourcesContent":["import type { WabaConfigType } from './config';\n\nexport declare class BaseClass {\n constructor(config: WabaConfigType);\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["base_exports","__toCommonJS"]}
|
package/dist/types/base.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=base.mjs.map
|
package/dist/types/base.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { k as BusinessVerticalEnum } from '../enums-CI7vzKhn.mjs';
|
|
2
|
-
import { ResponseSuccess } from './request.mjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Available fields that can be requested when retrieving a business profile.
|
|
6
|
-
*/
|
|
7
|
-
type BusinessProfileField = 'about' | 'address' | 'description' | 'email' | 'profile_picture_url' | 'websites' | 'vertical';
|
|
8
|
-
type BusinessProfileFieldsParam = BusinessProfileField[];
|
|
9
|
-
interface BusinessProfileData {
|
|
10
|
-
/**
|
|
11
|
-
* The business's About text. This text appears in the business's profile, beneath its profile image,
|
|
12
|
-
* phone number, and contact buttons.
|
|
13
|
-
* - String cannot be empty
|
|
14
|
-
* - Strings must be between 1 and 139 characters
|
|
15
|
-
* - Rendered emojis are supported however their unicode values are not.
|
|
16
|
-
* Emoji unicode values must be Java- or JavaScript-escape encoded
|
|
17
|
-
* - Hyperlinks can be included but will not render as clickable links
|
|
18
|
-
* - Markdown is not supported
|
|
19
|
-
*/
|
|
20
|
-
about?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Address of the business. Character limit 256.
|
|
23
|
-
*/
|
|
24
|
-
address?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Description of the business. Character limit 512.
|
|
27
|
-
*/
|
|
28
|
-
description?: string;
|
|
29
|
-
/**
|
|
30
|
-
* The contact email address (in valid email format) of the business. Character limit 128.
|
|
31
|
-
*/
|
|
32
|
-
email?: string;
|
|
33
|
-
/**
|
|
34
|
-
* The messaging service used for the request. Always set it to "whatsapp" if you are using
|
|
35
|
-
* the WhatsApp Business API.
|
|
36
|
-
*/
|
|
37
|
-
messaging_product: string;
|
|
38
|
-
/**
|
|
39
|
-
* Profile picture URL.
|
|
40
|
-
*/
|
|
41
|
-
profile_picture_url?: string;
|
|
42
|
-
/**
|
|
43
|
-
* The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.
|
|
44
|
-
* - You must include the http:// or https:// portion of the URL
|
|
45
|
-
* - There is a maximum of 2 websites with a maximum of 256 characters each
|
|
46
|
-
*/
|
|
47
|
-
websites?: string[];
|
|
48
|
-
/**
|
|
49
|
-
* Business category. This can be either an empty string or one of the predefined business categories.
|
|
50
|
-
* @see BusinessVerticalEnum for all available options
|
|
51
|
-
*/
|
|
52
|
-
vertical?: BusinessVerticalEnum | string;
|
|
53
|
-
}
|
|
54
|
-
interface BusinessProfileResponse {
|
|
55
|
-
data: BusinessProfileData[];
|
|
56
|
-
}
|
|
57
|
-
interface UpdateBusinessProfileRequest {
|
|
58
|
-
/**
|
|
59
|
-
* The messaging service used for the request. Always set it to "whatsapp" if you are using
|
|
60
|
-
* the WhatsApp Business API.
|
|
61
|
-
* @required
|
|
62
|
-
*/
|
|
63
|
-
messaging_product: string;
|
|
64
|
-
/**
|
|
65
|
-
* The business's About text. This text appears in the business's profile, beneath its profile image,
|
|
66
|
-
* phone number, and contact buttons.
|
|
67
|
-
* - String cannot be empty
|
|
68
|
-
* - Strings must be between 1 and 139 characters
|
|
69
|
-
* - Rendered emojis are supported however their unicode values are not.
|
|
70
|
-
* Emoji unicode values must be Java- or JavaScript-escape encoded
|
|
71
|
-
* - Hyperlinks can be included but will not render as clickable links
|
|
72
|
-
* - Markdown is not supported
|
|
73
|
-
*/
|
|
74
|
-
about?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Address of the business. Character limit 256.
|
|
77
|
-
*/
|
|
78
|
-
address?: string;
|
|
79
|
-
/**
|
|
80
|
-
* Description of the business. Character limit 512.
|
|
81
|
-
*/
|
|
82
|
-
description?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Business category. This can be either an empty string or one of the predefined business categories.
|
|
85
|
-
* @see BusinessVerticalEnum for all available options
|
|
86
|
-
*/
|
|
87
|
-
vertical?: BusinessVerticalEnum | string;
|
|
88
|
-
/**
|
|
89
|
-
* The contact email address (in valid email format) of the business. Character limit 128.
|
|
90
|
-
*/
|
|
91
|
-
email?: string;
|
|
92
|
-
/**
|
|
93
|
-
* The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.
|
|
94
|
-
* - You must include the http:// or https:// portion of the URL
|
|
95
|
-
* - There is a maximum of 2 websites with a maximum of 256 characters each
|
|
96
|
-
*/
|
|
97
|
-
websites?: string[];
|
|
98
|
-
/**
|
|
99
|
-
* Handle of the profile picture. This handle is generated when you upload the binary file
|
|
100
|
-
* for the profile picture to Meta using the Resumable Upload API.
|
|
101
|
-
*/
|
|
102
|
-
profile_picture_handle?: string;
|
|
103
|
-
}
|
|
104
|
-
interface UploadSession {
|
|
105
|
-
id: string;
|
|
106
|
-
video?: boolean;
|
|
107
|
-
}
|
|
108
|
-
interface UploadSessionResponse {
|
|
109
|
-
id: string;
|
|
110
|
-
}
|
|
111
|
-
interface UploadBusinessProfileResponse {
|
|
112
|
-
h: string;
|
|
113
|
-
}
|
|
114
|
-
interface UploadHandle {
|
|
115
|
-
handle: string;
|
|
116
|
-
file_size: number;
|
|
117
|
-
upload_result: {
|
|
118
|
-
handle_type: string;
|
|
119
|
-
name: string;
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
interface BusinessProfileClass {
|
|
123
|
-
/**
|
|
124
|
-
* Get your business profile.
|
|
125
|
-
* @param fields Specific fields to be returned in the response. If not specified, all fields will be returned.
|
|
126
|
-
*/
|
|
127
|
-
getBusinessProfile(fields?: BusinessProfileFieldsParam | string): Promise<BusinessProfileResponse>;
|
|
128
|
-
/**
|
|
129
|
-
* Update your business profile.
|
|
130
|
-
* @param updateRequest The request object containing the fields to update.
|
|
131
|
-
*/
|
|
132
|
-
updateBusinessProfile(updateRequest: UpdateBusinessProfileRequest): Promise<ResponseSuccess>;
|
|
133
|
-
/**
|
|
134
|
-
* Create an upload session for profile picture.
|
|
135
|
-
* @param fileLength Length of the file to be uploaded in bytes.
|
|
136
|
-
* @param fileType MIME type of the file (e.g., 'image/jpeg').
|
|
137
|
-
* @param fileName Name of the file.
|
|
138
|
-
*/
|
|
139
|
-
createUploadSession(fileLength: number, fileType: string, fileName: string): Promise<UploadSessionResponse>;
|
|
140
|
-
/**
|
|
141
|
-
* Upload media file to the upload session.
|
|
142
|
-
* @param uploadId The ID of the upload session.
|
|
143
|
-
* @param file The binary data of the file.
|
|
144
|
-
*/
|
|
145
|
-
uploadMedia(uploadId: string, file: Buffer): Promise<UploadBusinessProfileResponse>;
|
|
146
|
-
/**
|
|
147
|
-
* Get the upload handle information.
|
|
148
|
-
* @param uploadId The ID of the upload session.
|
|
149
|
-
*/
|
|
150
|
-
getUploadHandle(uploadId: string): Promise<UploadHandle>;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export type { BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, UpdateBusinessProfileRequest, UploadBusinessProfileResponse, UploadHandle, UploadSession, UploadSessionResponse };
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { k as BusinessVerticalEnum } from '../enums-CI7vzKhn.js';
|
|
2
|
-
import { ResponseSuccess } from './request.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Available fields that can be requested when retrieving a business profile.
|
|
6
|
-
*/
|
|
7
|
-
type BusinessProfileField = 'about' | 'address' | 'description' | 'email' | 'profile_picture_url' | 'websites' | 'vertical';
|
|
8
|
-
type BusinessProfileFieldsParam = BusinessProfileField[];
|
|
9
|
-
interface BusinessProfileData {
|
|
10
|
-
/**
|
|
11
|
-
* The business's About text. This text appears in the business's profile, beneath its profile image,
|
|
12
|
-
* phone number, and contact buttons.
|
|
13
|
-
* - String cannot be empty
|
|
14
|
-
* - Strings must be between 1 and 139 characters
|
|
15
|
-
* - Rendered emojis are supported however their unicode values are not.
|
|
16
|
-
* Emoji unicode values must be Java- or JavaScript-escape encoded
|
|
17
|
-
* - Hyperlinks can be included but will not render as clickable links
|
|
18
|
-
* - Markdown is not supported
|
|
19
|
-
*/
|
|
20
|
-
about?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Address of the business. Character limit 256.
|
|
23
|
-
*/
|
|
24
|
-
address?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Description of the business. Character limit 512.
|
|
27
|
-
*/
|
|
28
|
-
description?: string;
|
|
29
|
-
/**
|
|
30
|
-
* The contact email address (in valid email format) of the business. Character limit 128.
|
|
31
|
-
*/
|
|
32
|
-
email?: string;
|
|
33
|
-
/**
|
|
34
|
-
* The messaging service used for the request. Always set it to "whatsapp" if you are using
|
|
35
|
-
* the WhatsApp Business API.
|
|
36
|
-
*/
|
|
37
|
-
messaging_product: string;
|
|
38
|
-
/**
|
|
39
|
-
* Profile picture URL.
|
|
40
|
-
*/
|
|
41
|
-
profile_picture_url?: string;
|
|
42
|
-
/**
|
|
43
|
-
* The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.
|
|
44
|
-
* - You must include the http:// or https:// portion of the URL
|
|
45
|
-
* - There is a maximum of 2 websites with a maximum of 256 characters each
|
|
46
|
-
*/
|
|
47
|
-
websites?: string[];
|
|
48
|
-
/**
|
|
49
|
-
* Business category. This can be either an empty string or one of the predefined business categories.
|
|
50
|
-
* @see BusinessVerticalEnum for all available options
|
|
51
|
-
*/
|
|
52
|
-
vertical?: BusinessVerticalEnum | string;
|
|
53
|
-
}
|
|
54
|
-
interface BusinessProfileResponse {
|
|
55
|
-
data: BusinessProfileData[];
|
|
56
|
-
}
|
|
57
|
-
interface UpdateBusinessProfileRequest {
|
|
58
|
-
/**
|
|
59
|
-
* The messaging service used for the request. Always set it to "whatsapp" if you are using
|
|
60
|
-
* the WhatsApp Business API.
|
|
61
|
-
* @required
|
|
62
|
-
*/
|
|
63
|
-
messaging_product: string;
|
|
64
|
-
/**
|
|
65
|
-
* The business's About text. This text appears in the business's profile, beneath its profile image,
|
|
66
|
-
* phone number, and contact buttons.
|
|
67
|
-
* - String cannot be empty
|
|
68
|
-
* - Strings must be between 1 and 139 characters
|
|
69
|
-
* - Rendered emojis are supported however their unicode values are not.
|
|
70
|
-
* Emoji unicode values must be Java- or JavaScript-escape encoded
|
|
71
|
-
* - Hyperlinks can be included but will not render as clickable links
|
|
72
|
-
* - Markdown is not supported
|
|
73
|
-
*/
|
|
74
|
-
about?: string;
|
|
75
|
-
/**
|
|
76
|
-
* Address of the business. Character limit 256.
|
|
77
|
-
*/
|
|
78
|
-
address?: string;
|
|
79
|
-
/**
|
|
80
|
-
* Description of the business. Character limit 512.
|
|
81
|
-
*/
|
|
82
|
-
description?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Business category. This can be either an empty string or one of the predefined business categories.
|
|
85
|
-
* @see BusinessVerticalEnum for all available options
|
|
86
|
-
*/
|
|
87
|
-
vertical?: BusinessVerticalEnum | string;
|
|
88
|
-
/**
|
|
89
|
-
* The contact email address (in valid email format) of the business. Character limit 128.
|
|
90
|
-
*/
|
|
91
|
-
email?: string;
|
|
92
|
-
/**
|
|
93
|
-
* The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.
|
|
94
|
-
* - You must include the http:// or https:// portion of the URL
|
|
95
|
-
* - There is a maximum of 2 websites with a maximum of 256 characters each
|
|
96
|
-
*/
|
|
97
|
-
websites?: string[];
|
|
98
|
-
/**
|
|
99
|
-
* Handle of the profile picture. This handle is generated when you upload the binary file
|
|
100
|
-
* for the profile picture to Meta using the Resumable Upload API.
|
|
101
|
-
*/
|
|
102
|
-
profile_picture_handle?: string;
|
|
103
|
-
}
|
|
104
|
-
interface UploadSession {
|
|
105
|
-
id: string;
|
|
106
|
-
video?: boolean;
|
|
107
|
-
}
|
|
108
|
-
interface UploadSessionResponse {
|
|
109
|
-
id: string;
|
|
110
|
-
}
|
|
111
|
-
interface UploadBusinessProfileResponse {
|
|
112
|
-
h: string;
|
|
113
|
-
}
|
|
114
|
-
interface UploadHandle {
|
|
115
|
-
handle: string;
|
|
116
|
-
file_size: number;
|
|
117
|
-
upload_result: {
|
|
118
|
-
handle_type: string;
|
|
119
|
-
name: string;
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
interface BusinessProfileClass {
|
|
123
|
-
/**
|
|
124
|
-
* Get your business profile.
|
|
125
|
-
* @param fields Specific fields to be returned in the response. If not specified, all fields will be returned.
|
|
126
|
-
*/
|
|
127
|
-
getBusinessProfile(fields?: BusinessProfileFieldsParam | string): Promise<BusinessProfileResponse>;
|
|
128
|
-
/**
|
|
129
|
-
* Update your business profile.
|
|
130
|
-
* @param updateRequest The request object containing the fields to update.
|
|
131
|
-
*/
|
|
132
|
-
updateBusinessProfile(updateRequest: UpdateBusinessProfileRequest): Promise<ResponseSuccess>;
|
|
133
|
-
/**
|
|
134
|
-
* Create an upload session for profile picture.
|
|
135
|
-
* @param fileLength Length of the file to be uploaded in bytes.
|
|
136
|
-
* @param fileType MIME type of the file (e.g., 'image/jpeg').
|
|
137
|
-
* @param fileName Name of the file.
|
|
138
|
-
*/
|
|
139
|
-
createUploadSession(fileLength: number, fileType: string, fileName: string): Promise<UploadSessionResponse>;
|
|
140
|
-
/**
|
|
141
|
-
* Upload media file to the upload session.
|
|
142
|
-
* @param uploadId The ID of the upload session.
|
|
143
|
-
* @param file The binary data of the file.
|
|
144
|
-
*/
|
|
145
|
-
uploadMedia(uploadId: string, file: Buffer): Promise<UploadBusinessProfileResponse>;
|
|
146
|
-
/**
|
|
147
|
-
* Get the upload handle information.
|
|
148
|
-
* @param uploadId The ID of the upload session.
|
|
149
|
-
*/
|
|
150
|
-
getUploadHandle(uploadId: string): Promise<UploadHandle>;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export type { BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, UpdateBusinessProfileRequest, UploadBusinessProfileResponse, UploadHandle, UploadSession, UploadSessionResponse };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var p=(s,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a(e))!l.call(s,i)&&i!==n&&t(s,i,{get:()=>e[i],enumerable:!(r=o(e,i))||r.enumerable});return s};var d=s=>p(t({},"__esModule",{value:!0}),s);var u={};module.exports=d(u);
|
|
2
|
-
//# sourceMappingURL=businessProfile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/businessProfile.ts"],"sourcesContent":["import { BusinessVerticalEnum } from './enums';\nimport { ResponseSuccess } from './request';\n\n/**\n * Available fields that can be requested when retrieving a business profile.\n */\nexport type BusinessProfileField =\n | 'about'\n | 'address'\n | 'description'\n | 'email'\n | 'profile_picture_url'\n | 'websites'\n | 'vertical';\n\nexport type BusinessProfileFieldsParam = BusinessProfileField[];\n\nexport interface BusinessProfileData {\n /**\n * The business's About text. This text appears in the business's profile, beneath its profile image,\n * phone number, and contact buttons.\n * - String cannot be empty\n * - Strings must be between 1 and 139 characters\n * - Rendered emojis are supported however their unicode values are not.\n * Emoji unicode values must be Java- or JavaScript-escape encoded\n * - Hyperlinks can be included but will not render as clickable links\n * - Markdown is not supported\n */\n about?: string;\n /**\n * Address of the business. Character limit 256.\n */\n address?: string;\n /**\n * Description of the business. Character limit 512.\n */\n description?: string;\n /**\n * The contact email address (in valid email format) of the business. Character limit 128.\n */\n email?: string;\n /**\n * The messaging service used for the request. Always set it to \"whatsapp\" if you are using\n * the WhatsApp Business API.\n */\n messaging_product: string;\n /**\n * Profile picture URL.\n */\n profile_picture_url?: string;\n /**\n * The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.\n * - You must include the http:// or https:// portion of the URL\n * - There is a maximum of 2 websites with a maximum of 256 characters each\n */\n websites?: string[];\n /**\n * Business category. This can be either an empty string or one of the predefined business categories.\n * @see BusinessVerticalEnum for all available options\n */\n vertical?: BusinessVerticalEnum | string;\n}\n\nexport interface BusinessProfileResponse {\n data: BusinessProfileData[];\n}\n\nexport interface UpdateBusinessProfileRequest {\n /**\n * The messaging service used for the request. Always set it to \"whatsapp\" if you are using\n * the WhatsApp Business API.\n * @required\n */\n messaging_product: string;\n /**\n * The business's About text. This text appears in the business's profile, beneath its profile image,\n * phone number, and contact buttons.\n * - String cannot be empty\n * - Strings must be between 1 and 139 characters\n * - Rendered emojis are supported however their unicode values are not.\n * Emoji unicode values must be Java- or JavaScript-escape encoded\n * - Hyperlinks can be included but will not render as clickable links\n * - Markdown is not supported\n */\n about?: string;\n /**\n * Address of the business. Character limit 256.\n */\n address?: string;\n /**\n * Description of the business. Character limit 512.\n */\n description?: string;\n /**\n * Business category. This can be either an empty string or one of the predefined business categories.\n * @see BusinessVerticalEnum for all available options\n */\n vertical?: BusinessVerticalEnum | string;\n /**\n * The contact email address (in valid email format) of the business. Character limit 128.\n */\n email?: string;\n /**\n * The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.\n * - You must include the http:// or https:// portion of the URL\n * - There is a maximum of 2 websites with a maximum of 256 characters each\n */\n websites?: string[];\n /**\n * Handle of the profile picture. This handle is generated when you upload the binary file\n * for the profile picture to Meta using the Resumable Upload API.\n */\n profile_picture_handle?: string;\n}\n\nexport interface UploadSession {\n id: string;\n video?: boolean;\n}\n\nexport interface UploadSessionResponse {\n id: string;\n}\n\nexport interface UploadBusinessProfileResponse {\n h: string;\n}\n\nexport interface UploadHandle {\n handle: string;\n file_size: number;\n upload_result: {\n handle_type: string;\n name: string;\n };\n}\n\nexport interface BusinessProfileClass {\n /**\n * Get your business profile.\n * @param fields Specific fields to be returned in the response. If not specified, all fields will be returned.\n */\n getBusinessProfile(fields?: BusinessProfileFieldsParam | string): Promise<BusinessProfileResponse>;\n\n /**\n * Update your business profile.\n * @param updateRequest The request object containing the fields to update.\n */\n updateBusinessProfile(updateRequest: UpdateBusinessProfileRequest): Promise<ResponseSuccess>;\n\n /**\n * Create an upload session for profile picture.\n * @param fileLength Length of the file to be uploaded in bytes.\n * @param fileType MIME type of the file (e.g., 'image/jpeg').\n * @param fileName Name of the file.\n */\n createUploadSession(fileLength: number, fileType: string, fileName: string): Promise<UploadSessionResponse>;\n\n /**\n * Upload media file to the upload session.\n * @param uploadId The ID of the upload session.\n * @param file The binary data of the file.\n */\n uploadMedia(uploadId: string, file: Buffer): Promise<UploadBusinessProfileResponse>;\n\n /**\n * Get the upload handle information.\n * @param uploadId The ID of the upload session.\n */\n getUploadHandle(uploadId: string): Promise<UploadHandle>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["businessProfile_exports","__toCommonJS"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=businessProfile.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/config.d.mts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { W as WabaConfigEnum } from '../enums-CI7vzKhn.mjs';
|
|
2
|
-
|
|
3
|
-
type WabaConfigType = {
|
|
4
|
-
/**
|
|
5
|
-
* The Meta for Developers business application Id for this registered application.
|
|
6
|
-
*/
|
|
7
|
-
[WabaConfigEnum.AppId]: string;
|
|
8
|
-
/**
|
|
9
|
-
* The Meta for Developers business application secret for this registered application.
|
|
10
|
-
*/
|
|
11
|
-
[WabaConfigEnum.AppSecret]: string;
|
|
12
|
-
/**
|
|
13
|
-
* The Meta for Developers phone number id used by the registered business.
|
|
14
|
-
*/
|
|
15
|
-
[WabaConfigEnum.PhoneNumberId]: number;
|
|
16
|
-
/**
|
|
17
|
-
* The Meta for Developers business id for the registered business.
|
|
18
|
-
*/
|
|
19
|
-
[WabaConfigEnum.BusinessAcctId]: string;
|
|
20
|
-
/**
|
|
21
|
-
* The version of the Cloud API being used. Starts with a "v" and follows the major number.
|
|
22
|
-
*/
|
|
23
|
-
[WabaConfigEnum.APIVersion]: string;
|
|
24
|
-
/**
|
|
25
|
-
* The access token to make calls on behalf of the signed in Meta for Developers account or business.
|
|
26
|
-
*/
|
|
27
|
-
[WabaConfigEnum.AccessToken]: string;
|
|
28
|
-
/**
|
|
29
|
-
* The endpoint path (e.g. if the value here is webhook, the webhook URL would look like http/https://{host}/webhook).
|
|
30
|
-
*/
|
|
31
|
-
[WabaConfigEnum.WebhookEndpoint]: string;
|
|
32
|
-
/**
|
|
33
|
-
* The verification token that needs to match what is sent by the Cloud API webhook in order to subscribe.
|
|
34
|
-
*/
|
|
35
|
-
[WabaConfigEnum.WebhookVerificationToken]: string;
|
|
36
|
-
/**
|
|
37
|
-
* The listener port for the webhook web server.
|
|
38
|
-
*/
|
|
39
|
-
[WabaConfigEnum.ListenerPort]: number;
|
|
40
|
-
/**
|
|
41
|
-
* To turn on global debugging of the logger to print verbose output across the APIs.
|
|
42
|
-
*/
|
|
43
|
-
[WabaConfigEnum.Debug]: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* The total number of times a request should be retried after the wait period if it fails.
|
|
46
|
-
*/
|
|
47
|
-
[WabaConfigEnum.MaxRetriesAfterWait]: number;
|
|
48
|
-
/**
|
|
49
|
-
* The timeout period for a request to quit and destroy the attempt in ms.
|
|
50
|
-
*/
|
|
51
|
-
[WabaConfigEnum.RequestTimeout]: number;
|
|
52
|
-
/**
|
|
53
|
-
* The private key for the Meta for Developers business.
|
|
54
|
-
*/
|
|
55
|
-
[WabaConfigEnum.PrivatePem]: string;
|
|
56
|
-
/**
|
|
57
|
-
* The passphrase for the Meta for Developers business.
|
|
58
|
-
*/
|
|
59
|
-
[WabaConfigEnum.Passphrase]: string;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export type { WabaConfigType };
|
package/dist/types/config.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { W as WabaConfigEnum } from '../enums-CI7vzKhn.js';
|
|
2
|
-
|
|
3
|
-
type WabaConfigType = {
|
|
4
|
-
/**
|
|
5
|
-
* The Meta for Developers business application Id for this registered application.
|
|
6
|
-
*/
|
|
7
|
-
[WabaConfigEnum.AppId]: string;
|
|
8
|
-
/**
|
|
9
|
-
* The Meta for Developers business application secret for this registered application.
|
|
10
|
-
*/
|
|
11
|
-
[WabaConfigEnum.AppSecret]: string;
|
|
12
|
-
/**
|
|
13
|
-
* The Meta for Developers phone number id used by the registered business.
|
|
14
|
-
*/
|
|
15
|
-
[WabaConfigEnum.PhoneNumberId]: number;
|
|
16
|
-
/**
|
|
17
|
-
* The Meta for Developers business id for the registered business.
|
|
18
|
-
*/
|
|
19
|
-
[WabaConfigEnum.BusinessAcctId]: string;
|
|
20
|
-
/**
|
|
21
|
-
* The version of the Cloud API being used. Starts with a "v" and follows the major number.
|
|
22
|
-
*/
|
|
23
|
-
[WabaConfigEnum.APIVersion]: string;
|
|
24
|
-
/**
|
|
25
|
-
* The access token to make calls on behalf of the signed in Meta for Developers account or business.
|
|
26
|
-
*/
|
|
27
|
-
[WabaConfigEnum.AccessToken]: string;
|
|
28
|
-
/**
|
|
29
|
-
* The endpoint path (e.g. if the value here is webhook, the webhook URL would look like http/https://{host}/webhook).
|
|
30
|
-
*/
|
|
31
|
-
[WabaConfigEnum.WebhookEndpoint]: string;
|
|
32
|
-
/**
|
|
33
|
-
* The verification token that needs to match what is sent by the Cloud API webhook in order to subscribe.
|
|
34
|
-
*/
|
|
35
|
-
[WabaConfigEnum.WebhookVerificationToken]: string;
|
|
36
|
-
/**
|
|
37
|
-
* The listener port for the webhook web server.
|
|
38
|
-
*/
|
|
39
|
-
[WabaConfigEnum.ListenerPort]: number;
|
|
40
|
-
/**
|
|
41
|
-
* To turn on global debugging of the logger to print verbose output across the APIs.
|
|
42
|
-
*/
|
|
43
|
-
[WabaConfigEnum.Debug]: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* The total number of times a request should be retried after the wait period if it fails.
|
|
46
|
-
*/
|
|
47
|
-
[WabaConfigEnum.MaxRetriesAfterWait]: number;
|
|
48
|
-
/**
|
|
49
|
-
* The timeout period for a request to quit and destroy the attempt in ms.
|
|
50
|
-
*/
|
|
51
|
-
[WabaConfigEnum.RequestTimeout]: number;
|
|
52
|
-
/**
|
|
53
|
-
* The private key for the Meta for Developers business.
|
|
54
|
-
*/
|
|
55
|
-
[WabaConfigEnum.PrivatePem]: string;
|
|
56
|
-
/**
|
|
57
|
-
* The passphrase for the Meta for Developers business.
|
|
58
|
-
*/
|
|
59
|
-
[WabaConfigEnum.Passphrase]: string;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export type { WabaConfigType };
|
package/dist/types/config.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var e=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var t=(a,n,g,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of b(n))!m.call(a,i)&&i!==g&&e(a,i,{get:()=>n[i],enumerable:!(o=r(n,i))||o.enumerable});return a};var u=a=>t(e({},"__esModule",{value:!0}),a);var s={};module.exports=u(s);
|
|
2
|
-
//# sourceMappingURL=config.js.map
|
package/dist/types/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/config.ts"],"sourcesContent":["import { WabaConfigEnum } from './enums';\n\nexport type WabaConfigType = {\n /**\n * The Meta for Developers business application Id for this registered application.\n */\n [WabaConfigEnum.AppId]: string;\n\n /**\n * The Meta for Developers business application secret for this registered application.\n */\n [WabaConfigEnum.AppSecret]: string;\n\n /**\n * The Meta for Developers phone number id used by the registered business.\n */\n [WabaConfigEnum.PhoneNumberId]: number;\n\n /**\n * The Meta for Developers business id for the registered business.\n */\n [WabaConfigEnum.BusinessAcctId]: string;\n /**\n * The version of the Cloud API being used. Starts with a \"v\" and follows the major number.\n */\n [WabaConfigEnum.APIVersion]: string;\n\n /**\n * The access token to make calls on behalf of the signed in Meta for Developers account or business.\n */\n [WabaConfigEnum.AccessToken]: string;\n\n /**\n * The endpoint path (e.g. if the value here is webhook, the webhook URL would look like http/https://{host}/webhook).\n */\n [WabaConfigEnum.WebhookEndpoint]: string;\n\n /**\n * The verification token that needs to match what is sent by the Cloud API webhook in order to subscribe.\n */\n [WabaConfigEnum.WebhookVerificationToken]: string;\n\n /**\n * The listener port for the webhook web server.\n */\n [WabaConfigEnum.ListenerPort]: number;\n\n /**\n * To turn on global debugging of the logger to print verbose output across the APIs.\n */\n [WabaConfigEnum.Debug]: boolean;\n\n /**\n * The total number of times a request should be retried after the wait period if it fails.\n */\n [WabaConfigEnum.MaxRetriesAfterWait]: number;\n\n /**\n * The timeout period for a request to quit and destroy the attempt in ms.\n */\n [WabaConfigEnum.RequestTimeout]: number;\n\n /**\n * The private key for the Meta for Developers business.\n */\n [WabaConfigEnum.PrivatePem]: string;\n\n /**\n * The passphrase for the Meta for Developers business.\n */\n [WabaConfigEnum.Passphrase]: string;\n};\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["config_exports","__toCommonJS"]}
|
package/dist/types/config.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=config.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ResponseData, ResponseSuccess } from './request.mjs';
|
|
2
|
-
import '../enums-CI7vzKhn.mjs';
|
|
3
|
-
|
|
4
|
-
type EncryptionPublicKeyResponse = ResponseData<{
|
|
5
|
-
business_public_key: string;
|
|
6
|
-
business_public_key_signature_status: 'VALID' | 'MISMATCH';
|
|
7
|
-
}>;
|
|
8
|
-
interface EncryptionClass {
|
|
9
|
-
getEncryptionPublicKey(): Promise<EncryptionPublicKeyResponse>;
|
|
10
|
-
setEncryptionPublicKey(businessPublicKey: string): Promise<ResponseSuccess>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type { EncryptionClass, EncryptionPublicKeyResponse };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ResponseData, ResponseSuccess } from './request.js';
|
|
2
|
-
import '../enums-CI7vzKhn.js';
|
|
3
|
-
|
|
4
|
-
type EncryptionPublicKeyResponse = ResponseData<{
|
|
5
|
-
business_public_key: string;
|
|
6
|
-
business_public_key_signature_status: 'VALID' | 'MISMATCH';
|
|
7
|
-
}>;
|
|
8
|
-
interface EncryptionClass {
|
|
9
|
-
getEncryptionPublicKey(): Promise<EncryptionPublicKeyResponse>;
|
|
10
|
-
setEncryptionPublicKey(businessPublicKey: string): Promise<ResponseSuccess>;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type { EncryptionClass, EncryptionPublicKeyResponse };
|
package/dist/types/encryption.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var u=(e,s,c,i)=>{if(s&&typeof s=="object"||typeof s=="function")for(let n of p(s))!r.call(e,n)&&n!==c&&t(e,n,{get:()=>s[n],enumerable:!(i=o(s,n))||i.enumerable});return e};var y=e=>u(t({},"__esModule",{value:!0}),e);var b={};module.exports=y(b);
|
|
2
|
-
//# sourceMappingURL=encryption.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/encryption.ts"],"sourcesContent":["import { ResponseData, ResponseSuccess } from './request';\n\nexport type EncryptionPublicKeyResponse = ResponseData<{\n business_public_key: string;\n business_public_key_signature_status: 'VALID' | 'MISMATCH';\n}>;\n\nexport interface EncryptionClass {\n getEncryptionPublicKey(): Promise<EncryptionPublicKeyResponse>;\n setEncryptionPublicKey(businessPublicKey: string): Promise<ResponseSuccess>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["encryption_exports","__toCommonJS"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=encryption.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/enums.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { A as AudioMediaTypesEnum, k as BusinessVerticalEnum, a as ButtonPositionEnum, B as ButtonTypesEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, i as CurrencyCodesEnum, j as DataLocalizationRegionEnum, D as DocumentMediaTypesEnum, H as HttpMethodsEnum, e as ImageMediaTypesEnum, I as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, R as ReferralSourceTypesEnum, h as RequestCodeMethodsEnum, S as StatusEnum, d as StickerMediaTypesEnum, g as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, f as WebhookTypesEnum } from '../enums-CI7vzKhn.mjs';
|
package/dist/types/enums.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { A as AudioMediaTypesEnum, k as BusinessVerticalEnum, a as ButtonPositionEnum, B as ButtonTypesEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, i as CurrencyCodesEnum, j as DataLocalizationRegionEnum, D as DocumentMediaTypesEnum, H as HttpMethodsEnum, e as ImageMediaTypesEnum, I as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, R as ReferralSourceTypesEnum, h as RequestCodeMethodsEnum, S as StatusEnum, d as StickerMediaTypesEnum, g as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, f as WebhookTypesEnum } from '../enums-CI7vzKhn.js';
|
package/dist/types/enums.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var T=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var c=(K,B)=>{for(var D in B)T(K,D,{get:B[D],enumerable:!0})},o=(K,B,D,P)=>{if(B&&typeof B=="object"||typeof B=="function")for(let G of a(B))!d.call(K,G)&&G!==D&&T(K,G,{get:()=>B[G],enumerable:!(P=g(B,G))||P.enumerable});return K};var E=K=>o(T({},"__esModule",{value:!0}),K);var y={};c(y,{AudioMediaTypesEnum:()=>v,BusinessVerticalEnum:()=>b,ButtonPositionEnum:()=>x,ButtonTypesEnum:()=>L,CategoryEnum:()=>F,ComponentTypesEnum:()=>V,ConversationTypesEnum:()=>h,CurrencyCodesEnum:()=>$,DataLocalizationRegionEnum:()=>z,DocumentMediaTypesEnum:()=>w,HttpMethodsEnum:()=>Y,ImageMediaTypesEnum:()=>k,InteractiveTypesEnum:()=>t,LanguagesEnum:()=>q,MessageTypesEnum:()=>X,ParametersTypesEnum:()=>Z,ReferralSourceTypesEnum:()=>j,RequestCodeMethodsEnum:()=>f,StatusEnum:()=>J,StickerMediaTypesEnum:()=>i,SystemChangeTypesEnum:()=>p,TemplateStatusEnum:()=>H,VideoMediaTypesEnum:()=>l,WabaConfigEnum:()=>W,WebhookTypesEnum:()=>Q});module.exports=E(y);var F=(P=>(P.Authentication="AUTHENTICATION",P.Marketing="MARKETING",P.Utility="UTILITY",P))(F||{}),H=(P=>(P.Approved="APPROVED",P.Pending="PENDING",P.Rejected="REJECTED",P))(H||{}),Y=(G=>(G.Get="GET",G.Post="POST",G.Put="PUT",G.Delete="DELETE",G))(Y||{}),X=(S=>(S.Audio="audio",S.Contacts="contacts",S.Document="document",S.Image="image",S.Interactive="interactive",S.Location="location",S.Reaction="reaction",S.Sticker="sticker",S.Template="template",S.Text="text",S.Video="video",S.Button="button",S.Order="order",S.System="system",S.Unknown="unknown",S["*"]="*",S))(X||{}),Z=(_=>(_.Currency="currency",_.DateTime="date_time",_.Document="document",_.Image="image",_.Text="text",_.Video="video",_.Payload="payload",_))(Z||{}),t=(U=>(U.Button="button",U.List="list",U.Product="product",U.ProductList="product_list",U.CtaUrl="cta_url",U.LocationRequest="location_request_message",U.AddressMessage="address_message",U.Flow="flow",U))(t||{}),L=(D=>(D.QuickReply="quick_reply",D.URL="url",D))(L||{}),x=(P=>(P[P.First=0]="First",P[P.Second=1]="Second",P[P.Third=2]="Third",P))(x||{}),V=(G=>(G.Header="HEADER",G.Body="BODY",G.Button="BUTTON",G.Footer="FOOTER",G))(V||{}),W=(S=>(S.AppId="M4D_APP_ID",S.Port="WA_PORT",S.AppSecret="M4D_APP_SECRET",S.PhoneNumberId="WA_PHONE_NUMBER_ID",S.BusinessAcctId="WA_BUSINESS_ACCOUNT_ID",S.APIVersion="CLOUD_API_VERSION",S.AccessToken="CLOUD_API_ACCESS_TOKEN",S.WebhookEndpoint="WEBHOOK_ENDPOINT",S.WebhookVerificationToken="WEBHOOK_VERIFICATION_TOKEN",S.ListenerPort="LISTENER_PORT",S.MaxRetriesAfterWait="MAX_RETRIES_AFTER_WAIT",S.RequestTimeout="REQUEST_TIMEOUT",S.Debug="DEBUG",S.PrivatePem="FLOW_API_PRIVATE_PEM",S.Passphrase="FLOW_API_PASSPHRASE",S))(W||{}),h=(P=>(P.BusinessInitiated="business_initiated",P.CustomerInitiated="customer_initiated",P.ReferralConversion="referral_conversion",P))(h||{}),J=(P=>(P.Delivered="delivered",P.Read="read",P.Sent="sent",P))(J||{}),l=(D=>(D.Mp4="video/mp4",D.Threegp="video/3gp",D))(l||{}),i=(B=>(B.Webp="image/webp",B))(i||{}),k=(D=>(D.Jpeg="image/jpeg",D.Png="image/png",D))(k||{}),w=(U=>(U.Text="text/plain",U.Pdf="application/pdf",U.Ppt="application/vnd.ms-powerpoint",U.Word="application/msword",U.Excel="application/vnd.ms-excel",U.OpenDoc="application/vnd.openxmlformats-officedocument.wordprocessingml.document",U.OpenPres="application/vnd.openxmlformats-officedocument.presentationml.presentation",U.OpenSheet="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",U))(w||{}),v=(M=>(M.Aac="audio/aac",M.Mp4="audio/mp4",M.Mpeg="audio/mpeg",M.Amr="audio/amr",M.Ogg="audio/ogg",M))(v||{}),Q=(I=>(I.Audio="audio",I.Button="button",I.Document="document",I.Text="text",I.Image="image",I.Interactive="interactive",I.Order="order",I.Sticker="sticker",I.System="system",I.Unknown="unknown",I.Video="video",I))(Q||{}),p=(D=>(D.CustomerChangedNumber="customer_changed_number",D.CustomerIdentityChanged="customer_identity_changed",D))(p||{}),j=(D=>(D.Ad="ad",D.Post="post",D))(j||{}),f=(D=>(D.Sms="SMS",D.Voice="VOICE",D))(f||{}),q=(A=>(A.Afrikaans="af",A.Albanian="sq",A.Arabic="ar",A.Azerbaijani="az",A.Bengali="bn",A.Bulgarian="bg",A.Catalan="ca",A.Chinese_CHN="zh_CN",A.Chinese_HKG="zh_HK",A.Chinese_TAI="zh_TW",A.Croatian="hr",A.Czech="cs",A.Danish="da",A.Dutch="nl",A.English="en",A.English_UK="en_GB",A.English_US="en_US",A.Estonian="et",A.Filipino="fil",A.Finnish="fi",A.French="fr",A.Georgian="ka",A.German="de",A.Greek="el",A.Gujarati="gu",A.Hausa="ha",A.Hebrew="he",A.Hindi="hi",A.Hungarian="hu",A.Indonesian="id",A.Irish="ga",A.Italian="it",A.Japanese="ja",A.Kannada="kn",A.Kazakh="kk",A.Kinyarwanda="rw_RW",A.Korean="ko",A.Kyrgyz_Kyrgyzstan="ky_KG",A.Lao="lo",A.Latvian="lv",A.Lithuanian="lt",A.Macedonian="mk",A.Malay="ms",A.Malayalam="ml",A.Marathi="mr",A.Norwegian="nb",A.Persian="fa",A.Polish="pl",A.Portuguese_BR="pt_BR",A.Portuguese_POR="pt_PT",A.Punjabi="pa",A.Romanian="ro",A.Russian="ru",A.Serbian="sr",A.Slovak="sk",A.Slovenian="sl",A.Spanish="es",A.Spanish_ARG="es_AR",A.Spanish_SPA="es_ES",A.Spanish_MEX="es_MX",A.Swahili="sw",A.Swedish="sv",A.Tamil="ta",A.Telugu="te",A.Thai="th",A.Turkish="tr",A.Ukrainian="uk",A.Urdu="ur",A.Uzbek="uz",A.Vietnamese="vi",A.Zulu="zu",A))(q||{}),$=(R=>(R.AFN="AFN",R.EUR="EUR",R.ALL="ALL",R.DZD="DZD",R.USD="USD",R.AOA="AOA",R.XCD="XCD",R.ARS="ARS",R.AMD="AMD",R.AWG="AWG",R.AUD="AUD",R.AZN="AZN",R.BSD="BSD",R.BHD="BHD",R.BDT="BDT",R.BBD="BBD",R.BYN="BYN",R.BZD="BZD",R.XOF="XOF",R.BMD="BMD",R.INR="INR",R.BTN="BTN",R.BOB="BOB",R.BOV="BOV",R.BAM="BAM",R.BWP="BWP",R.NOK="NOK",R.BRL="BRL",R.BND="BND",R.BGN="BGN",R.BIF="BIF",R.CVE="CVE",R.KHR="KHR",R.XAF="XAF",R.CAD="CAD",R.KYD="KYD",R.CLP="CLP",R.CLF="CLF",R.CNY="CNY",R.COP="COP",R.COU="COU",R.KMF="KMF",R.CDF="CDF",R.NZD="NZD",R.CRC="CRC",R.HRK="HRK",R.CUP="CUP",R.CUC="CUC",R.ANG="ANG",R.CZK="CZK",R.DKK="DKK",R.DJF="DJF",R.DOP="DOP",R.EGP="EGP",R.SVC="SVC",R.ERN="ERN",R.SZL="SZL",R.ETB="ETB",R.FKP="FKP",R.FJD="FJD",R.XPF="XPF",R.GMD="GMD",R.GEL="GEL",R.GHS="GHS",R.GIP="GIP",R.GTQ="GTQ",R.GBP="GBP",R.GNF="GNF",R.GYD="GYD",R.HTG="HTG",R.HNL="HNL",R.HKD="HKD",R.HUF="HUF",R.ISK="ISK",R.IDR="IDR",R.XDR="XDR",R.IRR="IRR",R.IQD="IQD",R.ILS="ILS",R.JMD="JMD",R.JPY="JPY",R.JOD="JOD",R.KZT="KZT",R.KES="KES",R.KPW="KPW",R.KRW="KRW",R.KWD="KWD",R.KGS="KGS",R.LAK="LAK",R.LBP="LBP",R.LSL="LSL",R.ZAR="ZAR",R.LRD="LRD",R.LYD="LYD",R.CHF="CHF",R.MOP="MOP",R.MKD="MKD",R.MGA="MGA",R.MWK="MWK",R.MYR="MYR",R.MVR="MVR",R.MRU="MRU",R.MUR="MUR",R.XUA="XUA",R.MXN="MXN",R.MXV="MXV",R.MDL="MDL",R.MNT="MNT",R.MAD="MAD",R.MZN="MZN",R.MMK="MMK",R.NAD="NAD",R.NPR="NPR",R.NIO="NIO",R.NGN="NGN",R.OMR="OMR",R.PKR="PKR",R.PAB="PAB",R.PGK="PGK",R.PYG="PYG",R.PEN="PEN",R.PHP="PHP",R.PLN="PLN",R.QAR="QAR",R.RON="RON",R.RUB="RUB",R.RWF="RWF",R.SHP="SHP",R.WST="WST",R.STN="STN",R.SAR="SAR",R.RSD="RSD",R.SCR="SCR",R.SLL="SLL",R.SGD="SGD",R.XSU="XSU",R.SBD="SBD",R.SOS="SOS",R.SSP="SSP",R.LKR="LKR",R.SDG="SDG",R.SRD="SRD",R.SEK="SEK",R.CHE="CHE",R.CHW="CHW",R.SYP="SYP",R.TWD="TWD",R.TJS="TJS",R.TZS="TZS",R.THB="THB",R.TOP="TOP",R.TTD="TTD",R.TND="TND",R.TRY="TRY",R.TMT="TMT",R.UGX="UGX",R.UAH="UAH",R.AED="AED",R.USN="USN",R.UYU="UYU",R.UYI="UYI",R.UYW="UYW",R.UZS="UZS",R.VUV="VUV",R.VES="VES",R.VND="VND",R.YER="YER",R.ZMW="ZMW",R.ZWL="ZWL",R.XBA="XBA",R.XBB="XBB",R.XBC="XBC",R.XBD="XBD",R.XTS="XTS",R.XXX="XXX",R.XAU="XAU",R.XPD="XPD",R.XPT="XPT",R.XAG="XAG",R.AFA="AFA",R.FIM="FIM",R.ALK="ALK",R.ADP="ADP",R.ESP="ESP",R.FRF="FRF",R.AOK="AOK",R.AON="AON",R.AOR="AOR",R.ARA="ARA",R.ARP="ARP",R.ARY="ARY",R.RUR="RUR",R.ATS="ATS",R.AYM="AYM",R.AZM="AZM",R.BYB="BYB",R.BYR="BYR",R.BEC="BEC",R.BEF="BEF",R.BEL="BEL",R.BOP="BOP",R.BAD="BAD",R.BRB="BRB",R.BRC="BRC",R.BRE="BRE",R.BRN="BRN",R.BRR="BRR",R.BGJ="BGJ",R.BGK="BGK",R.BGL="BGL",R.BUK="BUK",R.HRD="HRD",R.CYP="CYP",R.CSJ="CSJ",R.CSK="CSK",R.ECS="ECS",R.ECV="ECV",R.GQE="GQE",R.EEK="EEK",R.XEU="XEU",R.GEK="GEK",R.DDM="DDM",R.DEM="DEM",R.GHC="GHC",R.GHP="GHP",R.GRD="GRD",R.GNE="GNE",R.GNS="GNS",R.GWE="GWE",R.GWP="GWP",R.ITL="ITL",R.ISJ="ISJ",R.IEP="IEP",R.ILP="ILP",R.ILR="ILR",R.LAJ="LAJ",R.LVL="LVL",R.LVR="LVR",R.LSM="LSM",R.ZAL="ZAL",R.LTL="LTL",R.LTT="LTT",R.LUC="LUC",R.LUF="LUF",R.LUL="LUL",R.MGF="MGF",R.MVQ="MVQ",R.MLF="MLF",R.MTL="MTL",R.MTP="MTP",R.MRO="MRO",R.MXP="MXP",R.MZE="MZE",R.MZM="MZM",R.NLG="NLG",R.NIC="NIC",R.PEH="PEH",R.PEI="PEI",R.PES="PES",R.PLZ="PLZ",R.PTE="PTE",R.ROK="ROK",R.ROL="ROL",R.STD="STD",R.CSD="CSD",R.SKK="SKK",R.SIT="SIT",R.RHD="RHD",R.ESA="ESA",R.ESB="ESB",R.SDD="SDD",R.SDP="SDP",R.SRG="SRG",R.CHC="CHC",R.TJR="TJR",R.TPE="TPE",R.TRL="TRL",R.TMM="TMM",R.UGS="UGS",R.UGW="UGW",R.UAK="UAK",R.SUR="SUR",R.USS="USS",R.UYN="UYN",R.UYP="UYP",R.VEB="VEB",R.VEF="VEF",R.VNC="VNC",R.YDD="YDD",R.YUD="YUD",R.YUM="YUM",R.YUN="YUN",R.ZRN="ZRN",R.ZRZ="ZRZ",R.ZMK="ZMK",R.ZWC="ZWC",R.ZWD="ZWD",R.ZWN="ZWN",R.ZWR="ZWR",R.XFO="XFO",R.XRE="XRE",R.XFU="XFU",R))($||{}),z=(O=>(O.AU="AU",O.ID="ID",O.IN="IN",O.JP="JP",O.SG="SG",O.KR="KR",O.DE="DE",O.CH="CH",O.GB="GB",O.BR="BR",O.BH="BH",O.ZA="ZA",O.AE="AE",O.CA="CA",O))(z||{}),b=(N=>(N.ALCOHOL="ALCOHOL",N.APPAREL="APPAREL",N.AUTO="AUTO",N.BEAUTY="BEAUTY",N.EDU="EDU",N.ENTERTAIN="ENTERTAIN",N.EVENT_PLAN="EVENT_PLAN",N.FINANCE="FINANCE",N.GOVT="GOVT",N.GROCERY="GROCERY",N.HEALTH="HEALTH",N.HOTEL="HOTEL",N.NONPROFIT="NONPROFIT",N.ONLINE_GAMBLING="ONLINE_GAMBLING",N.OTC_DRUGS="OTC_DRUGS",N.OTHER="OTHER",N.PHYSICAL_GAMBLING="PHYSICAL_GAMBLING",N.PROF_SERVICES="PROF_SERVICES",N.RESTAURANT="RESTAURANT",N.RETAIL="RETAIL",N.TRAVEL="TRAVEL",N))(b||{});0&&(module.exports={AudioMediaTypesEnum,BusinessVerticalEnum,ButtonPositionEnum,ButtonTypesEnum,CategoryEnum,ComponentTypesEnum,ConversationTypesEnum,CurrencyCodesEnum,DataLocalizationRegionEnum,DocumentMediaTypesEnum,HttpMethodsEnum,ImageMediaTypesEnum,InteractiveTypesEnum,LanguagesEnum,MessageTypesEnum,ParametersTypesEnum,ReferralSourceTypesEnum,RequestCodeMethodsEnum,StatusEnum,StickerMediaTypesEnum,SystemChangeTypesEnum,TemplateStatusEnum,VideoMediaTypesEnum,WabaConfigEnum,WebhookTypesEnum});
|
|
2
|
-
//# sourceMappingURL=enums.js.map
|