meta-cloud-api 1.1.4 → 1.1.5
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/base.d.ts +19 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/chunk-PECeCxCb.js +15 -0
- package/dist/config.d.ts +80 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/{base-CfDkvT1x.d.ts → enums.d.ts} +3 -142
- package/dist/enums.d.ts.map +1 -0
- package/dist/enums.js +681 -0
- package/dist/enums.js.map +1 -0
- package/dist/{index-DQkgkiB6.d.ts → httpsClient.d.ts} +3 -12
- package/dist/httpsClient.d.ts.map +1 -0
- package/dist/index.d.ts +4386 -21
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3436 -1
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +11 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/request.d.ts +52 -0
- package/dist/request.d.ts.map +1 -0
- package/package.json +13 -22
- package/dist/WebhookProcessor-BUZFeZD_.js +0 -3
- package/dist/WebhookProcessor-BUZFeZD_.js.map +0 -1
- package/dist/WebhookProcessor-Dq2Pa2cY.d.ts +0 -718
- package/dist/WebhookProcessor-Dq2Pa2cY.d.ts.map +0 -1
- package/dist/api/encryption/index.d.ts +0 -3
- package/dist/api/encryption/index.js +0 -1
- package/dist/api/flow/index.d.ts +0 -5
- package/dist/api/flow/index.js +0 -1
- package/dist/api/index.d.ts +0 -17
- package/dist/api/index.js +0 -1
- package/dist/api/media/index.d.ts +0 -3
- package/dist/api/media/index.js +0 -1
- package/dist/api/messages/builders/index.d.ts +0 -539
- package/dist/api/messages/builders/index.d.ts.map +0 -1
- package/dist/api/messages/builders/index.js +0 -2
- package/dist/api/messages/builders/index.js.map +0 -1
- package/dist/api/messages/index.d.ts +0 -4
- package/dist/api/messages/index.js +0 -1
- package/dist/api/phone/index.d.ts +0 -3
- package/dist/api/phone/index.js +0 -1
- package/dist/api/profile/index.d.ts +0 -3
- package/dist/api/profile/index.js +0 -1
- package/dist/api/qrCode/index.d.ts +0 -3
- package/dist/api/qrCode/index.js +0 -1
- package/dist/api/registration/index.d.ts +0 -3
- package/dist/api/registration/index.js +0 -1
- package/dist/api/template/index.d.ts +0 -3
- package/dist/api/template/index.js +0 -1
- package/dist/api/twoStepVerification/index.d.ts +0 -3
- package/dist/api/twoStepVerification/index.js +0 -1
- package/dist/api/waba/index.d.ts +0 -3
- package/dist/api/waba/index.js +0 -1
- package/dist/api-8hRAOyaL.js +0 -1
- package/dist/base-CfDkvT1x.d.ts.map +0 -1
- package/dist/base-D-cXu_lA.js +0 -2
- package/dist/base-D-cXu_lA.js.map +0 -1
- package/dist/buildFieldsQueryString-Cr-jz3p0.js +0 -2
- package/dist/buildFieldsQueryString-Cr-jz3p0.js.map +0 -1
- package/dist/chunk-CTAAG5j7.js +0 -1
- package/dist/common-C6FXBDm7.js +0 -2
- package/dist/common-C6FXBDm7.js.map +0 -1
- package/dist/common-CVbsmD26.d.ts +0 -426
- package/dist/common-CVbsmD26.d.ts.map +0 -1
- package/dist/common-CvPVD1o6.d.ts +0 -406
- package/dist/common-CvPVD1o6.d.ts.map +0 -1
- package/dist/core/webhook/frameworks/express.d.ts +0 -20
- package/dist/core/webhook/frameworks/express.js +0 -1
- package/dist/core/webhook/frameworks/nextjs-app.d.ts +0 -45
- package/dist/core/webhook/frameworks/nextjs-app.d.ts.map +0 -1
- package/dist/core/webhook/frameworks/nextjs-app.js +0 -2
- package/dist/core/webhook/frameworks/nextjs-app.js.map +0 -1
- package/dist/core/webhook/frameworks/nextjs.d.ts +0 -20
- package/dist/core/webhook/frameworks/nextjs.js +0 -1
- package/dist/core/webhook/index.d.ts +0 -20
- package/dist/core/webhook/index.js +0 -1
- package/dist/core/whatsapp/index.d.ts +0 -18
- package/dist/core/whatsapp/index.js +0 -1
- package/dist/encryption-Cwc0xcVL.js +0 -2
- package/dist/encryption-Cwc0xcVL.js.map +0 -1
- package/dist/enums-CSUpFXb8.js +0 -2
- package/dist/enums-CSUpFXb8.js.map +0 -1
- package/dist/express-B6fQdflY.d.ts +0 -78
- package/dist/express-B6fQdflY.d.ts.map +0 -1
- package/dist/express-CrfNLYMM.js +0 -2
- package/dist/express-CrfNLYMM.js.map +0 -1
- package/dist/flow-CVes0Qus.js +0 -2
- package/dist/flow-CVes0Qus.js.map +0 -1
- package/dist/flowTypeGuards-Gn3-slCW.js +0 -2
- package/dist/flowTypeGuards-Gn3-slCW.js.map +0 -1
- package/dist/handler-BGqjZ0xg.js +0 -2
- package/dist/handler-BGqjZ0xg.js.map +0 -1
- package/dist/index-3KglHVAg.d.ts +0 -354
- package/dist/index-3KglHVAg.d.ts.map +0 -1
- package/dist/index-BNeg6hHx.d.ts +0 -99
- package/dist/index-BNeg6hHx.d.ts.map +0 -1
- package/dist/index-BiTq23oi.d.ts +0 -34
- package/dist/index-BiTq23oi.d.ts.map +0 -1
- package/dist/index-BmfnREgM.d.ts +0 -47
- package/dist/index-BmfnREgM.d.ts.map +0 -1
- package/dist/index-CaGffSja.d.ts +0 -24
- package/dist/index-CaGffSja.d.ts.map +0 -1
- package/dist/index-CeTmbIXi.d.ts +0 -180
- package/dist/index-CeTmbIXi.d.ts.map +0 -1
- package/dist/index-CoyByMuM.d.ts +0 -137
- package/dist/index-CoyByMuM.d.ts.map +0 -1
- package/dist/index-CwujtcvH.d.ts +0 -370
- package/dist/index-CwujtcvH.d.ts.map +0 -1
- package/dist/index-DQ7z58xp.d.ts +0 -104
- package/dist/index-DQ7z58xp.d.ts.map +0 -1
- package/dist/index-DQkgkiB6.d.ts.map +0 -1
- package/dist/index-LKrIp3Oo.d.ts +0 -1
- package/dist/index-_-06JPan.d.ts +0 -143
- package/dist/index-_-06JPan.d.ts.map +0 -1
- package/dist/index-a_YS40Iv.d.ts +0 -91
- package/dist/index-a_YS40Iv.d.ts.map +0 -1
- package/dist/index-d7TLqtYh.d.ts +0 -171
- package/dist/index-d7TLqtYh.d.ts.map +0 -1
- package/dist/isMetaError-B3AglYeY.d.ts +0 -66
- package/dist/isMetaError-B3AglYeY.d.ts.map +0 -1
- package/dist/media-Dw5OGzDD.js +0 -2
- package/dist/media-Dw5OGzDD.js.map +0 -1
- package/dist/messages-h5-NW8QO.js +0 -2
- package/dist/messages-h5-NW8QO.js.map +0 -1
- package/dist/nextjs-DxRCL4t3.js +0 -2
- package/dist/nextjs-DxRCL4t3.js.map +0 -1
- package/dist/objectToQueryString-CAHI0qTs.js +0 -2
- package/dist/objectToQueryString-CAHI0qTs.js.map +0 -1
- package/dist/phone-CZyWLyWB.js +0 -2
- package/dist/phone-CZyWLyWB.js.map +0 -1
- package/dist/profile-Bb7GDP0n.js +0 -2
- package/dist/profile-Bb7GDP0n.js.map +0 -1
- package/dist/qrCode-CeZEtX9J.js +0 -2
- package/dist/qrCode-CeZEtX9J.js.map +0 -1
- package/dist/registration-BkjhC3xw.js +0 -2
- package/dist/registration-BkjhC3xw.js.map +0 -1
- package/dist/template-Bgy-BCXJ.js +0 -2
- package/dist/template-Bgy-BCXJ.js.map +0 -1
- package/dist/twoStepVerification-DYlYF_P5.js +0 -2
- package/dist/twoStepVerification-DYlYF_P5.js.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.js +0 -1
- package/dist/utils/index.d.ts +0 -43
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/version-BUuqrHc6.js +0 -3
- package/dist/version-BUuqrHc6.js.map +0 -1
- package/dist/waba-SF2W3z2U.js +0 -2
- package/dist/waba-SF2W3z2U.js.map +0 -1
- package/dist/webhook-D4DQ01Xq.js +0 -2
- package/dist/webhook-D4DQ01Xq.js.map +0 -1
- package/dist/whatsapp-B85mxH5f.js +0 -10
- package/dist/whatsapp-B85mxH5f.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["name: NameObject","phoneObj: PhoneObject","emailObj: EmailObject","address: AddressesObject","org: OrgObject","urlObj: URLObject"],"sources":["../../../../src/api/messages/builders/ContactMessageBuilder.ts","../../../../src/api/messages/builders/InteractiveMessageBuilder.ts","../../../../src/api/messages/builders/LocationMessageBuilder.ts","../../../../src/api/messages/builders/MediaMessageBuilder.ts","../../../../src/api/messages/builders/ReactionMessageBuilder.ts","../../../../src/api/messages/builders/TemplateMessageBuilder.ts","../../../../src/api/messages/builders/TextMessageBuilder.ts"],"sourcesContent":["import type {\n AddressesObject,\n ContactObject,\n EmailObject,\n NameObject,\n OrgObject,\n PhoneObject,\n URLObject,\n} from '../types/contact';\n\n/**\n * Builder class for creating contact messages with a fluent API\n */\nexport class ContactMessageBuilder {\n private contact: Partial<ContactObject> = {};\n\n /**\n * Set the contact name (required)\n */\n setName(name: NameObject): this {\n if (!name || typeof name !== 'object') {\n throw new Error('Name must be an object');\n }\n this.contact.name = name;\n return this;\n }\n\n /**\n * Set simple name with first name only\n */\n setSimpleName(firstName: string, lastName?: string): this {\n if (!firstName || typeof firstName !== 'string') {\n throw new Error('First name must be a non-empty string');\n }\n const name: NameObject = {\n formatted_name: lastName ? `${firstName} ${lastName}` : firstName,\n first_name: firstName,\n };\n if (lastName) {\n name.last_name = lastName;\n }\n return this.setName(name);\n }\n\n /**\n * Set full name details\n */\n setFullName(firstName: string, lastName?: string, middleName?: string, suffix?: string, prefix?: string): this {\n if (!firstName || typeof firstName !== 'string') {\n throw new Error('First name must be a non-empty string');\n }\n\n const nameParts = [prefix, firstName, middleName, lastName, suffix].filter(Boolean);\n const name: NameObject = {\n formatted_name: nameParts.join(' '),\n first_name: firstName,\n };\n\n if (lastName) name.last_name = lastName;\n if (middleName) name.middle_name = middleName;\n if (suffix) name.suffix = suffix;\n if (prefix) name.prefix = prefix;\n\n return this.setName(name);\n }\n\n /**\n * Add phone numbers\n */\n addPhone(phone: string, type?: string, waId?: string): this {\n if (!phone || typeof phone !== 'string') {\n throw new Error('Phone number must be a non-empty string');\n }\n\n const phoneObj: PhoneObject = { phone: 'PHONE_NUMBER' };\n if (type) phoneObj.type = type;\n if (waId) phoneObj.wa_id = waId;\n\n if (!this.contact.phones) {\n this.contact.phones = [];\n }\n this.contact.phones.push(phoneObj);\n return this;\n }\n\n /**\n * Add email addresses\n */\n addEmail(email: string, type?: string): this {\n if (!email || typeof email !== 'string') {\n throw new Error('Email must be a non-empty string');\n }\n if (!email.match(/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/)) {\n throw new Error('Invalid email format');\n }\n\n const emailObj: EmailObject = { email };\n if (type) emailObj.type = type;\n\n if (!this.contact.emails) {\n this.contact.emails = [];\n }\n this.contact.emails.push(emailObj);\n return this;\n }\n\n /**\n * Add address\n */\n addAddress(address: AddressesObject): this {\n if (!address || typeof address !== 'object') {\n throw new Error('Address must be an object');\n }\n\n if (!this.contact.addresses) {\n this.contact.addresses = [];\n }\n this.contact.addresses.push(address);\n return this;\n }\n\n /**\n * Add simple address\n */\n addSimpleAddress(street: string, city: string, country: string, type?: string): this {\n const address: AddressesObject = {\n street,\n city,\n country,\n };\n if (type) address.type = type;\n return this.addAddress(address);\n }\n\n /**\n * Set organization details\n */\n setOrganization(company: string, department?: string, title?: string): this {\n const org: OrgObject = {};\n if (company) org.company = company;\n if (department) org.department = department;\n if (title) org.title = title;\n\n this.contact.org = org;\n return this;\n }\n\n /**\n * Add URL\n */\n addUrl(url: string, type?: string): this {\n if (!url || typeof url !== 'string') {\n throw new Error('URL must be a non-empty string');\n }\n\n const urlObj: URLObject = { url };\n if (type) urlObj.type = type;\n\n if (!this.contact.urls) {\n this.contact.urls = [];\n }\n this.contact.urls.push(urlObj);\n return this;\n }\n\n /**\n * Set birthday (format: YYYY-MM-DD)\n */\n setBirthday(year: number, month: number, day: number): this {\n const monthStr = month.toString().padStart(2, '0');\n const dayStr = day.toString().padStart(2, '0');\n this.contact.birthday = `${year}-${monthStr}-${dayStr}` as ContactObject['birthday'];\n return this;\n }\n\n /**\n * Build the final contact object\n */\n build(): ContactObject {\n if (!this.contact.name) {\n throw new Error('Contact name is required');\n }\n\n return this.contact as ContactObject;\n }\n\n /**\n * Reset the builder for reuse\n */\n reset(): this {\n this.contact = {};\n return this;\n }\n}\n\n/**\n * Factory class for common contact patterns\n */\nexport class ContactMessageFactory {\n /**\n * Create a simple contact with name and phone\n */\n static createSimpleContact(firstName: string, phone: string): ContactObject {\n return new ContactMessageBuilder().setSimpleName(firstName).addPhone(phone).build();\n }\n\n /**\n * Create a business contact\n */\n static createBusinessContact(\n firstName: string,\n lastName: string,\n company: string,\n title: string,\n phone: string,\n email: string,\n ): ContactObject {\n return new ContactMessageBuilder()\n .setSimpleName(firstName, lastName)\n .setOrganization(company, undefined, title)\n .addPhone(phone, 'WORK')\n .addEmail(email, 'WORK')\n .build();\n }\n\n /**\n * Create a personal contact with full details\n */\n static createPersonalContact(\n firstName: string,\n lastName: string,\n mobilePhone: string,\n email?: string,\n birthday?: { year: number; month: number; day: number },\n ): ContactObject {\n const builder = new ContactMessageBuilder().setSimpleName(firstName, lastName).addPhone(mobilePhone, 'MOBILE');\n\n if (email) {\n builder.addEmail(email, 'HOME');\n }\n\n if (birthday) {\n builder.setBirthday(birthday.year, birthday.month, birthday.day);\n }\n\n return builder.build();\n }\n}\n","import { InteractiveTypesEnum } from '../../../types/enums';\nimport type { InteractiveObject } from '../types/interactive';\n\n/**\n * Type guards for different action object types\n */\ntype RowObject = {\n id: string;\n title: string;\n description?: string;\n};\n\ntype SectionObject = {\n title?: string;\n rows: RowObject[];\n};\n\ntype BaseActionObject = {\n buttons?: Array<{ type: 'reply'; reply: { id: string; title: string } }>;\n sections?: SectionObject[];\n button?: string;\n catalog_id?: string;\n product_retailer_id?: string;\n};\n\ntype CtaUrlActionObject = {\n name: 'cta_url';\n parameters: {\n display_text: string;\n url: string;\n };\n};\n\ntype ActionObjectUnion = BaseActionObject | CtaUrlActionObject;\n\nfunction isBaseActionObject(action: ActionObjectUnion): action is BaseActionObject {\n return !('name' in action);\n}\n\nfunction isCtaUrlActionObject(action: ActionObjectUnion): action is CtaUrlActionObject {\n return 'name' in action && action.name === 'cta_url';\n}\n\n/**\n * Builder class for creating interactive messages with a fluent API\n */\nexport class InteractiveMessageBuilder {\n private message: Partial<InteractiveObject> = {};\n\n /**\n * Set the interactive message type\n */\n setType(type: InteractiveTypesEnum): this {\n this.message.type = type;\n return this;\n }\n\n /**\n * Set the body text of the message\n */\n setBody(text: string): this {\n this.message.body = { text };\n return this;\n }\n\n /**\n * Set the footer text of the message\n */\n setFooter(text: string): this {\n this.message.footer = { text };\n return this;\n }\n\n /**\n * Set a text header\n */\n setTextHeader(text: string): this {\n this.message.header = { type: 'text', text };\n return this;\n }\n\n /**\n * Set an image header\n */\n setImageHeader(imageUrl: string): this {\n this.message.header = {\n type: 'image',\n image: { link: imageUrl },\n };\n return this;\n }\n\n /**\n * Add reply buttons (for button type messages)\n */\n addReplyButtons(buttons: Array<{ id: string; title: string }>): this {\n if (!this.message.action) {\n this.message.action = {} as ActionObjectUnion;\n }\n\n const action = this.message.action as ActionObjectUnion;\n if (isBaseActionObject(action)) {\n action.buttons = buttons.map((btn) => ({\n type: 'reply',\n reply: {\n id: btn.id,\n title: btn.title,\n },\n }));\n }\n\n return this;\n }\n\n /**\n * Add list sections (for list type messages)\n * Note: This creates a single section with multiple rows\n */\n addListSections(\n sections: Array<{\n title?: string;\n rows: Array<{ id: string; title: string; description?: string }>;\n }>,\n ): this {\n if (!this.message.action) {\n this.message.action = {} as ActionObjectUnion;\n }\n\n const action = this.message.action as ActionObjectUnion;\n if (isBaseActionObject(action)) {\n // Convert sections to the proper format expected by WhatsApp API\n action.sections = sections.map((section) => ({\n title: section.title,\n rows: section.rows,\n }));\n }\n\n return this;\n }\n\n /**\n * Set the button text for list messages\n */\n setListButtonText(buttonText: string): this {\n if (!this.message.action) {\n this.message.action = {} as ActionObjectUnion;\n }\n\n const action = this.message.action as ActionObjectUnion;\n if (isBaseActionObject(action)) {\n action.button = buttonText;\n }\n\n return this;\n }\n\n /**\n * Set CTA URL action\n */\n setCTAUrl(displayText: string, url: string): this {\n this.message.action = {\n name: 'cta_url',\n parameters: {\n display_text: displayText,\n url: url,\n },\n } as CtaUrlActionObject;\n\n return this;\n }\n\n /**\n * Build the final interactive object\n */\n build(): InteractiveObject {\n if (!this.message.type) {\n throw new Error('Interactive message type is required');\n }\n if (!this.message.body) {\n throw new Error('Interactive message body is required');\n }\n if (!this.message.action) {\n throw new Error('Interactive message action is required');\n }\n\n return this.message as InteractiveObject;\n }\n\n /**\n * Reset the builder for reuse\n */\n reset(): this {\n this.message = {};\n return this;\n }\n}\n\n/**\n * Convenience factory functions for common interactive message types\n */\nexport class InteractiveMessageFactory {\n /**\n * Create a button message with reply buttons\n */\n static createButtonMessage(\n bodyText: string,\n buttons: Array<{ id: string; title: string }>,\n options?: { headerText?: string; footerText?: string },\n ): InteractiveObject {\n const builder = new InteractiveMessageBuilder()\n .setType(InteractiveTypesEnum.Button)\n .setBody(bodyText)\n .addReplyButtons(buttons);\n\n if (options?.headerText) {\n builder.setTextHeader(options.headerText);\n }\n if (options?.footerText) {\n builder.setFooter(options.footerText);\n }\n\n return builder.build();\n }\n\n /**\n * Create a list message with sections\n */\n static createListMessage(\n bodyText: string,\n buttonText: string,\n sections: Array<{\n title?: string;\n rows: Array<{ id: string; title: string; description?: string }>;\n }>,\n options?: { headerText?: string; footerText?: string },\n ): InteractiveObject {\n const builder = new InteractiveMessageBuilder()\n .setType(InteractiveTypesEnum.List)\n .setBody(bodyText)\n .addListSections(sections);\n\n if (options?.headerText) {\n builder.setTextHeader(options.headerText);\n }\n if (options?.footerText) {\n builder.setFooter(options.footerText);\n }\n\n const message = builder.build();\n\n // Add button text for list messages\n const action = message.action as ActionObjectUnion;\n if (isBaseActionObject(action)) {\n action.button = buttonText;\n }\n\n return message;\n }\n\n /**\n * Create a CTA URL message\n */\n static createCTAUrlMessage(\n bodyText: string,\n displayText: string,\n url: string,\n options?: { headerText?: string; footerText?: string },\n ): InteractiveObject {\n const builder = new InteractiveMessageBuilder()\n .setType(InteractiveTypesEnum.CtaUrl)\n .setBody(bodyText)\n .setCTAUrl(displayText, url);\n\n if (options?.headerText) {\n builder.setTextHeader(options.headerText);\n }\n if (options?.footerText) {\n builder.setFooter(options.footerText);\n }\n\n return builder.build();\n }\n}\n","import type { LocationObject } from '../types/location';\n\n/**\n * Builder class for creating location messages with a fluent API\n */\nexport class LocationMessageBuilder {\n private location: Partial<LocationObject> = {};\n\n /**\n * Set the latitude coordinate\n */\n setLatitude(latitude: number): this {\n if (typeof latitude !== 'number' || latitude < -90 || latitude > 90) {\n throw new Error('Latitude must be a number between -90 and 90');\n }\n this.location.latitude = latitude;\n return this;\n }\n\n /**\n * Set the longitude coordinate\n */\n setLongitude(longitude: number): this {\n if (typeof longitude !== 'number' || longitude < -180 || longitude > 180) {\n throw new Error('Longitude must be a number between -180 and 180');\n }\n this.location.longitude = longitude;\n return this;\n }\n\n /**\n * Set coordinates using latitude and longitude\n */\n setCoordinates(latitude: number, longitude: number): this {\n return this.setLatitude(latitude).setLongitude(longitude);\n }\n\n /**\n * Set the location name\n */\n setName(name: string): this {\n if (name && typeof name !== 'string') {\n throw new Error('Location name must be a string');\n }\n this.location.name = name;\n return this;\n }\n\n /**\n * Set the location address\n */\n setAddress(address: string): this {\n if (address && typeof address !== 'string') {\n throw new Error('Location address must be a string');\n }\n this.location.address = address;\n return this;\n }\n\n /**\n * Build the final location object\n */\n build(): LocationObject {\n if (this.location.latitude === undefined) {\n throw new Error('Latitude is required');\n }\n if (this.location.longitude === undefined) {\n throw new Error('Longitude is required');\n }\n\n return this.location as LocationObject;\n }\n\n /**\n * Reset the builder for reuse\n */\n reset(): this {\n this.location = {};\n return this;\n }\n}\n\n/**\n * Factory class for common location patterns\n */\nexport class LocationMessageFactory {\n /**\n * Create a simple location with just coordinates\n */\n static createSimpleLocation(latitude: number, longitude: number): LocationObject {\n return new LocationMessageBuilder().setCoordinates(latitude, longitude).build();\n }\n\n /**\n * Create a location with name and address\n */\n static createNamedLocation(latitude: number, longitude: number, name: string, address: string): LocationObject {\n return new LocationMessageBuilder()\n .setCoordinates(latitude, longitude)\n .setName(name)\n .setAddress(address)\n .build();\n }\n\n /**\n * Create a business location\n */\n static createBusinessLocation(\n latitude: number,\n longitude: number,\n businessName: string,\n fullAddress: string,\n ): LocationObject {\n return new LocationMessageBuilder()\n .setCoordinates(latitude, longitude)\n .setName(businessName)\n .setAddress(fullAddress)\n .build();\n }\n}\n","import type {\n AudioMediaObject,\n DocumentMediaObject,\n ImageMediaObject,\n StickerMediaObject,\n VideoMediaObject,\n} from '../types/media';\n\n/**\n * Base builder for media messages\n */\nabstract class BaseMediaBuilder<T> {\n protected media: Partial<T> = {};\n\n /**\n * Set media ID (for uploaded media)\n */\n setId(id: string): this {\n if (!id || typeof id !== 'string') {\n throw new Error('Media ID must be a non-empty string');\n }\n (this.media as any).id = id;\n return this;\n }\n\n /**\n * Set media URL\n */\n setLink(url: string): this {\n if (!url || typeof url !== 'string') {\n throw new Error('Media URL must be a non-empty string');\n }\n if (!url.match(/^https?:\\/\\//)) {\n throw new Error('Media URL must be a valid HTTP/HTTPS URL');\n }\n (this.media as any).link = url;\n return this;\n }\n\n /**\n * Set media caption\n */\n setCaption(caption: string): this {\n if (caption && typeof caption !== 'string') {\n throw new Error('Caption must be a string');\n }\n (this.media as any).caption = caption;\n return this;\n }\n\n /**\n * Build the media object\n */\n build(): T {\n if (!(this.media as any).id && !(this.media as any).link) {\n throw new Error('Either media ID or link is required');\n }\n return this.media as T;\n }\n\n /**\n * Reset the builder\n */\n reset(): this {\n this.media = {};\n return this;\n }\n}\n\n/**\n * Builder for image messages\n */\nexport class ImageMessageBuilder extends BaseMediaBuilder<ImageMediaObject> {\n // Image inherits all methods from BaseMediaBuilder\n}\n\n/**\n * Builder for video messages\n */\nexport class VideoMessageBuilder extends BaseMediaBuilder<VideoMediaObject> {\n // Video inherits all methods from BaseMediaBuilder\n}\n\n/**\n * Builder for audio messages\n */\nexport class AudioMessageBuilder extends BaseMediaBuilder<AudioMediaObject> {\n // Audio doesn't support caption\n setCaption(caption: string): this {\n throw new Error('Audio messages do not support captions');\n }\n}\n\n/**\n * Builder for document messages\n */\nexport class DocumentMessageBuilder extends BaseMediaBuilder<DocumentMediaObject> {\n /**\n * Set document filename\n */\n setFilename(filename: string): this {\n if (!filename || typeof filename !== 'string') {\n throw new Error('Filename must be a non-empty string');\n }\n this.media.filename = filename;\n return this;\n }\n}\n\n/**\n * Builder for sticker messages\n */\nexport class StickerMessageBuilder extends BaseMediaBuilder<StickerMediaObject> {\n // Sticker doesn't support caption\n setCaption(caption: string): this {\n throw new Error('Sticker messages do not support captions');\n }\n}\n\n/**\n * Factory class for common media patterns\n */\nexport class MediaMessageFactory {\n /**\n * Create an image with caption\n */\n static createImageWithCaption(linkOrId: string, caption: string, isId: boolean = false): ImageMediaObject {\n const builder = new ImageMessageBuilder();\n if (isId) {\n builder.setId(linkOrId);\n } else {\n builder.setLink(linkOrId);\n }\n return builder.setCaption(caption).build();\n }\n\n /**\n * Create a video with caption\n */\n static createVideoWithCaption(linkOrId: string, caption: string, isId: boolean = false): VideoMediaObject {\n const builder = new VideoMessageBuilder();\n if (isId) {\n builder.setId(linkOrId);\n } else {\n builder.setLink(linkOrId);\n }\n return builder.setCaption(caption).build();\n }\n\n /**\n * Create a document with filename\n */\n static createDocument(\n linkOrId: string,\n filename: string,\n caption?: string,\n isId: boolean = false,\n ): DocumentMediaObject {\n const builder = new DocumentMessageBuilder();\n if (isId) {\n builder.setId(linkOrId);\n } else {\n builder.setLink(linkOrId);\n }\n builder.setFilename(filename);\n if (caption) {\n builder.setCaption(caption);\n }\n return builder.build();\n }\n\n /**\n * Create an audio message\n */\n static createAudio(linkOrId: string, isId: boolean = false): AudioMediaObject {\n const builder = new AudioMessageBuilder();\n if (isId) {\n builder.setId(linkOrId);\n } else {\n builder.setLink(linkOrId);\n }\n return builder.build();\n }\n\n /**\n * Create a sticker message\n */\n static createSticker(linkOrId: string, isId: boolean = false): StickerMediaObject {\n const builder = new StickerMessageBuilder();\n if (isId) {\n builder.setId(linkOrId);\n } else {\n builder.setLink(linkOrId);\n }\n return builder.build();\n }\n}\n","/**\n * Builder class for creating reaction messages with a fluent API\n */\nexport class ReactionMessageBuilder {\n private reaction: { message_id?: string; emoji?: string } = {};\n\n /**\n * Set the message ID to react to\n */\n setMessageId(messageId: string): this {\n if (!messageId || typeof messageId !== 'string') {\n throw new Error('Message ID must be a non-empty string');\n }\n this.reaction.message_id = messageId;\n return this;\n }\n\n /**\n * Set the emoji for the reaction\n */\n setEmoji(emoji: string): this {\n if (!emoji || typeof emoji !== 'string') {\n throw new Error('Emoji must be a non-empty string');\n }\n // Validate that it's a single emoji (basic check)\n if (emoji.length > 4) {\n throw new Error('Please provide a single emoji character');\n }\n this.reaction.emoji = emoji;\n return this;\n }\n\n /**\n * Remove a reaction (by sending empty emoji)\n */\n removeReaction(): this {\n this.reaction.emoji = '';\n return this;\n }\n\n /**\n * Build the final reaction object\n */\n build(): { message_id: string; emoji: string } {\n if (!this.reaction.message_id) {\n throw new Error('Message ID is required');\n }\n if (this.reaction.emoji === undefined) {\n throw new Error('Emoji is required (use empty string to remove reaction)');\n }\n\n return this.reaction as { message_id: string; emoji: string };\n }\n\n /**\n * Reset the builder for reuse\n */\n reset(): this {\n this.reaction = {};\n return this;\n }\n}\n\n/**\n * Factory class for common reaction patterns\n */\nexport class ReactionMessageFactory {\n /**\n * Create a like reaction\n */\n static createLike(messageId: string): { message_id: string; emoji: string } {\n return new ReactionMessageBuilder().setMessageId(messageId).setEmoji('👍').build();\n }\n\n /**\n * Create a heart reaction\n */\n static createHeart(messageId: string): { message_id: string; emoji: string } {\n return new ReactionMessageBuilder().setMessageId(messageId).setEmoji('❤️').build();\n }\n\n /**\n * Create a laughing reaction\n */\n static createLaugh(messageId: string): { message_id: string; emoji: string } {\n return new ReactionMessageBuilder().setMessageId(messageId).setEmoji('😂').build();\n }\n\n /**\n * Create a wow reaction\n */\n static createWow(messageId: string): { message_id: string; emoji: string } {\n return new ReactionMessageBuilder().setMessageId(messageId).setEmoji('😮').build();\n }\n\n /**\n * Create a sad reaction\n */\n static createSad(messageId: string): { message_id: string; emoji: string } {\n return new ReactionMessageBuilder().setMessageId(messageId).setEmoji('😢').build();\n }\n\n /**\n * Create an angry reaction\n */\n static createAngry(messageId: string): { message_id: string; emoji: string } {\n return new ReactionMessageBuilder().setMessageId(messageId).setEmoji('😠').build();\n }\n\n /**\n * Remove a reaction\n */\n static removeReaction(messageId: string): { message_id: string; emoji: string } {\n return new ReactionMessageBuilder().setMessageId(messageId).removeReaction().build();\n }\n}\n","import {\n ButtonPositionEnum,\n ComponentTypesEnum,\n CurrencyCodesEnum,\n LanguagesEnum,\n ParametersTypesEnum,\n SubTypeEnum,\n} from '../../../types/enums';\nimport type { MessageTemplateObject } from '../types/template';\n\n// Helper type for currency parameter\nexport type CurrencyParameterHelper = {\n type: ParametersTypesEnum.Currency;\n currency: {\n fallback_value: string;\n code: CurrencyCodesEnum;\n amount_1000: number;\n };\n};\n\n// Helper type for date time parameter\nexport type DateTimeParameterHelper = {\n type: ParametersTypesEnum.DateTime;\n date_time: {\n fallback_value: string;\n timestamp: number;\n };\n};\n\n// Union type for all parameter helpers\nexport type ParameterObject = CurrencyParameterHelper | DateTimeParameterHelper;\n\n// Type guards for validation\nfunction isValidLanguageCode(code: string): code is LanguagesEnum {\n return Object.values(LanguagesEnum).includes(code as LanguagesEnum);\n}\n\nfunction isValidButtonPosition(index: number): index is ButtonPositionEnum {\n return Object.values(ButtonPositionEnum).includes(index as ButtonPositionEnum);\n}\n\n/**\n * Builder class for creating template messages with a fluent API\n */\nexport class TemplateMessageBuilder {\n private template: Partial<MessageTemplateObject<ComponentTypesEnum>> = {\n components: [],\n };\n\n /**\n * Set the template name\n */\n setName(name: string): this {\n if (!name || name.trim().length === 0) {\n throw new Error('Template name cannot be empty');\n }\n this.template.name = name;\n return this;\n }\n\n /**\n * Set the template language\n */\n setLanguage(code: string): this {\n if (!isValidLanguageCode(code)) {\n throw new Error(`Invalid language code: ${code}. Must be a valid LanguagesEnum value.`);\n }\n this.template.language = { policy: 'deterministic', code };\n return this;\n }\n\n /**\n * Add a header component with text parameters\n */\n addTextHeader(parameters: string[]): this {\n if (!Array.isArray(parameters)) {\n throw new Error('Parameters must be an array');\n }\n\n const headerComponent = {\n type: ComponentTypesEnum.Header,\n parameters: parameters.map((param) => {\n if (typeof param !== 'string') {\n throw new Error('All parameters must be strings');\n }\n return { type: ParametersTypesEnum.Text, text: param };\n }),\n };\n\n if (!this.template.components) {\n this.template.components = [];\n }\n this.template.components.push(headerComponent as any);\n return this;\n }\n\n /**\n * Add a header component with image\n */\n addImageHeader(imageUrl: string): this {\n if (!imageUrl || typeof imageUrl !== 'string') {\n throw new Error('Image URL must be a non-empty string');\n }\n\n const headerComponent = {\n type: ComponentTypesEnum.Header,\n parameters: [\n {\n type: ParametersTypesEnum.Image,\n image: { link: imageUrl },\n },\n ],\n };\n\n if (!this.template.components) {\n this.template.components = [];\n }\n this.template.components.push(headerComponent as any);\n return this;\n }\n\n /**\n * Add a body component with text parameters\n */\n addBody(parameters: string[]): this {\n if (!Array.isArray(parameters)) {\n throw new Error('Parameters must be an array');\n }\n\n const bodyComponent = {\n type: ComponentTypesEnum.Body,\n parameters: parameters.map((param) => {\n if (typeof param !== 'string') {\n throw new Error('All parameters must be strings');\n }\n return { type: ParametersTypesEnum.Text, text: param };\n }),\n };\n\n if (!this.template.components) {\n this.template.components = [];\n }\n this.template.components.push(bodyComponent as any);\n return this;\n }\n\n /**\n * Add a footer component (usually no parameters needed)\n */\n addFooter(): this {\n const footerComponent = {\n type: ComponentTypesEnum.Footer,\n };\n\n if (!this.template.components) {\n this.template.components = [];\n }\n this.template.components.push(footerComponent as any);\n return this;\n }\n\n /**\n * Add button components (for quick replies, URLs, etc.)\n */\n addButtons(\n buttons: Array<{\n index: number;\n type: 'quick_reply' | 'url';\n parameters?: string[];\n }>,\n ): this {\n if (!Array.isArray(buttons)) {\n throw new Error('Buttons must be an array');\n }\n\n buttons.forEach((button) => {\n if (typeof button.index !== 'number' || !isValidButtonPosition(button.index)) {\n throw new Error(`Button index must be a valid ButtonPositionEnum value: ${button.index}`);\n }\n\n // Map string types to SubTypeEnum values\n const subType = button.type === 'quick_reply' ? SubTypeEnum.QuickReply : SubTypeEnum.Url;\n\n const buttonComponent = {\n type: ComponentTypesEnum.Button,\n sub_type: subType,\n index: button.index,\n } as any;\n\n if (button.parameters && button.parameters.length > 0) {\n if (!Array.isArray(button.parameters)) {\n throw new Error('Button parameters must be an array');\n }\n\n // Handle different parameter types based on button type\n if (button.type === 'quick_reply') {\n // Quick reply buttons use payload parameters\n buttonComponent.parameters = button.parameters.map((param) => {\n if (typeof param !== 'string') {\n throw new Error('All button parameters must be strings');\n }\n return { type: ParametersTypesEnum.Payload, payload: param };\n });\n } else if (button.type === 'url') {\n // URL buttons use text parameters\n buttonComponent.parameters = button.parameters.map((param) => {\n if (typeof param !== 'string') {\n throw new Error('All button parameters must be strings');\n }\n return { type: ParametersTypesEnum.Text, text: param };\n });\n }\n }\n\n if (!this.template.components) {\n this.template.components = [];\n }\n this.template.components.push(buttonComponent);\n });\n\n return this;\n }\n\n /**\n * Add a currency parameter for header/body\n */\n addCurrencyParameter(fallbackValue: string, currencyCode: string, amount: number): CurrencyParameterHelper {\n if (!fallbackValue || typeof fallbackValue !== 'string') {\n throw new Error('Fallback value must be a non-empty string');\n }\n if (!currencyCode || typeof currencyCode !== 'string') {\n throw new Error('Currency code must be a non-empty string');\n }\n if (typeof amount !== 'number' || amount < 0) {\n throw new Error('Amount must be a non-negative number');\n }\n\n return {\n type: ParametersTypesEnum.Currency,\n currency: {\n fallback_value: fallbackValue,\n code: currencyCode as CurrencyCodesEnum,\n amount_1000: amount * 1000, // WhatsApp expects amount in smallest unit\n },\n };\n }\n\n /**\n * Add a date time parameter\n */\n addDateTimeParameter(fallbackValue: string, timestamp: number): DateTimeParameterHelper {\n if (!fallbackValue || typeof fallbackValue !== 'string') {\n throw new Error('Fallback value must be a non-empty string');\n }\n if (typeof timestamp !== 'number' || timestamp <= 0) {\n throw new Error('Timestamp must be a positive number');\n }\n\n return {\n type: ParametersTypesEnum.DateTime,\n date_time: {\n fallback_value: fallbackValue,\n timestamp: timestamp,\n },\n };\n }\n\n /**\n * Build the final template object\n */\n build(): MessageTemplateObject<ComponentTypesEnum> {\n if (!this.template.name) {\n throw new Error('Template name is required');\n }\n if (!this.template.language) {\n throw new Error('Template language is required');\n }\n\n return this.template as MessageTemplateObject<ComponentTypesEnum>;\n }\n\n /**\n * Reset the builder for reuse\n */\n reset(): this {\n this.template = { components: [] };\n return this;\n }\n}\n\n/**\n * Factory class for common template patterns\n */\nexport class TemplateMessageFactory {\n /**\n * Create a simple text-only template\n */\n static createSimpleTextTemplate(\n name: string,\n language: string,\n bodyParameters: string[],\n ): MessageTemplateObject<ComponentTypesEnum> {\n if (!name || !language || !Array.isArray(bodyParameters)) {\n throw new Error('Invalid parameters for simple text template');\n }\n\n return new TemplateMessageBuilder().setName(name).setLanguage(language).addBody(bodyParameters).build();\n }\n\n /**\n * Create a template with header, body and buttons\n */\n static createCompleteTemplate(\n name: string,\n language: string,\n options: {\n headerParameters?: string[];\n headerImage?: string;\n bodyParameters: string[];\n buttons?: Array<{\n index: number;\n type: 'quick_reply' | 'url';\n parameters?: string[];\n }>;\n },\n ): MessageTemplateObject<ComponentTypesEnum> {\n if (!name || !language || !options.bodyParameters) {\n throw new Error('Invalid parameters for complete template');\n }\n\n const builder = new TemplateMessageBuilder()\n .setName(name)\n .setLanguage(language)\n .addBody(options.bodyParameters);\n\n if (options.headerParameters) {\n builder.addTextHeader(options.headerParameters);\n } else if (options.headerImage) {\n builder.addImageHeader(options.headerImage);\n }\n\n if (options.buttons) {\n builder.addButtons(options.buttons);\n }\n\n return builder.build();\n }\n\n /**\n * Create an order confirmation template\n */\n static createOrderConfirmationTemplate(\n language: string,\n customerName: string,\n orderNumber: string,\n amount: number,\n currencyCode: string,\n ): MessageTemplateObject<ComponentTypesEnum> {\n if (!language || !customerName || !orderNumber || typeof amount !== 'number' || !currencyCode) {\n throw new Error('Invalid parameters for order confirmation template');\n }\n\n return new TemplateMessageBuilder()\n .setName('order_confirmation')\n .setLanguage(language)\n .addBody([customerName, orderNumber, amount.toString(), currencyCode])\n .addButtons([\n { index: 0, type: 'quick_reply' },\n { index: 1, type: 'url', parameters: [orderNumber] },\n ])\n .build();\n }\n}\n","import type { TextObject } from '../types/text';\n\n/**\n * Builder class for creating text messages with a fluent API\n */\nexport class TextMessageBuilder {\n private textMessage: Partial<TextObject> = {};\n\n /**\n * Set the message body text\n */\n setBody(text: string): this {\n if (!text || typeof text !== 'string') {\n throw new Error('Message body must be a non-empty string');\n }\n this.textMessage.body = text;\n return this;\n }\n\n /**\n * Enable or disable URL preview\n */\n setPreviewUrl(enable: boolean = true): this {\n this.textMessage.preview_url = enable;\n return this;\n }\n\n /**\n * Build the final text object\n */\n build(): TextObject {\n if (!this.textMessage.body) {\n throw new Error('Message body is required');\n }\n\n return this.textMessage as TextObject;\n }\n\n /**\n * Reset the builder for reuse\n */\n reset(): this {\n this.textMessage = {};\n return this;\n }\n}\n\n/**\n * Factory class for common text message patterns\n */\nexport class TextMessageFactory {\n /**\n * Create a simple text message\n */\n static createSimpleText(body: string): TextObject {\n return new TextMessageBuilder().setBody(body).build();\n }\n\n /**\n * Create a text message with URL preview\n */\n static createTextWithPreview(body: string): TextObject {\n return new TextMessageBuilder().setBody(body).setPreviewUrl(true).build();\n }\n\n /**\n * Create a notification message\n */\n static createNotification(title: string, message: string): TextObject {\n return new TextMessageBuilder().setBody(`*${title}*\\n\\n${message}`).build();\n }\n}\n"],"mappings":"+KAaA,IAAa,EAAb,KAAmC,CAC/B,QAA0C,EAAE,CAK5C,QAAQ,EAAwB,CAC5B,GAAI,CAAC,GAAQ,OAAO,GAAS,SACzB,MAAU,MAAM,yBAAyB,CAG7C,MADA,MAAK,QAAQ,KAAO,EACb,KAMX,cAAc,EAAmB,EAAyB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ACyC,CACzC,GAAI,CAAC,GAAY,CAAC,GAAgB,CAAC,GAAe,OAAO,GAAW,UAAY,CAAC,EAC7E,MAAU,MAAM,qDAAqD,CAGzE,OAAO,IAAI,GAAwB,CAC9B,QAAQ,qBAAqB,CAC7B,YAAY,EAAS,CACrB,QAAQ,CAAC,EAAc,EAAa,EAAO,UAAU,CAAE,EAAa,CAAC,CACrE,WAAW,CACR,CAAE,MAAO,EAAG,KAAM,cAAe,CACjC,CAAE,MAAO,EAAG,KAAM,MAAO,WAAY,CAAC,EAAY,CAAE,CACvD,CAAC,CACD,OAAO,GC7WP,EAAb,KAAgC,CAC5B,YAA2C,EAAE,CAK7C,QAAQ,EAAoB,CACxB,GAAI,CAAC,GAAQ,OAAO,GAAS,SACzB,MAAU,MAAM,0CAA0C,CAG9D,MADA,MAAK,YAAY,KAAO,EACjB,KAMX,cAAc,EAAkB,GAAY,CAExC,MADA,MAAK,YAAY,YAAc,EACxB,KAMX,OAAoB,CAChB,GAAI,CAAC,KAAK,YAAY,KAClB,MAAU,MAAM,2BAA2B,CAG/C,OAAO,KAAK,YAMhB,OAAc,CAEV,MADA,MAAK,YAAc,EAAE,CACd,OAOF,EAAb,KAAgC,CAI5B,OAAO,iBAAiB,EAA0B,CAC9C,OAAO,IAAI,GAAoB,CAAC,QAAQ,EAAK,CAAC,OAAO,CAMzD,OAAO,sBAAsB,EAA0B,CACnD,OAAO,IAAI,GAAoB,CAAC,QAAQ,EAAK,CAAC,cAAc,GAAK,CAAC,OAAO,CAM7E,OAAO,mBAAmB,EAAe,EAA6B,CAClE,OAAO,IAAI,GAAoB,CAAC,QAAQ,IAAI,EAAM,OAAO,IAAU,CAAC,OAAO"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import "../../base-CfDkvT1x.js";
|
|
2
|
-
import { AudioMediaObject, ContactObject, DocumentMediaObject, ImageMediaObject, InteractiveObject, LocationObject, MessageRequestParams, MessageTemplateObject, MessagesResponse, ReactionParams, StatusParams, StickerMediaObject, TextMessageParams, TextObject, VideoMediaObject } from "../../common-CVbsmD26.js";
|
|
3
|
-
import { MessagesApi } from "../../index-d7TLqtYh.js";
|
|
4
|
-
export { AudioMediaObject, ContactObject, DocumentMediaObject, ImageMediaObject, InteractiveObject, LocationObject, MessagesApi as MessageApi, MessagesApi as default, MessageRequestParams, MessageTemplateObject, MessagesResponse, ReactionParams, StatusParams, StickerMediaObject, TextMessageParams, TextObject, VideoMediaObject };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import{MessagesApi as e,messages_default as t}from"../../messages-h5-NW8QO.js";export{e as MessageApi,t as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import "../../base-CfDkvT1x.js";
|
|
2
|
-
import { AccountMode, CodeVerificationStatus, Cursors, HealthStatus, HealthStatusEntity, MessagingLimitTier, PhoneNumberApi, PhoneNumberClass, PhoneNumberResponse, PhoneNumbersResponse, PlatformType, QualityRating, QualityScore, RequestVerificationCodeRequest, Throughput, ThroughputLevel, TwoStepVerificationParams, VerifyCodeRequest } from "../../index-_-06JPan.js";
|
|
3
|
-
export { AccountMode, CodeVerificationStatus, Cursors, HealthStatus, HealthStatusEntity, MessagingLimitTier, PhoneNumberApi, PhoneNumberApi as default, PhoneNumberClass, PhoneNumberResponse, PhoneNumbersResponse, PlatformType, QualityRating, QualityScore, RequestVerificationCodeRequest, Throughput, ThroughputLevel, TwoStepVerificationParams, VerifyCodeRequest };
|
package/dist/api/phone/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import"../../objectToQueryString-CAHI0qTs.js";import{PhoneNumberApi as e,phone_default as t}from"../../phone-CZyWLyWB.js";export{e as PhoneNumberApi,t as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import "../../base-CfDkvT1x.js";
|
|
2
|
-
import { BusinessProfileApi, BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, CreateUploadSessionParams, GetUploadHandleParams, UpdateBusinessProfileRequest, UploadBusinessProfileResponse, UploadHandle, UploadMediaParams, UploadSession, UploadSessionResponse } from "../../index-3KglHVAg.js";
|
|
3
|
-
export { BusinessProfileApi, BusinessProfileApi as default, BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, CreateUploadSessionParams, GetUploadHandleParams, UpdateBusinessProfileRequest, UploadBusinessProfileResponse, UploadHandle, UploadMediaParams, UploadSession, UploadSessionResponse };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import"../../objectToQueryString-CAHI0qTs.js";import"../../buildFieldsQueryString-Cr-jz3p0.js";import{BusinessProfileApi as e,profile_default as t}from"../../profile-Bb7GDP0n.js";export{e as BusinessProfileApi,t as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import "../../base-CfDkvT1x.js";
|
|
2
|
-
import { CreateQrCodeRequest, QrCodeApi, QrCodeClass, QrCodeResponse, QrCodesResponse, UpdateQrCodeRequest } from "../../index-BNeg6hHx.js";
|
|
3
|
-
export { CreateQrCodeRequest, QrCodeApi, QrCodeApi as default, QrCodeClass, QrCodeResponse, QrCodesResponse, UpdateQrCodeRequest };
|
package/dist/api/qrCode/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import{QrCodeApi as e,qrCode_default as t}from"../../qrCode-CeZEtX9J.js";export{e as QrCodeApi,t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import{RegistrationApi as e,registration_default as t}from"../../registration-BkjhC3xw.js";export{e as RegistrationApi,t as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import "../../base-CfDkvT1x.js";
|
|
2
|
-
import { AuthenticationTemplateOptions, BodyOptions, ButtonOptions, CarouselCard, CarouselOptions, CatalogButton, CatalogTemplateOptions, ComponentTypes, CopyCodeButton, CouponTemplateOptions, CurrencyParameter, DateTimeParameter, FlowButton, FooterOptions, HeaderOptions, LimitedTimeOfferOptions, LimitedTimeOfferTemplateOptions, LocationParameter, MPMButton, MPMTemplateOptions, MediaCardCarouselTemplateOptions, MediaCarouselCard, MediaParameter, OTPButton, OTPTemplateOptions, PhoneNumberButton, ProductCardCarouselTemplateOptions, ProductCarouselCard, ProductParameter, ProductSection, QuickReplyButton, SPMButton, SPMTemplateOptions, TemplateApi, TemplateBody, TemplateButton, TemplateButtons, TemplateCarousel, TemplateClass, TemplateDeleteParams, TemplateFooter, TemplateFormat, TemplateGetParams, TemplateHeader, TemplateHeaderExample, TemplateLimitedTimeOffer, TemplateOptions, TemplateParameter, TemplateRequestBody, TemplateResponse, TextParameter, URLButton, createAuthenticationTemplate, createCatalogTemplate, createCouponTemplate, createLimitedTimeOfferTemplate, createMPMTemplate, createMediaCardCarouselTemplate, createOTPTemplate, createProductCardCarouselTemplate, createSPMTemplate, createTemplate } from "../../index-CwujtcvH.js";
|
|
3
|
-
export { AuthenticationTemplateOptions, BodyOptions, ButtonOptions, CarouselCard, CarouselOptions, CatalogButton, CatalogTemplateOptions, ComponentTypes, CopyCodeButton, CouponTemplateOptions, CurrencyParameter, DateTimeParameter, FlowButton, FooterOptions, HeaderOptions, LimitedTimeOfferOptions, LimitedTimeOfferTemplateOptions, LocationParameter, MPMButton, MPMTemplateOptions, MediaCardCarouselTemplateOptions, MediaCarouselCard, MediaParameter, OTPButton, OTPTemplateOptions, PhoneNumberButton, ProductCardCarouselTemplateOptions, ProductCarouselCard, ProductParameter, ProductSection, QuickReplyButton, SPMButton, SPMTemplateOptions, TemplateApi, TemplateBody, TemplateButton, TemplateButtons, TemplateCarousel, TemplateClass, TemplateDeleteParams, TemplateFooter, TemplateFormat, TemplateGetParams, TemplateHeader, TemplateHeaderExample, TemplateLimitedTimeOffer, TemplateOptions, TemplateParameter, TemplateRequestBody, TemplateResponse, TextParameter, URLButton, createAuthenticationTemplate, createCatalogTemplate, createCouponTemplate, createLimitedTimeOfferTemplate, createMPMTemplate, createMediaCardCarouselTemplate, createOTPTemplate, createProductCardCarouselTemplate, createSPMTemplate, createTemplate, TemplateApi as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import"../../objectToQueryString-CAHI0qTs.js";import{TemplateApi as e,createAuthenticationTemplate as t,createCatalogTemplate as n,createCouponTemplate as r,createLimitedTimeOfferTemplate as i,createMPMTemplate as a,createMediaCardCarouselTemplate as o,createOTPTemplate as s,createProductCardCarouselTemplate as c,createSPMTemplate as l,createTemplate as u}from"../../template-Bgy-BCXJ.js";export{e as TemplateApi,t as createAuthenticationTemplate,n as createCatalogTemplate,r as createCouponTemplate,i as createLimitedTimeOfferTemplate,a as createMPMTemplate,o as createMediaCardCarouselTemplate,s as createOTPTemplate,c as createProductCardCarouselTemplate,l as createSPMTemplate,u as createTemplate,e as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import "../../base-CfDkvT1x.js";
|
|
2
|
-
import { TwoStepVerificationApi, TwoStepVerificationClass, TwoStepVerificationRequest } from "../../index-BiTq23oi.js";
|
|
3
|
-
export { TwoStepVerificationApi, TwoStepVerificationApi as default, TwoStepVerificationClass, TwoStepVerificationRequest };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import{TwoStepVerificationApi as e,twoStepVerification_default as t}from"../../twoStepVerification-DYlYF_P5.js";export{e as TwoStepVerificationApi,t as default};
|
package/dist/api/waba/index.d.ts
DELETED
package/dist/api/waba/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import"../../buildFieldsQueryString-Cr-jz3p0.js";import{WabaApi as e,waba_default as t}from"../../waba-SF2W3z2U.js";export{e as WabaApi,t as default};
|
package/dist/api-8hRAOyaL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-CfDkvT1x.d.ts","names":[],"sources":["../src/types/enums.ts","../src/types/config.ts","../src/types/request.ts","../src/types/base.ts"],"sourcesContent":[],"mappings":";;;aAAY,YAAA;;;;;aAMA,kBAAA;;;;;aAMA,eAAA;;;;;;aAOA,gBAAA;;;;;;;;;;;;;;EAnBA,MAAA,GAAA,QAAY;EAMZ,OAAA,GAAA,SAAA;EAMA,QAAA,GAAA,UAAe;EAOf,GAAA,GAAA,GAAA;AAoBZ;AAoBY,aApBA,mBAAA;EA+BA,MAAA,GAAA,QAAA;EAQA,UAAA,GAAA,aAAW;EAYX,QAAA,GAAA,UAAkB;EAOlB,QAAA,GAAA,WAAc;EAkBd,QAAA,GAAA,UAAA;EAMA,gBAAU,GAAA,oBAAA;EAMV,KAAA,GAAA,OAAA;EAKA,gBAAA,GAAA,oBAAqB;EAIrB,QAAA,GAAA,UAAA;EAKA,WAAA,GAAA,cAAsB;EAWtB,OAAA,GAAA,SAAA;EAQA,OAAA,GAAA,SAAgB;EAchB,IAAA,GAAA,MAAA;EAKA,UAAA,GAAA,aAAuB;EAKvB,KAAA,GAAA,OAAA;EAKA,kBAAa,GAAA,qBAAA;EA0Eb,mBAAA,GAAiB,sBAAA;AAiT7B;AA8BY,aA3hBA,oBAAA;;;;ECzDA,WAAA,GAAA,cAAc;EAiBd,MAAA,GAAA,SAAc;EAAA,eAAA,GAAA,0BAAA;gBAIrB,GAAA,iBAAe;MAKf,GAAA,MAAA;;AAUA,aDgCO,kBAAA;OC5BP,GAAA,CAAA;QAKA,GAAA,CAAA;OAKA,GAAA,CAAA;QAKA,GAAA,CAAA;OAKA,GAAA,CAAA;;AAUA,aDMO,WAAA;SCDP,GAAA,SAAe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AA,CAAA,CAAA,CAAA,MAAmB,EE3Df,eF2De,EAAA,QAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,QAAA,EExDb,QFwDa,EAAA,iBAAA,CAAA,EEvDH,MFuDG,CAAA,MAAA,EAAA,MAAA,CAAA,CAAA,EEtDxB,OFsDwB,CEtDhB,CFsDgB,CAAA;EAKnB,kBAAA,CAAA,CAAA,CAAA,CAAA,MAAsB,EExDlB,eFwDkB,EAAA,QAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,QAAA,EErDhB,MFqDgB,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,iBAAA,CAAA,EEpDN,MFoDM,CAAA,MAAA,EAAA,MAAA,CAAA,CAAA,EEnD3B,OFmD2B,CEnDnB,CFmDmB,CAAA;AAWlC;;;cGtJqB,SAAA;sBACG;;cAMX,OAAA,YAAmB;oBACV;oBACA;sBAEE,wBAAwB;gCAKd,iEAAiE,QAAQ;oCAIrE,iEAAiE,QAAQ;0CAK/F,iEAIT,QAAQ"}
|
package/dist/base-D-cXu_lA.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=class{config;client;constructor(e,t){this.config=e,this.client=t}sendJson(e,t,n,r){return this.client.getJson(e,t,n,r)}sendFormData(e,t,n,r){return this.client.sendFormData(e,t,n,r)}sendUrlEncodedForm(e,t,n,r){return this.client.sendUrlEncodedForm(e,t,n,r)}};export{e as BaseAPI};
|
|
2
|
-
//# sourceMappingURL=base-D-cXu_lA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-D-cXu_lA.js","names":[],"sources":["../src/types/base.ts"],"sourcesContent":["import type { WabaConfigType } from './config';\n\nexport declare class BaseClass {\n constructor(config: WabaConfigType);\n}\n\nimport { HttpMethodsEnum } from './enums';\nimport type { RequesterClass } from './request';\n\nexport class BaseAPI implements BaseClass {\n protected config: WabaConfigType;\n protected client: RequesterClass;\n\n constructor(config: WabaConfigType, client: RequesterClass) {\n this.config = config;\n this.client = client;\n }\n\n protected sendJson<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: any): Promise<T> {\n return this.client.getJson<T>(method, endpoint, timeout, body);\n }\n\n protected sendFormData<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: any): Promise<T> {\n return this.client.sendFormData<T>(method, endpoint, timeout, body);\n }\n\n protected sendUrlEncodedForm<T>(\n method: HttpMethodsEnum,\n endpoint: string,\n timeout: number,\n body?: any,\n ): Promise<T> {\n return this.client.sendUrlEncodedForm<T>(method, endpoint, timeout, body);\n }\n}\n"],"mappings":"AASA,IAAa,EAAb,KAA0C,CACtC,OACA,OAEA,YAAY,EAAwB,EAAwB,CACxD,KAAK,OAAS,EACd,KAAK,OAAS,EAGlB,SAAsB,EAAyB,EAAkB,EAAiB,EAAwB,CACtG,OAAO,KAAK,OAAO,QAAW,EAAQ,EAAU,EAAS,EAAK,CAGlE,aAA0B,EAAyB,EAAkB,EAAiB,EAAwB,CAC1G,OAAO,KAAK,OAAO,aAAgB,EAAQ,EAAU,EAAS,EAAK,CAGvE,mBACI,EACA,EACA,EACA,EACU,CACV,OAAO,KAAK,OAAO,mBAAsB,EAAQ,EAAU,EAAS,EAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildFieldsQueryString-Cr-jz3p0.js","names":[],"sources":["../src/utils/buildFieldsQueryString.ts"],"sourcesContent":["export function buildFieldsQueryString(fields?: string[] | string): string {\n if (!fields) return '';\n\n let fieldParams = '';\n\n if (Array.isArray(fields)) {\n fieldParams = fields.join(',');\n } else if (typeof fields === 'string') {\n fieldParams = fields;\n } else {\n fieldParams = Object.entries(fields)\n .filter(([_, value]) => value)\n .map(([key]) => key)\n .join(',');\n }\n\n return fieldParams ? `?fields=${fieldParams}` : '';\n}\n"],"mappings":"AAAA,SAAgB,EAAuB,EAAoC,CACvE,GAAI,CAAC,EAAQ,MAAO,GAEpB,IAAI,EAAc,GAalB,MAXA,CAKI,EALA,MAAM,QAAQ,EAAO,CACP,EAAO,KAAK,IAAI,CACvB,OAAO,GAAW,SACX,EAEA,OAAO,QAAQ,EAAO,CAC/B,QAAQ,CAAC,EAAG,KAAW,EAAM,CAC7B,KAAK,CAAC,KAAS,EAAI,CACnB,KAAK,IAAI,CAGX,EAAc,WAAW,IAAgB"}
|
package/dist/chunk-CTAAG5j7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=t=>{let n={};for(var r in t)e(n,r,{get:t[r],enumerable:!0});return n};export{t as __export};
|
package/dist/common-C6FXBDm7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e=function(e){return e.Draft=`DRAFT`,e.Published=`PUBLISHED`,e.Throttled=`THROTTLED`,e.Blocked=`BLOCKED`,e.Deprecated=`DEPRECATED`,e}({}),t=function(e){return e.SignUp=`SIGN_UP`,e.SignIn=`SIGN_IN`,e.AppointmentBooking=`APPOINTMENT_BOOKING`,e.LeadGeneration=`LEAD_GENERATION`,e.ContactUs=`CONTACT_US`,e.CustomerSupport=`CUSTOMER_SUPPORT`,e.Survey=`SURVEY`,e.Other=`OTHER`,e}({}),n=function(e){return e.INIT=`INIT`,e.BACK=`BACK`,e.DATA_EXCHANGE=`data_exchange`,e}({}),r=function(e){return e.Ping=`ping`,e.Change=`data_exchange`,e.Error=`error`,e.All=`*`,e}({});export{n as FlowActionEnum,t as FlowCategoryEnum,e as FlowStatusEnum,r as FlowTypeEnum};
|
|
2
|
-
//# sourceMappingURL=common-C6FXBDm7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common-C6FXBDm7.js","names":[],"sources":["../src/api/flow/types/common.ts"],"sourcesContent":["import { ResponseSuccess } from '../../../types';\nimport { IncomingHttpHeaders, IncomingMessage } from 'http';\n\n/**\n * Enum for Flow Status\n */\nexport enum FlowStatusEnum {\n Draft = 'DRAFT',\n Published = 'PUBLISHED',\n Throttled = 'THROTTLED',\n Blocked = 'BLOCKED',\n Deprecated = 'DEPRECATED',\n}\n\n/**\n * Enum for Flow Categories\n */\nexport enum FlowCategoryEnum {\n SignUp = 'SIGN_UP',\n SignIn = 'SIGN_IN',\n AppointmentBooking = 'APPOINTMENT_BOOKING',\n LeadGeneration = 'LEAD_GENERATION',\n ContactUs = 'CONTACT_US',\n CustomerSupport = 'CUSTOMER_SUPPORT',\n Survey = 'SURVEY',\n Other = 'OTHER',\n}\n\nexport enum FlowActionEnum {\n INIT = 'INIT',\n BACK = 'BACK',\n DATA_EXCHANGE = 'data_exchange',\n}\n\n/**\n * Enum for Flow Types in webhook handlers\n * Used to register handlers for specific flow events\n */\nexport enum FlowTypeEnum {\n /** Health check/ping requests */\n Ping = 'ping',\n /** Data exchange requests */\n Change = 'data_exchange',\n /** Error notification requests */\n Error = 'error',\n /** Match all flow action types */\n All = '*',\n}\n\nexport type FlowType = (typeof FlowTypeEnum)[keyof typeof FlowTypeEnum];\n\n/**\n * Flow Validation Error Pointer\n */\nexport interface FlowValidationErrorPointer {\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n path: string;\n}\n\n/**\n * Flow Validation Error\n */\nexport interface FlowValidationError {\n error: string;\n error_type: string;\n message: string;\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n pointers: FlowValidationErrorPointer[];\n}\n\n/**\n * Flow Item\n */\nexport interface Flow {\n id: string;\n name: string;\n status: FlowStatusEnum;\n categories: FlowCategoryEnum[];\n validation_errors: FlowValidationError[];\n}\n\n/**\n * Pagination Cursors\n */\nexport interface PaginationCursors {\n before: string;\n after: string;\n}\n\n/**\n * Pagination Object\n */\nexport interface Pagination {\n cursors: PaginationCursors;\n}\n\n/**\n * Flows List Response\n */\nexport interface FlowsListResponse {\n data: Flow[];\n paging: Pagination;\n}\n\n/**\n * Flow Asset\n */\nexport interface FlowAsset {\n name: string;\n asset_type: string;\n download_url: string;\n}\n\n/**\n * Flow Assets Response\n */\nexport interface FlowAssetsResponse {\n data: FlowAsset[];\n paging: Pagination;\n}\n\n/**\n * Flow Preview\n */\nexport interface FlowPreview {\n preview_url: string;\n expires_at: string;\n}\n\n/**\n * Flow Preview Response\n */\nexport interface FlowPreviewResponse {\n preview: FlowPreview;\n id: string;\n}\n\n/**\n * Flow Migration Result\n */\nexport interface FlowMigrationResult {\n source_name: string;\n source_id: string;\n migrated_id: string;\n}\n\n/**\n * Flow Migration Failure\n */\nexport interface FlowMigrationFailure {\n source_name: string;\n error_code: string;\n error_message: string;\n}\n\n/**\n * Create Flow Response\n */\nexport interface CreateFlowResponse {\n id: string;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Update Flow Response\n */\nexport interface UpdateFlowResponse {\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Flow Migration Response\n */\nexport interface FlowMigrationResponse {\n migrated_flows: FlowMigrationResult[];\n failed_flows: FlowMigrationFailure[];\n}\n\n/**\n * Validate Flow JSON Response\n */\nexport interface ValidateFlowJsonResponse {\n valid: boolean;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * WhatsApp Flow Endpoint - Encrypted Request Payload\n * Represents the raw encrypted data received from WhatsApp\n */\nexport interface FlowEncryptedRequestPayload {\n encrypted_aes_key: string;\n encrypted_flow_data: string;\n initial_vector: string;\n}\n\n/**\n * WhatsApp Flow Endpoint - Decrypted Request Response\n * Represents the successfully decrypted data and encryption keys\n */\nexport interface FlowDecryptedRequestResponse {\n decryptedBody: any;\n aesKeyBuffer: Buffer;\n initialVectorBuffer: Buffer;\n}\n\n/**\n * WhatsApp Flow Endpoint - HTTP Request with Body\n * Represents an HTTP request with the encrypted payload\n */\nexport interface FlowHttpRequest extends IncomingMessage {\n body: FlowEncryptedRequestPayload;\n headers: IncomingHttpHeaders;\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Request\n * Represents the structure of a health check request\n */\nexport interface FlowHealthCheckRequest {\n action: 'ping';\n version: '3.0';\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Response\n * The expected response structure for health check requests\n */\nexport interface FlowHealthCheckResponse {\n data: {\n status: 'active';\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Request\n * Represents the structure of a data exchange request\n */\nexport interface FlowDataExchangeRequest {\n version: '3.0';\n action: FlowActionEnum;\n screen: string;\n flow_token: string;\n data?: Record<string, any> & { error_message?: string };\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Response\n * The expected response structure for data exchange requests\n */\nexport interface FlowDataExchangeResponse {\n screen?: string;\n data?: Record<string, any | { error_message?: string }>;\n}\n\n/**\n * WhatsApp Flow Endpoint - Success Screen Response\n * The expected response structure for success screen requests\n */\nexport interface FlowSuccessScreenResponse {\n screen: 'SUCCESS';\n data: {\n extension_message_response?: {\n params?: {\n flow_token: string;\n [key: string]: string;\n };\n };\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Request\n * Represents the structure of an error notification request\n */\nexport interface FlowErrorNotificationRequest {\n version: '3.0';\n action: Exclude<FlowActionEnum, FlowActionEnum.BACK>;\n screen: string;\n flow_token: string;\n data: {\n error: string;\n error_message: string;\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Response\n * The expected response structure for error notification requests\n */\nexport interface FlowErrorNotificationResponse {\n acknowledged: boolean;\n}\n\n/**\n * WhatsApp Flow Endpoint - Comprehensive Request Object\n * A combined type that includes all possible fields from different request types\n * with all fields being optional for flexibility\n */\nexport interface FlowEndpointRequest {\n // Common fields\n version?: '3.0';\n action?: 'ping' | FlowActionEnum;\n\n screen?: string;\n flow_token?: string;\n\n data?: Record<string, any> & {\n error_key?: string;\n error_message?: string;\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Response\n * Union type for all possible response types from a Flow endpoint\n */\nexport type FlowEndpointResponse =\n | FlowHealthCheckResponse\n | FlowDataExchangeResponse\n | FlowErrorNotificationResponse\n | FlowSuccessScreenResponse;\n\nexport interface FlowClass {\n /**\n * List Flows\n *\n * @param wabaId - The WABA ID\n * @returns Promise with the list of flows\n */\n listFlows(wabaId: string): Promise<FlowsListResponse>;\n\n /**\n * Create Flow\n *\n * @param wabaId - The WABA ID\n * @param data - The flow data including name, categories, endpoint_uri, and optional clone_flow_id\n * @returns Promise with the created flow ID\n */\n createFlow(\n wabaId: string,\n data: {\n name: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n clone_flow_id?: string;\n flow_json?: string;\n publish?: boolean;\n },\n ): Promise<CreateFlowResponse>;\n\n /**\n * Get Flow\n *\n * @param flowId - The flow ID\n * @param fields - Optional fields to return\n * @param dateFormat - Optional date format\n * @returns Promise with the flow details\n */\n getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<Flow | FlowPreviewResponse>;\n\n /**\n * Update Flow Metadata\n *\n * @param flowId - The flow ID\n * @param data - The flow metadata to update\n * @returns Promise with the success status\n */\n updateFlowMetadata(\n flowId: string,\n data: {\n name?: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n application_id?: string;\n },\n ): Promise<ResponseSuccess>;\n\n /**\n * Delete Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deleteFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * List Assets (Get Flow JSON URL)\n *\n * @param flowId - The flow ID\n * @returns Promise with the list of assets\n */\n listAssets(flowId: string): Promise<FlowAssetsResponse>;\n\n /**\n * Update Flow JSON\n *\n * @param flowId - The flow ID\n * @param data - The asset data including asset_type, file, and name\n * @returns Promise with the success status and validation errors\n */\n updateFlowJson(\n flowId: string,\n data: {\n file: Blob | Buffer | object;\n name?: string;\n },\n ): Promise<UpdateFlowResponse>;\n\n /**\n * Validate Flow JSON by attempting an update without publishing.\n * This is a convenience method; the API doesn't have a dedicated validation endpoint.\n *\n * @param flowId - The ID of the Flow (must exist, can be in DRAFT status).\n * @param flowJsonData - The Flow JSON content as a Buffer, JSON object, or Blob.\n * @returns Promise indicating if the JSON is valid and includes validation errors if any.\n */\n validateFlowJson(flowId: string, flowJsonData: Blob | Buffer | object): Promise<ValidateFlowJsonResponse>;\n\n /**\n * Publish Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n publishFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Deprecate Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deprecateFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Migrate Flows\n *\n * @param wabaId - The destination WABA ID\n * @param data - The migration data including source_waba_id and optional source_flow_names\n * @returns Promise with migration results\n */\n migrateFlows(\n wabaId: string,\n data: {\n source_waba_id: string;\n source_flow_names?: string[];\n },\n ): Promise<FlowMigrationResponse>;\n}\n"],"mappings":"AAMA,IAAY,EAAA,SAAA,EAAL,OACH,GAAA,MAAA,QACA,EAAA,UAAA,YACA,EAAA,UAAA,YACA,EAAA,QAAA,UACA,EAAA,WAAA,oBAMQ,EAAA,SAAA,EAAL,OACH,GAAA,OAAA,UACA,EAAA,OAAA,UACA,EAAA,mBAAA,sBACA,EAAA,eAAA,kBACA,EAAA,UAAA,aACA,EAAA,gBAAA,mBACA,EAAA,OAAA,SACA,EAAA,MAAA,eAGQ,EAAA,SAAA,EAAL,OACH,GAAA,KAAA,OACA,EAAA,KAAA,OACA,EAAA,cAAA,uBAOQ,EAAA,SAAA,EAAL,OAEH,GAAA,KAAA,OAEA,EAAA,OAAA,gBAEA,EAAA,MAAA,QAEA,EAAA,IAAA"}
|