import { AudioMediaTypesEnum, BusinessVerticalEnum, ButtonPositionEnum, CategoryEnum, ComponentTypesEnum, ConversationTypesEnum, CurrencyCodesEnum, DataLocalizationRegionEnum, DocumentMediaTypesEnum, HttpMethodsEnum, ImageMediaTypesEnum, InteractiveTypesEnum, LanguagesEnum, MessageTypesEnum, ParametersTypesEnum, ReferralSourceTypesEnum, RequestCodeMethodsEnum, StatusEnum, StickerMediaTypesEnum, SubTypeEnum, SystemChangeTypesEnum, TemplateStatusEnum, VideoMediaTypesEnum, WabaConfigEnum, WebhookTypesEnum } from "./enums.js";
import { IncomingHttpHeaders, IncomingMessage } from "node:http";

//#region src/types/request.d.ts
type GeneralRequestBody = Record<string, unknown>;
type UrlEncodedFormBody = Record<string, string | string[]>;
interface GeneralHeaderInterface {
  /**
   * Authorization token. This is required for all HTTP requests made to the graph API.
   * @default 'Bearer '
   */
  Authorization: string;
  /**
   * Content type of the message being sent. This is required for all HTTP requests made to the graph API.
   * @default 'application/json'
   */
  'Content-Type': string;
  /**
   * User agent field sent in all requests. This is used to gather SDK usage metrics and help
   * better triage support requests.
   * @default `WA_SDK/${ SDK_version } (Node.js ${ process.version })`
   */
  'User-Agent': string;
}
interface RequesterResponseInterface<T> {
  json: () => Promise<T>;
}
interface ResponseSuccess {
  success: boolean;
}
interface ResponseData<T> {
  data: T;
}
interface ResponsePagination<T> {
  data: T[];
  paging: Paging;
}
interface Paging {
  cursors: {
    before: string;
    after: string;
  };
  next: string;
}
/**
 * Common error detail structure used in Meta API responses
 * Used for individual item errors in bulk operations
 */
interface MetaErrorDetail {
  message: string;
  code: string;
  error_data?: {
    details: string;
  };
}
declare class RequesterClass {
  constructor(apiVersion: string, phoneNumberId: number, accessToken: string, businessAcctId: string, userAgent: string);
  sendRequest: (method: HttpMethodsEnum, path: string, timeout: number, body?: GeneralRequestBody, contentType?: string, additionalHeaders?: Record<string, string>) => Promise<RequesterResponseInterface<unknown>>;
  getJson<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: GeneralRequestBody, additionalHeaders?: Record<string, string>): Promise<T>;
  sendFormData<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, formData: FormData, additionalHeaders?: Record<string, string>): Promise<T>;
  sendUrlEncodedForm<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, formData: UrlEncodedFormBody, additionalHeaders?: Record<string, string>): Promise<T>;
  updateTimeout(timeout: number): void;
  updateAccessToken(accessToken: string): void;
}
//#endregion
//#region src/api/blockUsers/types/blockUsers.d.ts
/**
 * Blocked user information in response
 */
type BlockedUserInfo = {
  input: string;
  wa_id: string;
};
/**
 * Failed user information with error details
 * Uses common MetaErrorDetail type for consistency across APIs
 */
type FailedUserInfo = BlockedUserInfo & {
  errors?: MetaErrorDetail[];
};
/**
 * Response for block/unblock operations
 */
type BlockUsersResponse = {
  messaging_product: 'whatsapp';
  block_users: {
    added_users?: BlockedUserInfo[];
    failed_users?: FailedUserInfo[];
  };
};
/**
 * Pagination cursors for list operations
 */
type PagingCursors = {
  after?: string;
  before?: string;
};
/**
 * Pagination information
 */
type PagingInfo$1 = {
  cursors?: PagingCursors;
  previous?: string;
  next?: string;
};
/**
 * List blocked users response
 */
type ListBlockedUsersResponse = {
  data: Array<{
    block_users: BlockedUserInfo[];
  }>;
  paging?: PagingInfo$1;
};
/**
 * Query parameters for listing blocked users
 */
type ListBlockedUsersParams = {
  limit?: number;
  after?: string;
  before?: string;
};
/**
 * Block Users API Interface
 */
interface BlockUsersClass {
  /**
   * Block one or more WhatsApp users
   * @param users - Array of phone numbers or WhatsApp IDs to block
   * @returns Response with successfully blocked and failed users
   * @throws Error if users have not messaged in last 24 hours
   * @see https://developers.facebook.com/docs/whatsapp/cloud-api/block-users#block-users
   */
  block(users: string[]): Promise<BlockUsersResponse>;
  /**
   * Unblock one or more WhatsApp users
   * @param users - Array of phone numbers or WhatsApp IDs to unblock
   * @returns Response with successfully unblocked and failed users
   * @see https://developers.facebook.com/docs/whatsapp/cloud-api/block-users#unblock-users
   */
  unblock(users: string[]): Promise<BlockUsersResponse>;
  /**
   * Get list of blocked WhatsApp users with pagination
   * @param params - Optional pagination parameters
   * @returns List of blocked users with pagination info
   * @see https://developers.facebook.com/docs/whatsapp/cloud-api/block-users#get-list-of-blocked-numbers
   */
  listBlockedUsers(params?: ListBlockedUsersParams): Promise<ListBlockedUsersResponse>;
}
//#endregion
//#region src/api/calling/types/calling.d.ts
/**
 * Calling API Types
 * @see https://developers.facebook.com/documentation/business-messaging/whatsapp/calling/reference/
 */
type CallingStatus = 'ENABLED' | 'DISABLED';
type CallIconVisibility = 'DEFAULT' | 'DISABLE_ALL';
type CallbackPermissionStatus = 'ENABLED' | 'DISABLED';
type CallHoursStatus = 'ENABLED' | 'DISABLED';
type SipStatus = 'ENABLED' | 'DISABLED';
type CallHoursDay = 'MONDAY' | 'TUESDAY' | 'WEDNESDAY' | 'THURSDAY' | 'FRIDAY' | 'SATURDAY' | 'SUNDAY';
type WeeklyOperatingHours = {
  day_of_week: CallHoursDay;
  open_time: string;
  close_time: string;
};
type HolidaySchedule = {
  date: string;
  start_time: string;
  end_time: string;
};
type CallHours = {
  status: CallHoursStatus;
  timezone_id: string;
  weekly_operating_hours: WeeklyOperatingHours[];
  holiday_schedule?: HolidaySchedule[];
};
type SipServer = {
  hostname: string;
  port?: number;
  request_uri_user_params?: Record<string, string>;
  sip_user_password?: string;
};
type SipSettings = {
  status: SipStatus;
  servers?: SipServer[];
};
type CallingSettings = {
  status?: CallingStatus;
  call_icon_visibility?: CallIconVisibility;
  call_hours?: CallHours;
  callback_permission_status?: CallbackPermissionStatus;
  sip?: SipSettings;
};
type UpdateCallingSettingsRequest = {
  calling: CallingSettings;
};
type CallingSettingsResponse = {
  calling?: CallingSettings;
  [key: string]: unknown;
};
type CallPermission = {
  status: string;
  expiration_time?: number;
};
type CallPermissionLimit = {
  time_period: string;
  max_allowed: number;
  current_usage: number;
  limit_expiration_time?: number;
};
type CallPermissionAction = {
  action_name: string;
  can_perform_action: boolean;
  limits?: CallPermissionLimit[];
};
type CallPermissionsResponse = {
  messaging_product: 'whatsapp';
  permission: CallPermission;
  actions?: CallPermissionAction[];
};
type CallSdpType = 'offer' | 'answer';
type CallSession = {
  sdp_type: CallSdpType;
  sdp: string;
};
type CallAction = 'connect' | 'pre_accept' | 'accept' | 'reject' | 'terminate';
type InitiateCallRequest = {
  to: string;
  session: CallSession;
  biz_opaque_callback_data?: string;
};
type PreAcceptCallRequest = {
  call_id: string;
  session?: CallSession;
};
type AcceptCallRequest = {
  call_id: string;
  session?: CallSession;
  biz_opaque_callback_data?: string;
};
type RejectCallRequest = {
  call_id: string;
};
type TerminateCallRequest = {
  call_id: string;
};
type InitiateCallResponse = {
  messaging_product: 'whatsapp';
  calls: Array<{
    id: string;
  }>;
};
type CallActionResponse = {
  messaging_product: 'whatsapp';
  success: boolean;
};
interface CallingClass {
  updateCallingSettings(params: UpdateCallingSettingsRequest): Promise<ResponseSuccess>;
  getCallingSettings(params?: {
    fields?: string[] | string;
    include_sip_credentials?: boolean;
  }): Promise<CallingSettingsResponse>;
  getCallPermissions(params: {
    userWaId: string;
  }): Promise<CallPermissionsResponse>;
  initiateCall(params: InitiateCallRequest): Promise<InitiateCallResponse>;
  preAcceptCall(params: PreAcceptCallRequest): Promise<CallActionResponse>;
  acceptCall(params: AcceptCallRequest): Promise<CallActionResponse>;
  rejectCall(params: RejectCallRequest): Promise<CallActionResponse>;
  terminateCall(params: TerminateCallRequest): Promise<CallActionResponse>;
}
//#endregion
//#region src/api/commerce/types/commerce.d.ts
/**
 * Commerce Settings API Types
 * @see https://developers.facebook.com/documentation/business-messaging/whatsapp/catalogs/sell-products-and-services/set-commerce-settings/
 */
type CommerceSetting = {
  id: string;
  is_cart_enabled?: boolean;
  is_catalog_visible?: boolean;
};
type CommerceSettingsResponse = {
  data: CommerceSetting[];
};
type UpdateCommerceSettingsRequest = {
  is_cart_enabled?: boolean;
  is_catalog_visible?: boolean;
};
interface CommerceClass {
  getCommerceSettings(): Promise<CommerceSettingsResponse>;
  updateCommerceSettings(params: UpdateCommerceSettingsRequest): Promise<ResponseSuccess>;
}
//#endregion
//#region src/api/encryption/types/publicKey.d.ts
type EncryptionPublicKeyResponse = ResponseData<{
  business_public_key: string;
  business_public_key_signature_status: 'VALID' | 'MISMATCH';
}>;
//#endregion
//#region src/api/groups/types/groups.d.ts
/**
 * Groups API Types
 * @see https://developers.facebook.com/documentation/business-messaging/whatsapp/groups/reference/
 */
type GroupJoinApprovalMode = 'approval_required' | 'auto_approve';
type GroupCreateRequest = {
  subject: string;
  description?: string;
  join_approval_mode?: GroupJoinApprovalMode;
};
type GroupCreateResponse = {
  messaging_product: 'whatsapp';
  id: string;
  invite_link?: string;
};
type GroupInfoField = 'join_approval_mode' | 'subject' | 'description' | 'suspended' | 'creation_timestamp' | 'participants' | 'total_participant_count';
type GroupInfoFieldsParam = GroupInfoField[] | string;
type GroupParticipant = {
  wa_id: string;
};
type GroupInfoResponse = {
  messaging_product: 'whatsapp';
  id: string;
  subject?: string;
  description?: string;
  suspended?: boolean;
  creation_timestamp?: number;
  participants?: GroupParticipant[];
  total_participant_count?: number;
  join_approval_mode?: GroupJoinApprovalMode;
};
type GroupInviteLinkResponse = {
  messaging_product: 'whatsapp';
  invite_link: string;
};
type GroupJoinRequest = {
  join_request_id: string;
  wa_id: string;
  creation_timestamp: number;
};
type GroupJoinRequestError = {
  code: number;
  message: string;
  title?: string;
  error_data?: {
    details?: string;
  };
};
type GroupJoinRequestFailure = {
  join_request_id: string;
  errors: GroupJoinRequestError[];
};
type GroupJoinRequestsResponse = {
  data: GroupJoinRequest[];
  paging?: PagingInfo;
};
type GroupJoinRequestsActionResponse = {
  messaging_product: 'whatsapp';
  approved_join_requests?: string[];
  rejected_join_requests?: string[];
  failed_join_requests?: GroupJoinRequestFailure[];
  errors?: GroupJoinRequestError[];
};
type GroupSummary = {
  id: string;
  subject: string;
  created_at: number;
};
type GroupListResponse = {
  data: {
    groups: GroupSummary[];
  };
  paging?: PagingInfo;
};
type GroupListParams = {
  limit?: number;
  after?: string;
  before?: string;
};
type UpdateGroupSettingsRequest = {
  subject?: string;
  description?: string;
  profilePictureFile?: Blob | Buffer;
};
type GroupSettingsResponse = ResponseSuccess;
interface GroupsClass {
  createGroup(params: GroupCreateRequest): Promise<GroupCreateResponse>;
  deleteGroup(groupId: string): Promise<ResponseSuccess>;
  getGroupInfo(groupId: string, fields?: GroupInfoFieldsParam): Promise<GroupInfoResponse>;
  getActiveGroups(params?: GroupListParams): Promise<GroupListResponse>;
  getGroupInviteLink(groupId: string): Promise<GroupInviteLinkResponse>;
  createGroupInviteLink(groupId: string): Promise<GroupInviteLinkResponse>;
  resetGroupInviteLink(groupId: string): Promise<GroupInviteLinkResponse>;
  deleteGroupInviteLink(groupId: string): Promise<ResponseSuccess>;
  getJoinRequests(groupId: string): Promise<GroupJoinRequestsResponse>;
  approveJoinRequests(groupId: string, joinRequestIds: string[]): Promise<GroupJoinRequestsActionResponse>;
  rejectJoinRequests(groupId: string, joinRequestIds: string[]): Promise<GroupJoinRequestsActionResponse>;
  addParticipants(groupId: string, participants: string[]): Promise<ResponseSuccess>;
  removeParticipants(groupId: string, participants: string[]): Promise<ResponseSuccess>;
  updateGroupSettings(groupId: string, params: UpdateGroupSettingsRequest): Promise<GroupSettingsResponse>;
}
type PagingInfo = {
  cursors?: {
    before?: string;
    after?: string;
  };
  previous?: string;
  next?: string;
};
//#endregion
//#region src/api/messages/types/text.d.ts
type TextObject = {
  body: string;
  preview_url?: boolean;
};
interface TextMessageParams extends MessageRequestParams<TextObject | string> {
  previewUrl?: boolean;
}
//#endregion
//#region src/api/messages/types/template.d.ts
type LanguageObject = {
  policy: 'deterministic';
  code: LanguagesEnum | (string & {});
};
type ParametersObject<T extends ParametersTypesEnum> = {
  type: T;
};
type SimpleTextObject$1 = {
  text: string;
};
type TextParametersObject = ParametersObject<ParametersTypesEnum.Text> & SimpleTextObject$1;
type CouponCodeParametersObject = ParametersObject<ParametersTypesEnum.CouponCode> & {
  coupon_code: string;
};
type CurrencyObject = {
  fallback_value: string;
  code: CurrencyCodesEnum;
  amount_1000: number;
};
type CurrencyParametersObject = ParametersObject<ParametersTypesEnum.Currency> & {
  currency: CurrencyObject;
};
type DateTimeObject = {
  fallback_value: string;
};
type DateTimeParametersObject = ParametersObject<ParametersTypesEnum.Currency> & {
  date_time: DateTimeObject;
};
type DocumentMediaObject$2 = {
  id?: string;
  link?: string;
  caption?: string;
  filename?: string;
};
type ImageMediaObject$2 = {
  id?: string;
  link?: string;
  caption?: string;
};
type VideoMediaObject$2 = {
  id?: string;
  link?: string;
  caption?: string;
};
type DocumentParametersObject = ParametersObject<ParametersTypesEnum.Document> & DocumentMediaObject$2;
type ImageParametersObject = ParametersObject<ParametersTypesEnum.Image> & ImageMediaObject$2;
type VideoParametersObject = ParametersObject<ParametersTypesEnum.Video> & VideoMediaObject$2;
type ComponentObject<T extends ComponentTypesEnum> = {
  type: T;
  parameters: (CurrencyParametersObject | DateTimeParametersObject | DocumentParametersObject | ImageParametersObject | TextParametersObject | VideoParametersObject | CouponCodeParametersObject)[];
};
type ButtonComponentObject = ComponentObject<ComponentTypesEnum.Button> & {
  parameters?: (TextParametersObject | PayloadParametersObject)[];
  sub_type: SubTypeEnum;
  index: ButtonPositionEnum;
};
type PayloadParametersObject = ParametersObject<ParametersTypesEnum.Payload> & {
  payload: string;
};
type MessageTemplateObject<T extends ComponentTypesEnum> = {
  name: string;
  language: LanguageObject;
  components?: (ComponentObject<T> | ButtonComponentObject)[];
};
//#endregion
//#region src/api/messages/types/media.d.ts
type MetaMediaObject = {
  id: string;
  link?: never;
};
type HostedMediaObject = {
  id?: never;
  link: string;
};
type AudioMediaObject = MetaMediaObject | HostedMediaObject;
type MetaDocumentMediaObject = MetaMediaObject & {
  caption?: string;
  filename?: string;
};
type HostedDocumentMediaObject = HostedMediaObject & {
  caption?: string;
  filename?: string;
};
type DocumentMediaObject = MetaDocumentMediaObject | HostedDocumentMediaObject;
type MetaImageMediaObject = MetaMediaObject & {
  caption?: string;
};
type HostedImageMediaObject = HostedMediaObject & {
  caption?: string;
};
type ImageMediaObject = MetaImageMediaObject | HostedImageMediaObject;
type MetaVideoMediaObject = MetaMediaObject & {
  caption?: string;
};
type HostedVideoMediaObject = HostedMediaObject & {
  caption?: string;
};
type VideoMediaObject = MetaVideoMediaObject | HostedVideoMediaObject;
type StickerMediaObject = MetaMediaObject | HostedMediaObject;
//#endregion
//#region src/api/messages/types/contact.d.ts
type AddressesObject = {
  street?: string;
  city?: string;
  state?: string;
  zip?: string;
  country?: string;
  country_code?: string;
  type?: 'HOME' | 'WORK' | string;
};
type EmailObject = {
  email?: string;
  type?: 'HOME' | 'WORK' | string;
};
type NameObject = {
  formatted_name: string;
  first_name?: string;
  last_name?: string;
  middle_name?: string;
  suffix?: string;
  prefix?: string;
};
type OrgObject = {
  company?: string;
  department?: string;
  title?: string;
};
type PhoneObject = {
  phone?: string;
  type?: 'CELL' | 'MAIN' | 'IPHONE' | 'HOME' | 'WORK' | string;
  wa_id?: string;
};
type URLObject = {
  url?: string;
  type?: 'HOME' | 'WORK' | string;
};
type ContactObject = {
  addresses?: AddressesObject[];
  birthday?: `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
  emails?: EmailObject[];
  name: NameObject;
  org?: OrgObject;
  phones?: PhoneObject[];
  urls?: URLObject[];
};
//#endregion
//#region src/api/messages/types/location.d.ts
type LocationObject = {
  longitude: number;
  latitude: number;
  name?: string;
  address?: string;
};
//#endregion
//#region src/api/messages/types/interactive.d.ts
type DocumentMediaObject$1 = {
  id?: string;
  link?: string;
  caption?: string;
  filename?: string;
};
type ImageMediaObject$1 = {
  id?: string;
  link?: string;
  caption?: string;
};
type VideoMediaObject$1 = {
  id?: string;
  link?: string;
  caption?: string;
};
type ProductObject = {
  product_retailer_id: string;
};
type SimpleTextObject = {
  text: string;
};
type RowObject = {
  id: string;
  title: string;
  description?: string;
};
type MultiProductSectionObject = {
  product_items: ProductObject[];
  rows?: never;
  title?: string;
};
type ListSectionObject = {
  product_items?: never;
  rows: RowObject[];
  title?: string;
};
type SectionObject = MultiProductSectionObject | ListSectionObject;
type ButtonObject = {
  title: string;
  id: string;
};
type ReplyButtonObject = {
  type: 'reply';
  reply: ButtonObject;
};
type ActionObject = {
  button?: string;
  buttons?: ReplyButtonObject[];
  catalog_id?: string;
  product_retailer_id?: string;
  sections?: SectionObject[];
};
type HeaderObject = {
  type: 'document' | 'image' | 'text' | 'video';
  document?: DocumentMediaObject$1;
  image?: ImageMediaObject$1;
  text?: string;
  sub_text?: string;
  video?: VideoMediaObject$1;
};
type ButtonInteractiveObject = {
  type: InteractiveTypesEnum.Button | 'button';
  body: SimpleTextObject;
  footer?: SimpleTextObject;
  header?: HeaderObject;
  action: ActionObject;
};
type ListInteractiveObject = {
  type: InteractiveTypesEnum.List | 'list';
  body: SimpleTextObject;
  footer?: SimpleTextObject;
  header?: HeaderObject;
  action: ActionObject;
};
type ProductInteractiveObject = {
  type: InteractiveTypesEnum.Product | 'product';
  body?: SimpleTextObject;
  footer?: SimpleTextObject;
  header?: HeaderObject;
  action: ActionObject;
};
type ProductListInteractiveObject = {
  type: InteractiveTypesEnum.ProductList | 'product_list';
  body: SimpleTextObject;
  footer?: SimpleTextObject;
  header: HeaderObject;
  action: ActionObject;
};
type CatalogMessageParameters = {
  thumbnail_product_retailer_id: string;
};
type CatalogMessageActionObject = {
  name: 'catalog_message';
  parameters?: CatalogMessageParameters;
};
type CatalogMessageInteractiveObject = {
  type: InteractiveTypesEnum.CatalogMessage | 'catalog_message';
  body?: SimpleTextObject;
  footer?: SimpleTextObject;
  header?: HeaderObject;
  action: CatalogMessageActionObject;
};
type CallPermissionRequestActionObject = {
  name: 'call_permission_request';
};
type CallPermissionRequestInteractiveObject = {
  type: InteractiveTypesEnum.CallPermissionRequest | 'call_permission_request';
  body?: SimpleTextObject;
  footer?: SimpleTextObject;
  header?: HeaderObject;
  action: CallPermissionRequestActionObject;
};
type CtaUrlParameters = {
  display_text: string;
  url: string;
};
type CtaUrlActionObject = {
  name: 'cta_url';
  parameters: CtaUrlParameters;
};
type CtaUrlInteractiveObject = {
  type: InteractiveTypesEnum.CtaUrl | 'cta_url';
  body?: SimpleTextObject;
  footer?: SimpleTextObject;
  header?: HeaderObject;
  action: CtaUrlActionObject;
};
type LocationRequestActionObject = {
  name: 'send_location';
};
type LocationRequestInteractiveObject = {
  type: InteractiveTypesEnum.LocationRequest | 'location_request_message';
  body: SimpleTextObject;
  footer?: SimpleTextObject;
  header?: HeaderObject;
  action: LocationRequestActionObject;
};
type AddressValues = {
  name?: string;
  phone_number?: string;
  in_pin_code?: string;
  house_number?: string;
  floor_number?: string;
  tower_number?: string;
  building_name?: string;
  address?: string;
  landmark_area?: string;
  city?: string;
  state?: string;
};
type SavedAddress = {
  id: string;
  value: AddressValues;
};
type ValidationErrors = { [key in keyof AddressValues]?: string };
type AddressMessageParameters = {
  country: string;
  values?: AddressValues;
  saved_addresses?: SavedAddress[];
  validation_errors?: ValidationErrors;
};
type AddressMessageActionObject = {
  name: 'address_message';
  parameters: AddressMessageParameters;
};
type AddressMessageInteractiveObject = {
  type: InteractiveTypesEnum.AddressMessage | 'address_message';
  body: SimpleTextObject;
  footer?: SimpleTextObject;
  header?: HeaderObject;
  action: AddressMessageActionObject;
};
type FlowParameters = {
  flow_message_version: string;
  flow_id?: string;
  flow_name?: string;
  flow_cta: string;
  mode?: 'draft' | 'published';
  flow_token?: string;
  flow_action?: 'navigate' | 'data_exchange';
  flow_action_payload?: {
    screen?: string;
    data?: Record<string, string>;
  };
};
type FlowActionObject = {
  name: 'flow';
  parameters: FlowParameters;
};
type FlowInteractiveObject = {
  type: InteractiveTypesEnum.Flow | 'flow';
  body: SimpleTextObject;
  footer?: SimpleTextObject;
  header?: HeaderObject;
  action: FlowActionObject;
};
type CarouselHeaderObject = {
  type: 'image' | 'video';
  image?: ImageMediaObject$1;
  video?: VideoMediaObject$1;
};
type CarouselQuickReply = {
  id: string;
  title: string;
};
type CarouselQuickReplyButton = {
  type: 'quick_reply';
  quick_reply: CarouselQuickReply;
};
type CarouselCtaUrlAction = {
  name: 'cta_url';
  parameters: CtaUrlParameters;
};
type CarouselQuickReplyAction = {
  buttons: CarouselQuickReplyButton[];
};
type MediaCarouselCard$1 = {
  card_index: number;
  type: 'cta_url';
  header: CarouselHeaderObject;
  body?: SimpleTextObject;
  action: CarouselCtaUrlAction | CarouselQuickReplyAction;
};
type ProductCarouselAction = {
  product_retailer_id: string;
  catalog_id: string;
};
type ProductCarouselCard$1 = {
  card_index: number;
  type: 'product';
  action: ProductCarouselAction;
};
type CarouselActionObject = {
  cards: Array<MediaCarouselCard$1 | ProductCarouselCard$1>;
};
type CarouselInteractiveObject = {
  type: InteractiveTypesEnum.Carousel | 'carousel';
  body: SimpleTextObject;
  action: CarouselActionObject;
};
type InteractiveObject = ButtonInteractiveObject | ListInteractiveObject | ProductInteractiveObject | ProductListInteractiveObject | CatalogMessageInteractiveObject | CallPermissionRequestInteractiveObject | CtaUrlInteractiveObject | CarouselInteractiveObject | LocationRequestInteractiveObject | AddressMessageInteractiveObject | FlowInteractiveObject;
//#endregion
//#region src/api/messages/types/reaction.d.ts
interface ReactionParams {
  messageId: string;
  emoji: string;
  to: string;
  recipientType?: MessageRecipientType;
}
//#endregion
//#region src/types/config.d.ts
/**
 * Configuration for automatic retry behavior on throttling errors.
 *
 * When the WhatsApp API returns a rate limit error (WhatsAppThrottlingError),
 * the SDK will automatically retry the request using exponential backoff.
 *
 * @example
 * ```typescript
 * const wa = new WhatsApp({
 *   accessToken: '...',
 *   phoneNumberId: 123,
 *   retry: { maxAttempts: 3, backoff: 'exponential', initialDelayMs: 1000 },
 * });
 * ```
 */
interface RetryConfig {
  /**
   * Maximum number of attempts (including the initial attempt).
   * Defaults to 3.
   */
  maxAttempts?: number;
  /**
   * Backoff strategy.
   * - 'exponential': delay doubles each attempt (1s → 2s → 4s)
   * - 'fixed': constant delay between attempts
   * Defaults to 'exponential'.
   */
  backoff?: 'exponential' | 'fixed';
  /**
   * Initial delay in milliseconds before the first retry.
   * Defaults to 1000 (1 second).
   */
  initialDelayMs?: number;
}
type WhatsAppConfig = {
  accessToken: string;
  appId?: string;
  appSecret?: string;
  phoneNumberId?: number;
  businessAcctId?: string;
  apiVersion?: string;
  webhookEndpoint?: string;
  webhookVerificationToken?: string;
  listenerPort?: number;
  debug?: boolean;
  maxRetriesAfterWait?: number;
  requestTimeout?: number;
  privatePem?: string;
  passphrase?: string; /** Automatic retry configuration for throttling errors. */
  retry?: RetryConfig;
};
type WabaConfigType = {
  /**
   * The Meta for Developers business application Id for this registered application.
   */
  [WabaConfigEnum.AppId]: string;
  /**
   * The Meta for Developers business application secret for this registered application.
   */
  [WabaConfigEnum.AppSecret]: string;
  /**
   * The Meta for Developers phone number id used by the registered business.
   */
  [WabaConfigEnum.PhoneNumberId]: number;
  /**
   * The Meta for Developers business id for the registered business.
   */
  [WabaConfigEnum.BusinessAcctId]: string;
  /**
   * The version of the Cloud API being used. Starts with a "v" and follows the major number.
   */
  [WabaConfigEnum.APIVersion]: string;
  /**
   * The access token to make calls on behalf of the signed in Meta for Developers account or business.
   */
  [WabaConfigEnum.AccessToken]: string;
  /**
   * The endpoint path (e.g. if the value here is webhook, the webhook URL would look like http/https://{host}/webhook).
   */
  [WabaConfigEnum.WebhookEndpoint]: string;
  /**
   * The verification token that needs to match what is sent by the Cloud API webhook in order to subscribe.
   */
  [WabaConfigEnum.WebhookVerificationToken]: string;
  /**
   * The listener port for the webhook web server.
   */
  [WabaConfigEnum.ListenerPort]: number;
  /**
   * To turn on global debugging of the logger to print verbose output across the APIs.
   */
  [WabaConfigEnum.Debug]: boolean;
  /**
   * The total number of times a request should be retried after the wait period if it fails.
   */
  [WabaConfigEnum.MaxRetriesAfterWait]: number;
  /**
   * The timeout period for a request to quit and destroy the attempt in ms.
   */
  [WabaConfigEnum.RequestTimeout]: number;
  /**
   * The private key for the Meta for Developers business.
   */
  [WabaConfigEnum.PrivatePem]: string;
  /**
   * The passphrase for the Meta for Developers business.
   */
  [WabaConfigEnum.Passphrase]: string;
  /**
   * Automatic retry configuration for throttling errors.
   * Passed through from WhatsAppConfig.
   */
  retry?: RetryConfig;
};
//#endregion
//#region src/types/base.d.ts
declare class BaseClass {
  constructor(config: WabaConfigType);
}
//#endregion
//#region src/api/messages/types/common.d.ts
type GeneralMessageBody = GeneralRequestBody & {
  /**
   * The Meta messaging product name.
   * @default 'whatsapp'
   */
  messaging_product: 'whatsapp';
};
type StatusObject = {
  status: 'read' | 'typing';
  message_id: string;
  typing_indicator?: TypingIndicatorObject;
};
type TypingIndicatorObject = {
  type: 'text';
};
type StatusResponse = ResponseSuccess;
type ConTextObject = {
  message_id: string;
};
type MessageRecipientType = 'individual' | 'group';
type MessageRequestBody<T extends MessageTypesEnum> = GeneralMessageBody & {
  recipient_type?: MessageRecipientType;
  to: string;
  context?: ConTextObject;
  type?: T;
};
interface MessageRequestParams<T> {
  body: T;
  to: string;
  recipientType?: MessageRecipientType;
  replyMessageId?: string;
}
interface StatusParams {
  status: StatusObject['status'];
  messageId: string;
  typingIndicator?: TypingIndicatorObject;
}
type MessagesResponse = GeneralMessageBody & {
  contacts: Array<{
    input: string;
    wa_id: string;
  }>;
  messages: Array<{
    id: string;
    message_status?: 'accepted' | 'held_for_quality_assessment' | 'paused';
  }>;
};
type EncryptedMessageRequest = {
  messaging_product: 'whatsapp';
  encrypted_contents: string;
};
type EncryptedMessagesResponse = {
  encrypted_contents: string;
};
declare class MessagesClass extends BaseClass {
  text(params: TextMessageParams): Promise<MessagesResponse>;
  template(params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>): Promise<MessagesResponse>;
  audio(params: MessageRequestParams<AudioMediaObject>): Promise<MessagesResponse>;
  document(params: MessageRequestParams<DocumentMediaObject>): Promise<MessagesResponse>;
  image(params: MessageRequestParams<ImageMediaObject>): Promise<MessagesResponse>;
  video(params: MessageRequestParams<VideoMediaObject>): Promise<MessagesResponse>;
  sticker(params: MessageRequestParams<StickerMediaObject>): Promise<MessagesResponse>;
  contacts(params: MessageRequestParams<ContactObject[]>): Promise<MessagesResponse>;
  location(params: MessageRequestParams<LocationObject>): Promise<MessagesResponse>;
  interactive(params: MessageRequestParams<InteractiveObject>): Promise<MessagesResponse>;
  interactiveList(params: MessageRequestParams<InteractiveObject & {
    type: InteractiveTypesEnum.List;
  }>): Promise<MessagesResponse>;
  interactiveCtaUrl(params: MessageRequestParams<InteractiveObject & {
    type: InteractiveTypesEnum.CtaUrl;
  }>): Promise<MessagesResponse>;
  interactiveLocationRequest(params: MessageRequestParams<InteractiveObject & {
    type: InteractiveTypesEnum.LocationRequest;
  }>): Promise<MessagesResponse>;
  interactiveAddressMessage(params: MessageRequestParams<InteractiveObject & {
    type: InteractiveTypesEnum.AddressMessage;
  }>): Promise<MessagesResponse>;
  interactiveReplyButtons(params: MessageRequestParams<InteractiveObject & {
    type: InteractiveTypesEnum.Button;
  }>): Promise<MessagesResponse>;
  interactiveFlow(params: MessageRequestParams<InteractiveObject & {
    type: InteractiveTypesEnum.Flow;
  }>): Promise<MessagesResponse>;
  interactiveCarousel(params: MessageRequestParams<InteractiveObject & {
    type: InteractiveTypesEnum.Carousel;
  }>): Promise<MessagesResponse>;
  reaction(params: ReactionParams): Promise<MessagesResponse>;
  encrypted(params: EncryptedMessageRequest): Promise<EncryptedMessagesResponse>;
  markAsRead(params: {
    messageId: string;
  }): Promise<StatusResponse>;
  showTypingIndicator(params: {
    messageId: string;
  }): Promise<StatusResponse>;
  status(params: StatusParams): Promise<StatusResponse>;
}
//#endregion
//#region src/api/marketingMessages/types/marketingMessages.d.ts
/**
 * Marketing Messages API Types
 * @see https://developers.facebook.com/documentation/business-messaging/whatsapp/marketing-messages/send-marketing-messages/
 */
type MarketingMessageRequest = {
  to: string;
  template: MessageTemplateObject<ComponentTypesEnum>;
  message_activity_sharing?: boolean;
  product_policy?: 'CLOUD_API_FALLBACK' | 'STRICT';
};
interface MarketingMessagesClass {
  sendTemplateMessage(params: MarketingMessageRequest): Promise<MessagesResponse>;
}
//#endregion
//#region src/api/media/types/common.d.ts
type MediaResponse = {
  id: string;
  url: string;
  mime_type: string;
  sha256: string;
  file_size: number;
  messaging_product: 'whatsapp';
};
type MediasResponse = {
  data: MediaResponse[];
  paging: {
    cursors: {
      before: string;
      after: string;
    };
  };
};
type UploadMediaResponse = {
  id: string;
};
interface MediaClass {
  getMediaById(mediaId: string): Promise<MediaResponse>;
  uploadMedia(file: File, messagingProduct?: string): Promise<UploadMediaResponse>;
  deleteMedia(mediaId: string): Promise<ResponseSuccess>;
  downloadMedia(mediaUrl: string): Promise<Blob>;
}
//#endregion
//#region src/api/payments/types/payments.d.ts
/**
 * Payments API Types (India Payment Configuration)
 * @see https://developers.facebook.com/documentation/business-messaging/whatsapp/payments/payments-in/onboarding-apis/
 */
type PaymentConfigurationProvider = 'upi_vpa' | 'razorpay' | 'payu' | 'zaakpay';
type PaymentConfigurationStatus = 'Active' | 'Needs_Connecting' | 'Needs_Testing';
type PaymentConfigurationCode = {
  code: string;
  description?: string;
};
type PaymentConfiguration = {
  configuration_name: string;
  provider_name: string;
  provider_mid?: string;
  status?: PaymentConfigurationStatus;
  merchant_category_code?: PaymentConfigurationCode;
  purpose_code?: PaymentConfigurationCode;
  created_timestamp?: number;
  updated_timestamp?: number;
};
type PaymentConfigurationsResponse = {
  data: Array<{
    payment_configurations: PaymentConfiguration[];
  }>;
};
type PaymentConfigurationCreateRequest = {
  configuration_name: string;
  provider_name: PaymentConfigurationProvider;
  purpose_code?: string;
  merchant_category_code?: string;
  redirect_url?: string;
  merchant_vpa?: string;
};
type PaymentConfigurationUpdateRequest = {
  provider_name?: PaymentConfigurationProvider;
  purpose_code?: string;
  merchant_category_code?: string;
  redirect_url?: string;
  merchant_vpa?: string;
};
type PaymentConfigurationCreateResponse = {
  success: boolean;
  oauth_url?: string;
  expiration?: number;
};
type PaymentConfigurationUpdateResponse = PaymentConfigurationCreateResponse;
type PaymentConfigurationOauthLinkRequest = {
  configuration_name: string;
  redirect_url?: string;
};
type PaymentConfigurationOauthLinkResponse = {
  oauth_url: string;
  expiration?: number;
};
type PaymentConfigurationDeleteRequest = {
  configuration_name: string;
};
interface PaymentsClass {
  listPaymentConfigurations(wabaId: string): Promise<PaymentConfigurationsResponse>;
  getPaymentConfiguration(wabaId: string, configurationName: string): Promise<PaymentConfigurationsResponse>;
  createPaymentConfiguration(wabaId: string, params: PaymentConfigurationCreateRequest): Promise<PaymentConfigurationCreateResponse>;
  updatePaymentConfiguration(wabaId: string, configurationName: string, params: PaymentConfigurationUpdateRequest): Promise<PaymentConfigurationUpdateResponse>;
  generatePaymentConfigurationOauthLink(wabaId: string, params: PaymentConfigurationOauthLinkRequest): Promise<PaymentConfigurationOauthLinkResponse>;
  deletePaymentConfiguration(wabaId: string, params: PaymentConfigurationDeleteRequest): Promise<ResponseSuccess>;
}
//#endregion
//#region src/api/phone/types/common.d.ts
type QualityRating = 'GREEN' | 'YELLOW' | 'RED' | 'NA' | 'UNKNOWN';
type AccountMode = 'LIVE' | 'SANDBOX';
type CodeVerificationStatus = 'NOT_VERIFIED' | 'VERIFIED' | 'EXPIRED' | 'PENDING' | 'DELETED' | 'MIGRATED' | 'BANNED' | 'RESTRICTED' | 'RATE_LIMITED' | 'FLAGGED' | 'CONNECTED' | 'DISCONNECTED' | 'UNKNOWN' | 'UNVERIFIED';
type MessagingLimitTier = 'TIER_50' | 'TIER_250' | 'TIER_1K' | 'TIER_2K' | 'TIER_10K' | 'TIER_100K' | 'TIER_UNLIMITED' | (string & {});
type PlatformType = 'CLOUD_API' | 'ON_PREMISE' | 'NOT_APPLICABLE';
type ThroughputLevel = 'STANDARD' | 'HIGH' | 'NOT_APPLICABLE';
type PhoneNumberStatus = 'PENDING' | 'LINKED' | 'UNLINKED' | 'DELETED' | 'MIGRATED' | 'BANNED' | 'RESTRICTED';
type UnifiedCertStatus = 'APPROVED' | 'PENDING' | 'REJECTED' | 'EXPIRED' | 'NONE' | string;
type HostPlatform = 'CLOUD_API' | 'ON_PREMISE' | 'NOT_APPLICABLE' | string;
type HealthStatusEntity = {
  entity_type: string;
  id: string;
  can_send_message: string;
  additional_info?: string[];
  errors?: Array<{
    error_code: number;
    error_description: string;
    possible_solution: string;
  }>;
};
type HealthStatus = {
  can_send_message: string;
  entities: HealthStatusEntity[];
};
type QualityScore = {
  score: QualityRating;
};
type Throughput = {
  level: ThroughputLevel;
};
type PhoneNumberField = 'country_code' | 'country_dial_code' | 'display_phone_number' | 'id' | 'quality_rating' | 'verified_name' | 'account_mode' | 'certificate' | 'code_verification_status' | 'conversational_automation' | 'eligibility_for_api_business_global_search' | 'health_status' | 'host_platform' | 'is_official_business_account' | 'is_on_biz_app' | 'is_pin_enabled' | 'is_preverified_number' | 'last_onboarded_time' | 'messaging_limit_tier' | 'name_status' | 'new_certificate' | 'new_name_status' | 'platform_type' | 'quality_score' | 'search_visibility' | 'status' | 'throughput' | 'unified_cert_status' | 'username';
type PhoneNumberFieldsParam = PhoneNumberField[] | string;
type PhoneNumberSort = 'creation_time.asc' | 'creation_time.desc' | 'last_onboarded_time.asc' | 'last_onboarded_time.desc' | (string & {});
type PhoneNumberFilter = Record<string, unknown>;
type PhoneNumbersListParams = {
  fields?: PhoneNumberFieldsParam;
  filtering?: PhoneNumberFilter[] | string;
  sort?: PhoneNumberSort;
  limit?: number;
  after?: string;
  before?: string;
};
type GraphObject = Record<string, unknown>;
type CreatePhoneNumberRequest = {
  cc?: string;
  phone_number?: string;
  verified_name?: string;
  preverified_id?: string;
  [key: string]: unknown;
};
type CreatePhoneNumberResponse = {
  id: string;
  [key: string]: unknown;
};
type UpdatePhoneNumberStatusRequest = {
  connection_status?: 'CONNECTED' | 'DISCONNECTED' | (string & {});
  webhook_url?: string;
  whatsapp_business_api_data?: Record<string, unknown>;
  pin?: string;
};
type PhoneNumberSettingsFieldsParam = string[] | string;
type PhoneNumberSettingsParams = {
  fields?: PhoneNumberSettingsFieldsParam;
  include_sip_credentials?: boolean;
};
type PhoneNumberSettingsResponse = GraphObject;
type UpdatePhoneNumberSettingsRequest = {
  calling?: GraphObject;
  [key: string]: unknown;
};
type OfficialBusinessAccountStatusResponse = GraphObject;
type OfficialBusinessAccountAction = 'SUBMIT_APPLICATION' | 'WITHDRAW_APPLICATION' | 'RESUBMIT_APPLICATION';
type OfficialBusinessAccountApplicationData = {
  business_name?: string;
  business_description?: string;
  /**
   * OBA examples use `website_url`, while the schema also exposes `business_website_url`.
   * Both are accepted to track Meta's published OpenAPI variants.
   */
  website_url?: string;
  business_website_url?: string;
  contact_email?: string;
  primary_country_of_operation?: string;
  primary_language?: string;
  parent_business_or_brand?: string;
  [key: string]: unknown;
};
type UpdateOfficialBusinessAccountStatusRequest = {
  action?: OfficialBusinessAccountAction | (string & {});
  application_data?: OfficialBusinessAccountApplicationData;
  business_website_url?: string;
  primary_country_of_operation?: string;
  [key: string]: unknown;
};
type BusinessComplianceInfoResponse = GraphObject;
type UpdateBusinessComplianceInfoRequest = {
  [key: string]: unknown;
};
type PhoneNumberResponse = {
  display_phone_number: string;
  id: string;
  quality_rating: QualityRating;
  verified_name: string;
  account_mode?: AccountMode;
  certificate?: string;
  code_verification_status?: CodeVerificationStatus;
  conversational_automation?: Record<string, unknown>;
  country_code?: string;
  country_dial_code?: string;
  eligibility_for_api_business_global_search?: string;
  health_status?: HealthStatus;
  host_platform?: HostPlatform;
  is_official_business_account?: boolean;
  is_on_biz_app?: boolean;
  is_pin_enabled?: boolean;
  is_preverified_number?: boolean;
  last_onboarded_time?: string;
  messaging_limit_tier?: MessagingLimitTier;
  name_status?: string;
  new_certificate?: string;
  new_name_status?: string;
  platform_type?: PlatformType;
  quality_score?: QualityScore;
  search_visibility?: string;
  status?: PhoneNumberStatus | CodeVerificationStatus;
  throughput?: Throughput;
  unified_cert_status?: UnifiedCertStatus;
  username?: string;
};
type Cursors = {
  before: string;
  after: string;
};
type PhoneNumbersResponse = {
  data: PhoneNumberResponse[];
  paging: Paging;
};
type RequestVerificationCodeRequest = {
  code_method: 'SMS' | 'VOICE';
  language: string;
};
type VerifyCodeRequest = {
  code: string;
};
type TwoStepVerificationParams = {
  pin: string;
};
/**
 * Conversational Components - Commands
 */
type ConversationalCommand = {
  command_name: string;
  command_description: string;
};
/**
 * Conversational Components - Ice Breakers (Prompts)
 */
type ConversationalPrompt = string;
/**
 * Request payload for configuring conversational automation
 */
type ConversationalAutomationRequest = {
  enable_welcome_message?: boolean;
  commands?: ConversationalCommand[];
  prompts?: ConversationalPrompt[];
};
/**
 * Response from conversational automation GET endpoint
 */
type ConversationalAutomationResponse = {
  enable_welcome_message?: boolean;
  commands?: ConversationalCommand[];
  prompts?: ConversationalPrompt[];
  id: string;
};
/**
 * Response from throughput GET endpoint
 */
type ThroughputResponse = {
  throughput: Throughput;
  id: string;
};
interface PhoneNumberClass {
  getPhoneNumberById(fields?: PhoneNumberFieldsParam): Promise<PhoneNumberResponse>;
  getPhoneNumbers(params?: PhoneNumbersListParams): Promise<PhoneNumbersResponse>;
  createPhoneNumber(request: CreatePhoneNumberRequest, wabaId?: string): Promise<CreatePhoneNumberResponse>;
  updatePhoneNumberStatus(request: UpdatePhoneNumberStatusRequest): Promise<ResponseSuccess>;
  requestVerificationCode(params: RequestVerificationCodeRequest): Promise<ResponseSuccess>;
  verifyCode(params: VerifyCodeRequest): Promise<ResponseSuccess>;
  getPhoneNumberSettings(params?: PhoneNumberSettingsParams): Promise<PhoneNumberSettingsResponse>;
  updatePhoneNumberSettings(params: UpdatePhoneNumberSettingsRequest): Promise<ResponseSuccess>;
  setConversationalAutomation(params: ConversationalAutomationRequest): Promise<ResponseSuccess>;
  getConversationalAutomation(): Promise<ConversationalAutomationResponse>;
  getThroughput(): Promise<ThroughputResponse>;
  getOfficialBusinessAccountStatus(): Promise<OfficialBusinessAccountStatusResponse>;
  updateOfficialBusinessAccountStatus(params: UpdateOfficialBusinessAccountStatusRequest): Promise<ResponseSuccess>;
  getBusinessComplianceInfo(): Promise<BusinessComplianceInfoResponse>;
  updateBusinessComplianceInfo(params: UpdateBusinessComplianceInfoRequest): Promise<ResponseSuccess>;
}
//#endregion
//#region src/api/profile/types/upload.d.ts
/**
 * Response from creating an upload session.
 */
interface UploadSessionResponse {
  id: string;
}
/**
 * Response from uploading business profile media.
 */
interface UploadBusinessProfileResponse {
  h: string;
}
/**
 * Upload handle information containing file details and handle.
 */
interface UploadHandle {
  handle: string;
  file_size: number;
  upload_result: {
    handle_type: string;
    name: string;
  };
}
//#endregion
//#region src/api/profile/types/common.d.ts
/**
 * Available fields that can be requested when retrieving a business profile.
 */
type BusinessProfileField = 'about' | 'address' | 'description' | 'email' | 'messaging_product' | 'profile_picture_url' | 'websites' | 'vertical';
type BusinessProfileFieldsParam = BusinessProfileField[] | string;
/**
 * Business profile data structure containing all profile information.
 */
interface BusinessProfileData {
  /**
   * The business's About text. This text appears in the business's profile, beneath its profile image,
   * phone number, and contact buttons.
   * - String cannot be empty
   * - Strings must be between 1 and 139 characters
   * - Rendered emojis are supported however their unicode values are not.
   *   Emoji unicode values must be Java- or JavaScript-escape encoded
   * - Hyperlinks can be included but will not render as clickable links
   * - Markdown is not supported
   */
  about?: string;
  /**
   * Address of the business. Character limit 256.
   */
  address?: string;
  /**
   * Description of the business. Character limit 512.
   */
  description?: string;
  /**
   * The contact email address (in valid email format) of the business. Character limit 128.
   */
  email?: string;
  /**
   * The messaging service used for the request. Always set it to "whatsapp" if you are using
   * the WhatsApp Business API.
   */
  messaging_product: string;
  /**
   * Profile picture URL.
   */
  profile_picture_url?: string;
  /**
   * The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.
   * - You must include the http:// or https:// portion of the URL
   * - There is a maximum of 2 websites with a maximum of 256 characters each
   */
  websites?: string[];
  /**
   * Business category. This can be either an empty string or one of the predefined business categories.
   * @see BusinessVerticalEnum for all available options
   */
  vertical?: BusinessVerticalEnum | string;
}
/**
 * Response structure for business profile GET requests.
 */
interface BusinessProfileResponse {
  data: BusinessProfileData[];
}
/**
 * Request structure for updating business profile.
 */
interface UpdateBusinessProfileRequest {
  /**
   * The messaging service used for the request. Always set it to "whatsapp" if you are using
   * the WhatsApp Business API.
   * @required
   */
  messaging_product: string;
  /**
   * The business's About text. This text appears in the business's profile, beneath its profile image,
   * phone number, and contact buttons.
   * - String cannot be empty
   * - Strings must be between 1 and 139 characters
   * - Rendered emojis are supported however their unicode values are not.
   *   Emoji unicode values must be Java- or JavaScript-escape encoded
   * - Hyperlinks can be included but will not render as clickable links
   * - Markdown is not supported
   */
  about?: string;
  /**
   * Address of the business. Character limit 256.
   */
  address?: string;
  /**
   * Description of the business. Character limit 512.
   */
  description?: string;
  /**
   * Business category. This can be either an empty string or one of the predefined business categories.
   * @see BusinessVerticalEnum for all available options
   */
  vertical?: BusinessVerticalEnum | string;
  /**
   * The contact email address (in valid email format) of the business. Character limit 128.
   */
  email?: string;
  /**
   * The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.
   * - You must include the http:// or https:// portion of the URL
   * - There is a maximum of 2 websites with a maximum of 256 characters each
   */
  websites?: string[];
  /**
   * Handle of the profile picture. This handle is generated when you upload the binary file
   * for the profile picture to Meta using the Resumable Upload API.
   */
  profile_picture_handle?: string;
}
declare class BusinessProfileClass extends BaseClass {
  /**
   * Get your business profile.
   * @param fields Specific fields to be returned in the response. If not specified, all fields will be returned.
   */
  getBusinessProfile(fields?: BusinessProfileFieldsParam): Promise<BusinessProfileResponse>;
  /**
   * Update your business profile.
   * @param updateRequest The request object containing the fields to update.
   */
  updateBusinessProfile(updateRequest: UpdateBusinessProfileRequest): Promise<ResponseSuccess>;
  /**
   * Create an upload session for profile picture.
   * @param fileLength Length of the file to be uploaded in bytes.
   * @param fileType MIME type of the file (e.g., 'image/jpeg').
   * @param fileName Name of the file.
   */
  createUploadSession(fileLength: number, fileType: string, fileName: string): Promise<UploadSessionResponse>;
  /**
   * Upload media file to the upload session.
   * @param uploadId The ID of the upload session.
   * @param file The binary data of the file.
   */
  uploadMedia(uploadId: string, file: Buffer): Promise<UploadBusinessProfileResponse>;
  /**
   * Get the upload handle information.
   * @param uploadId The ID of the upload session.
   */
  getUploadHandle(uploadId: string): Promise<UploadHandle>;
}
//#endregion
//#region src/api/qrCode/types/common.d.ts
type QrCodeResponse = {
  code: string;
  prefilled_message: string;
  deep_link_url: string;
  qr_image_url?: string;
};
type QrCodesResponse = ResponseData<QrCodeResponse[]>;
type CreateQrCodeRequest = {
  prefilled_message: string;
  generate_qr_image?: 'SVG' | 'PNG';
};
type UpdateQrCodeRequest = {
  code: string;
  prefilled_message: string;
};
interface QrCodeClass {
  createQrCode(request: CreateQrCodeRequest): Promise<QrCodeResponse>;
  getQrCodes(): Promise<QrCodesResponse>;
  getQrCode(qrCodeId: string): Promise<QrCodeResponse>;
  updateQrCode(request: UpdateQrCodeRequest): Promise<QrCodeResponse>;
  deleteQrCode(qrCodeId: string): Promise<ResponseSuccess>;
}
//#endregion
//#region src/api/registration/types/common.d.ts
type RegistrationRequest = {
  messaging_product: 'whatsapp';
  pin: string;
  data_localization_region?: DataLocalizationRegionEnum;
};
interface RegistrationClass {
  register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<ResponseSuccess>;
  deregister(): Promise<ResponseSuccess>;
}
//#endregion
//#region src/api/template/types/common.d.ts
type TemplateFormat = 'TEXT' | 'IMAGE' | 'VIDEO' | 'DOCUMENT' | 'LOCATION' | 'PRODUCT';
type PhoneNumberButton = {
  type: 'PHONE_NUMBER';
  text: string;
  phone_number: string;
};
type URLButton = {
  type: 'URL';
  text: string;
  url: string;
  example?: string[];
};
type QuickReplyButton = {
  type: 'QUICK_REPLY';
  text: string;
};
type CopyCodeButton = {
  type: 'COPY_CODE';
  example: string;
};
type FlowButton = {
  type: 'FLOW';
  text: string;
  flow_id?: string;
  flow_name?: string;
  flow_json?: string;
  flow_action?: 'navigate' | 'data_exchange';
  navigate_screen?: string;
};
type MPMButton = {
  type: 'MPM';
  action?: {
    thumbnail_product_retailer_id: string;
    sections: Array<{
      title?: string;
      product_items: Array<{
        product_retailer_id: string;
      }>;
    }>;
  };
};
type OTPButton = {
  type: 'OTP';
};
type SPMButton = {
  type: 'SPM';
  action?: {
    product_retailer_id: string;
  };
};
type CatalogButton = {
  type: 'CATALOG';
  action?: {
    thumbnail_product_retailer_id: string;
  };
};
type TemplateButton = PhoneNumberButton | URLButton | QuickReplyButton | CopyCodeButton | FlowButton | MPMButton | OTPButton | SPMButton | CatalogButton;
type TemplateHeaderExample = {
  header_text?: string[];
  header_text_named_params?: Array<{
    param_name: string;
    example: string;
  }>;
  header_handle?: string[];
};
type TemplateHeader = {
  type: 'HEADER';
  format: TemplateFormat;
  text?: string;
  example?: TemplateHeaderExample;
};
type TemplateBody = {
  type: 'BODY';
  text: string;
  example?: {
    body_text?: Array<Array<string>>;
    body_text_named_params?: Array<{
      param_name: string;
      example: string;
    }>;
  };
};
type TemplateFooter = {
  type: 'FOOTER';
  text: string;
};
type TemplateButtons = {
  type: 'BUTTONS';
  buttons: TemplateButton[];
};
type TemplateLimitedTimeOffer = {
  type: 'LIMITED_TIME_OFFER';
  limited_time_offer: {
    expiration_time_ms: number;
  };
};
type TemplateCarousel = {
  type: 'CAROUSEL';
  cards: Array<{
    card_index: number;
    components: ComponentTypes[];
  }>;
};
type MediaCarouselCard = {
  card_index: number;
  components: (TemplateHeader | TemplateBody | TemplateButtons)[];
};
type ProductCarouselCard = {
  card_index: number;
  components: TemplateHeader[];
};
type ComponentTypes = TemplateHeader | TemplateBody | TemplateFooter | TemplateButtons | TemplateLimitedTimeOffer | TemplateCarousel;
type TemplateRequestBody = GeneralRequestBody & {
  name: string;
  language: LanguagesEnum;
  category?: CategoryEnum;
  components?: ComponentTypes[];
};
type TemplateResponse = {
  id: string;
  status: string;
  language: LanguagesEnum;
  category: CategoryEnum;
  name: string;
  components: ComponentTypes[];
};
type TemplateGetParams = {
  limit?: number;
  name?: string;
  language?: LanguagesEnum;
  category?: CategoryEnum;
  status?: TemplateStatusEnum;
};
type TemplateDeleteParams = {
  hsm_id?: string;
  name: string;
};
declare class TemplateClass {
  getTemplate(templateId: string): Promise<TemplateResponse>;
  updateTemplate(templateId: string, template: Partial<TemplateRequestBody>): Promise<ResponseSuccess>;
  getTemplates(params?: TemplateGetParams): Promise<ResponsePagination<TemplateResponse>>;
  createTemplate(template: TemplateRequestBody): Promise<TemplateResponse>;
  deleteTemplate(params: TemplateDeleteParams): Promise<ResponseSuccess>;
}
//#endregion
//#region src/api/template/types/factory.d.ts
interface TextParameter {
  type: 'text';
  value: string;
}
interface CurrencyParameter {
  type: 'currency';
  amount_1000: number;
  code: CurrencyCodesEnum;
  fallback_value: string;
}
interface DateTimeParameter {
  type: 'date_time';
  fallback_value: string;
}
interface MediaParameter {
  type: 'image' | 'video' | 'document';
  handle?: string;
  link?: string;
}
interface LocationParameter {
  type: 'location';
  latitude?: number;
  longitude?: number;
  name?: string;
  address?: string;
}
interface ProductParameter {
  type: 'product';
  product_retailer_id: string;
}
type TemplateParameter = TextParameter | CurrencyParameter | DateTimeParameter | MediaParameter | LocationParameter | ProductParameter;
interface HeaderOptions {
  format: TemplateFormat;
  text?: string;
  parameters?: TemplateParameter[];
  example?: {
    header_text?: string[];
    header_text_named_params?: Array<{
      param_name: string;
      example: string;
    }>;
    header_handle?: string[];
  };
}
interface BodyOptions {
  text: string;
  parameters?: TemplateParameter[];
  example?: {
    body_text?: string[][];
    body_text_named_params?: Array<{
      param_name: string;
      example: string;
    }>;
  };
}
interface FooterOptions {
  text: string;
}
interface ButtonOptions {
  phone_number?: {
    text: string;
    phone_number: string;
  };
  url?: {
    text: string;
    url: string;
    example?: string;
  };
  quick_reply?: {
    text: string;
  }[];
  copy_code?: {
    example: string;
  };
  flow?: {
    text: string;
    flow_id?: string;
    flow_name?: string;
    flow_json?: string;
    flow_action?: 'navigate' | 'data_exchange';
    navigate_screen?: string;
  };
  mpm?: boolean;
  otp?: boolean;
  spm?: boolean;
}
interface CarouselCard {
  image?: string;
  video?: string;
  product?: string;
  body?: string;
  bodyParameters?: TemplateParameter[];
  buttons?: ButtonOptions;
}
interface CarouselOptions {
  cards: CarouselCard[];
}
interface LimitedTimeOfferOptions {
  expiration_time_ms: number;
}
interface ProductSection {
  title?: string;
  product_items: Array<{
    product_retailer_id: string;
  }>;
}
interface TemplateOptions {
  name: string;
  language: LanguagesEnum;
  category: CategoryEnum;
  header?: HeaderOptions;
  body?: BodyOptions;
  footer?: FooterOptions;
  buttons?: ButtonOptions;
  carousel?: CarouselOptions;
  limitedTimeOffer?: LimitedTimeOfferOptions;
}
interface OTPTemplateOptions {
  name: string;
  language: LanguagesEnum;
  code_expiration_minutes?: number;
  add_security_recommendation?: boolean;
}
interface AuthenticationTemplateOptions {
  name: string;
  language: LanguagesEnum;
  code_expiration_minutes?: number;
  add_security_recommendation?: boolean;
  copy_code_button?: boolean;
}
interface CatalogTemplateOptions {
  name: string;
  language: LanguagesEnum;
  header?: Omit<HeaderOptions, 'format'>;
  body: BodyOptions;
  footer?: FooterOptions;
  thumbnail_product_retailer_id: string;
}
interface CouponTemplateOptions {
  name: string;
  language: LanguagesEnum;
  header?: Omit<HeaderOptions, 'format'>;
  body: BodyOptions;
  footer?: FooterOptions;
  coupon_code: string;
}
interface LimitedTimeOfferTemplateOptions {
  name: string;
  language: LanguagesEnum;
  header?: Omit<HeaderOptions, 'format'>;
  body: BodyOptions;
  footer?: FooterOptions;
  expiration_time_ms: number;
}
interface MediaCardCarouselTemplateOptions {
  name: string;
  language: LanguagesEnum;
  cards: Array<{
    header: {
      format: 'IMAGE' | 'VIDEO';
      example: {
        header_handle: string[];
      };
    };
    body: BodyOptions;
    buttons?: ButtonOptions;
  }>;
}
interface MPMTemplateOptions {
  name: string;
  language: LanguagesEnum;
  header?: Omit<HeaderOptions, 'format'>;
  body: BodyOptions;
  footer?: FooterOptions;
  thumbnail_product_retailer_id: string;
  sections: ProductSection[];
}
interface ProductCardCarouselTemplateOptions {
  name: string;
  language: LanguagesEnum;
  header?: Omit<HeaderOptions, 'format'>;
  body: BodyOptions;
  footer?: FooterOptions;
  cards: Array<{
    product_retailer_id: string;
  }>;
}
interface SPMTemplateOptions {
  name: string;
  language: LanguagesEnum;
  header?: Omit<HeaderOptions, 'format'>;
  body: BodyOptions;
  footer?: FooterOptions;
  product_retailer_id: string;
}
//#endregion
//#region src/api/twoStepVerification/types/common.d.ts
type TwoStepVerificationRequest = {
  pin: string;
};
interface TwoStepVerificationClass {
  setTwoStepVerificationCode(pin: string): Promise<ResponseSuccess>;
}
//#endregion
//#region src/api/waba/types/common.d.ts
/**
 * WhatsApp Business Account subscription configuration
 */
type WabaSubscription = {
  whatsapp_business_api_data: {
    id: string;
    link: string;
    name: string;
    category: string;
  };
  override_callback_uri?: string;
};
/**
 * Parameters for updating WABA subscription
 */
interface UpdateWabaSubscription {
  override_callback_uri: string;
  verify_token: string;
}
/**
 * Response containing all WABA subscriptions
 */
interface WabaSubscriptions {
  data: Array<WabaSubscription>;
}
/**
 * WABA account review status enumeration
 */
declare enum WabaAccountReviewStatus {
  Approved = "APPROVED",
  Active = "ACTIVE",
  Inactive = "INACTIVE",
  Disabled = "DISABLED"
}
/**
 * WABA health status for message sending capability
 */
declare enum WabaHealthStatusCanSendMessage {
  Blocked = "BLOCKED",
  Limited = "LIMITED",
  Available = "AVAILABLE"
}
/**
 * WABA account status enumeration
 */
declare enum WabaAccountStatus {
  Approved = "APPROVED",
  Active = "ACTIVE",
  Inactive = "INACTIVE",
  Disabled = "DISABLED"
}
/**
 * Business verification status enumeration
 */
declare enum WabaBusinessVerificationStatus {
  Verified = "verified",
  PendingSubmission = "pending_submission",
  Unverified = "unverified",
  Rejected = "rejected"
}
/**
 * WABA health status error details
 */
interface WabaHealthStatusError {
  error_code?: number;
  error_description?: string;
  possible_solution?: string;
}
/**
 * WABA health status entity information
 */
interface WabaHealthStatusEntity {
  entity_type?: string;
  id?: string;
  can_send_message?: string;
  errors?: WabaHealthStatusError[];
}
/**
 * Overall WABA health status
 */
interface WabaHealthStatus {
  can_send_message?: WabaHealthStatusCanSendMessage;
  entities?: WabaHealthStatusEntity[];
}
/**
 * WhatsApp Business Account information
 */
interface WabaAccount {
  account_review_status?: WabaAccountReviewStatus;
  id?: string;
  health_status?: WabaHealthStatus;
  status?: WabaAccountStatus;
  business_verification_status?: WabaBusinessVerificationStatus;
  message_template_namespace?: string;
  name?: string;
  ownership_type?: string;
  timezone_id?: string;
  primary_business_location?: Record<string, unknown> | string;
  currency?: string;
  country?: string;
  analytics?: Record<string, unknown>;
  is_enabled_for_insights?: boolean;
  is_shared_with_partners?: boolean;
  marketing_messages_lite_api_status?: string;
  marketing_messages_onboarding_status?: string;
  on_behalf_of_business_info?: Record<string, unknown>;
  primary_funding_id?: string;
  purchase_order_number?: string;
  whatsapp_business_manager_messaging_limit?: string;
}
/**
 * Available fields for WABA account queries
 */
type WabaAccountFields = 'id' | 'name' | 'timezone_id' | 'account_review_status' | 'auth_international_rate_eligibility' | 'business_verification_status' | 'country' | 'currency' | 'health_status' | 'status' | 'ownership_type' | 'message_template_namespace' | 'primary_business_location' | 'analytics' | 'is_enabled_for_insights' | 'is_shared_with_partners' | 'marketing_messages_lite_api_status' | 'marketing_messages_onboarding_status' | 'on_behalf_of_business_info' | 'primary_funding_id' | 'purchase_order_number' | 'whatsapp_business_manager_messaging_limit';
/**
 * Parameter type for specifying which WABA account fields to retrieve
 */
type WabaAccountFieldsParam = WabaAccountFields[];
type WabaGraphObject = Record<string, unknown>;
type WabaFieldsParam = string[] | string;
type WabaListParams = {
  fields?: WabaFieldsParam;
  filtering?: WabaGraphObject[] | string;
  sort?: string;
  limit?: number;
  after?: string;
  before?: string;
};
type WabaListResponse<T = WabaGraphObject> = {
  data: T[];
  paging?: Paging;
  summary?: WabaGraphObject;
};
type UpdateWabaAccountRequest = {
  name?: string;
  timezone_id?: string;
  [key: string]: unknown;
};
type AssignedUsersListParams = WabaListParams & {
  business: string;
};
type AssignedUserRequest = {
  user: string;
  tasks: string[];
};
type RemoveAssignedUserRequest = {
  user: string;
  [key: string]: unknown;
};
type CreateOBOMobilityIntentRequest = {
  intent?: string;
  [key: string]: unknown;
};
type SetOBOMobilityIntentRequest = {
  [key: string]: unknown;
};
type CreateScheduleRequest = {
  name?: string;
  schedule_type?: string;
  [key: string]: unknown;
};
type UpdateWhatsAppBusinessProfileRequest = {
  [key: string]: unknown;
};
/**
 * Interface defining all WABA API methods
 */
interface WABAClass {
  getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;
  updateWabaAccount(params: UpdateWabaAccountRequest): Promise<ResponseSuccess>;
  getWabaActivities(params?: WabaListParams): Promise<WabaListResponse>;
  getAllWabaSubscriptions(): Promise<WabaSubscriptions>;
  updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;
  unsubscribeFromWaba(): Promise<ResponseSuccess>;
  getAssignedUsers(params: AssignedUsersListParams, wabaId?: string): Promise<WabaListResponse>;
  addAssignedUser(params: AssignedUserRequest, wabaId?: string): Promise<ResponseSuccess>;
  removeAssignedUser(params: RemoveAssignedUserRequest, wabaId?: string): Promise<ResponseSuccess>;
  getInProgressOnBehalfRequests(params?: WabaListParams, wabaId?: string): Promise<WabaListResponse>;
  getOBOMobilityIntent(oboMobilityIntentId: string, fields?: WabaFieldsParam): Promise<WabaGraphObject>;
  createOBOMobilityIntent(params: CreateOBOMobilityIntentRequest, wabaId?: string): Promise<WabaGraphObject>;
  setOBOMobilityIntent(params: SetOBOMobilityIntentRequest, wabaId?: string): Promise<WabaGraphObject>;
  getWabaSchedules(params?: WabaListParams, wabaId?: string): Promise<WabaListResponse>;
  createWabaSchedule(params: CreateScheduleRequest, wabaId?: string): Promise<WabaGraphObject>;
  getWhatsAppBusinessBotDetails(botId: string, fields?: WabaFieldsParam): Promise<WabaGraphObject>;
  getWhatsAppBusinessProfileDetails(profileId: string, fields?: WabaFieldsParam): Promise<WabaGraphObject>;
  updateWhatsAppBusinessProfile(profileId: string, params: UpdateWhatsAppBusinessProfileRequest): Promise<ResponseSuccess>;
}
//#endregion
//#region src/core/webhook/types/account.d.ts
/**
 * WABA event types for account_update webhook.
 * @see https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/account_update
 */
type AccountUpdateEvent = 'ACCOUNT_DELETED' | 'ACCOUNT_OFFBOARDED' | 'ACCOUNT_RECONNECTED' | 'ACCOUNT_RESTRICTION' | 'ACCOUNT_VIOLATION' | 'AD_ACCOUNT_LINKED' | 'AUTH_INTL_PRICE_ELIGIBILITY_UPDATE' | 'BUSINESS_PRIMARY_LOCATION_COUNTRY_UPDATE' | 'DISABLED_UPDATE' | 'MM_LITE_TERMS_SIGNED' | 'PARTNER_ADDED' | 'PARTNER_APP_INSTALLED' | 'PARTNER_APP_UNINSTALLED' | 'PARTNER_CLIENT_CERTIFICATION_STATUS_UPDATE' | 'PARTNER_REMOVED' | 'VERIFIED_ACCOUNT' | 'VOLUME_BASED_PRICING_TIER_UPDATE';
/**
 * WABA ban state — present on DISABLED_UPDATE events.
 */
type WabaBanState = 'SCHEDULE_FOR_DISABLE' | 'DISABLE' | 'REINSTATE';
/**
 * Restriction types imposed on WABA — present on ACCOUNT_RESTRICTION events.
 */
type RestrictionType = 'RESTRICTION_ADD_PHONE_NUMBER_ACTION' | 'RESTRICTED_BIZ_INITIATED_MESSAGING' | 'RESTRICTED_CUSTOMER_INITIATED_MESSAGING';
/**
 * Reason for the disconnection — present on PARTNER_REMOVED events where
 * the business used both WhatsApp Business app and Cloud API.
 */
type DisconnectionReason = 'ACCOUNT_DISCONNECTED' | 'BUSINESS_DOWNGRADE' | 'CHANGE_NUMBER' | 'COMPANION_INACTIVITY' | 'PRIMARY_INACTIVITY' | 'USER_RE_REGISTERED';
/**
 * Who initiated the disconnection — present on PARTNER_REMOVED events.
 */
type DisconnectionInitiatedBy = 'SYSTEM' | 'USER';
/**
 * Status of the partner-led business verification submission.
 */
type PartnerClientCertificationStatus = 'APPROVED' | 'REJECTED' | 'DISCARDED';
/** Present on DISABLED_UPDATE events */
interface AccountUpdateBanInfo {
  waba_ban_state: WabaBanState;
  /** Unix timestamp of the ban date */
  waba_ban_date?: string;
}
/** Present on ACCOUNT_VIOLATION events */
interface AccountUpdateViolationInfo {
  violation_type: string;
}
/** Present on ACCOUNT_RESTRICTION events */
interface AccountUpdateRestrictionInfo {
  restriction_type: RestrictionType;
  /** Unix timestamp when the restriction expires */
  expiration?: number;
  /** Steps the business can take to remediate the restriction */
  remediation?: string;
}
/**
 * Present on PARTNER_ADDED, PARTNER_APP_INSTALLED, PARTNER_APP_UNINSTALLED,
 * PARTNER_REMOVED, AD_ACCOUNT_LINKED, and MM_LITE_TERMS_SIGNED events.
 */
interface AccountUpdateWabaInfo {
  /** Customer or own WABA ID */
  waba_id: string;
  /** Business portfolio ID */
  owner_business_id: string;
  /** Partner app ID — present on PARTNER_APP_INSTALLED / PARTNER_APP_UNINSTALLED */
  partner_app_id?: string;
  /** Ad account ID — present on AD_ACCOUNT_LINKED */
  ad_account_linked?: string;
  /** Solution ID — present when customer onboarded via multi-partner solution */
  solution_id?: string;
  /** Partner business portfolio IDs — present for multi-partner solutions */
  solution_partner_business_ids?: string[];
}
/** Present on AUTH_INTL_PRICE_ELIGIBILITY_UPDATE events */
interface AuthInternationalRateEligibility {
  /** Unix timestamp when authentication-international rates become effective */
  start_time: number;
  /** Countries with different start times */
  exception_countries?: Array<{
    /** ISO 3166-1 alpha-2 country code */country_code: string; /** Unix timestamp for this country's start time */
    start_time: number;
  }>;
}
/** Present on VOLUME_BASED_PRICING_TIER_UPDATE events */
interface VolumeTierInfo {
  /** Unix timestamp of the tier update */
  tier_update_time: number;
  /** Pricing category (e.g. "UTILITY") */
  pricing_category: string;
  /** Pricing tier identifier */
  tier: string;
  /** Effective month in YYYY-MM format (e.g. "2025-11") */
  effective_month: string;
  /** Region for the tier update (e.g. "India") */
  region: string;
}
/** Present on PARTNER_REMOVED events where disconnection_info is applicable */
interface DisconnectionInfo {
  reason: DisconnectionReason;
  initiated_by: DisconnectionInitiatedBy;
}
/** Present on PARTNER_CLIENT_CERTIFICATION_STATUS_UPDATE events */
interface PartnerClientCertificationInfo {
  /** Customer's business portfolio ID */
  client_business_id: string;
  /** Status of the verification submission */
  status: PartnerClientCertificationStatus;
  /** Rejection reasons — present when status is REJECTED */
  rejection_reasons?: string[];
}
interface AccountUpdateValue {
  /** Phone number associated with the WABA, if applicable */
  phone_number?: string;
  /**
   * Event type describing what changed.
   * @see AccountUpdateEvent
   */
  event: AccountUpdateEvent;
  /**
   * ISO 3166-1 alpha-2 country code.
   * Only included for BUSINESS_PRIMARY_LOCATION_COUNTRY_UPDATE events.
   */
  country?: string;
  /** Present on DISABLED_UPDATE events */
  ban_info?: AccountUpdateBanInfo;
  /** Present on ACCOUNT_VIOLATION events */
  violation_info?: AccountUpdateViolationInfo;
  /** Present on ACCOUNT_RESTRICTION events */
  restriction_info?: AccountUpdateRestrictionInfo[];
  /** Present on partner-related and AD_ACCOUNT_LINKED events */
  waba_info?: AccountUpdateWabaInfo;
  /** Present on AUTH_INTL_PRICE_ELIGIBILITY_UPDATE events */
  auth_international_rate_eligibility?: AuthInternationalRateEligibility;
  /** Present on VOLUME_BASED_PRICING_TIER_UPDATE events */
  volume_tier_info?: VolumeTierInfo;
  /** Present on PARTNER_REMOVED events where business used WhatsApp Business app + Cloud API */
  disconnection_info?: DisconnectionInfo;
  /** Present on PARTNER_CLIENT_CERTIFICATION_STATUS_UPDATE events */
  partner_client_certification_info?: PartnerClientCertificationInfo;
}
interface AccountUpdateWebhookValue {
  field: 'account_update';
  value: AccountUpdateValue;
}
/**
 * Account review decision
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--decision
 */
type ReviewDecision = 'APPROVED' | 'REJECTED' | 'DEFERRED';
interface AccountReviewUpdateValue {
  decision: ReviewDecision;
}
interface AccountReviewUpdateWebhookValue {
  field: 'account_review_update';
  value: AccountReviewUpdateValue;
}
/**
 * Entity type for alert
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#account-alerts
 */
type AlertEntityType = 'BUSINESS' | 'PHONE_NUMBER' | 'WABA';
/**
 * Alert severity level
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#account-alerts
 */
type AlertSeverity = 'CRITICAL' | 'WARNING' | 'INFO';
/**
 * Alert status
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#account-alerts
 */
type AlertStatus = 'ACTIVE' | 'RESOLVED';
/**
 * Alert types for messaging limit increases
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#account-alerts
 */
type AlertType = 'INCREASED_CAPABILITIES_ELIGIBILITY_FAILED' | 'INCREASED_CAPABILITIES_ELIGIBILITY_DEFERRED' | 'INCREASED_CAPABILITIES_ELIGIBILITY_NEED_MORE_INFO';
interface AccountAlertsValue {
  entity_type: AlertEntityType;
  entity_id: string;
  alert_severity: AlertSeverity;
  alert_status: AlertStatus;
  alert_type: AlertType;
  alert_description: string;
}
interface AccountAlertsWebhookValue {
  field: 'account_alerts';
  value: AccountAlertsValue;
}
interface AccountSettingsCallingConfig {
  /** Whether calling is enabled for this phone number */
  status: 'ENABLED' | 'DISABLED' | string;
  /** Visibility of the call icon in WhatsApp */
  call_icon_visibility?: string;
  /** Status of callback permission */
  callback_permission_status?: 'ENABLED' | 'DISABLED' | string;
  /** Call hours configuration */
  call_hours?: {
    status: 'ENABLED' | 'DISABLED' | string;
  };
  /** SIP (Session Initiation Protocol) configuration */
  sip?: {
    status: 'ENABLED' | 'DISABLED' | string;
  };
}
interface AccountSettingsPhoneNumberSettings {
  /** The phone number ID these settings apply to */
  phone_number_id: string;
  /** Calling feature configuration */
  calling?: AccountSettingsCallingConfig;
}
interface AccountSettingsUpdateValue {
  messaging_product: 'whatsapp';
  /** Unix timestamp of the settings change */
  timestamp: string;
  /**
   * Type of settings that changed.
   * Known value: "phone_number_settings"
   */
  type: 'phone_number_settings' | string;
  /** Present when type is "phone_number_settings" */
  phone_number_settings?: AccountSettingsPhoneNumberSettings;
}
interface AccountSettingsUpdateWebhookValue {
  field: 'account_settings_update';
  value: AccountSettingsUpdateValue;
}
//#endregion
//#region src/core/webhook/types/common.d.ts
/**
 * WhatsApp contact information
 */
interface WebhookContact {
  wa_id: string;
  user_id?: string;
  profile: {
    name: string;
    username?: string;
  };
  identity_key_hash?: string;
}
/**
 * Metadata included in all webhooks
 */
interface WebhookMetadata {
  display_phone_number: string;
  phone_number_id: string;
}
/**
 * Error object structure
 */
interface WebhookError {
  code: number;
  title: string;
  message: string;
  error_data?: {
    details: string;
  };
  href?: string;
}
/**
 * Click to WhatsApp ad referral information
 */
interface ReferralInfo {
  source_url: string;
  source_id: string;
  source_type: 'ad';
  body?: string;
  headline?: string;
  media_type?: 'image' | 'video';
  image_url?: string;
  video_url?: string;
  thumbnail_url?: string;
  ctwa_clid?: string;
  welcome_message?: {
    text: string;
  };
}
/**
 * Context for forwarded messages
 */
interface ForwardedContext {
  forwarded?: true;
  frequently_forwarded?: true;
}
/**
 * Context for product inquiry messages
 */
interface ProductContext {
  from: string;
  id: string;
  referred_product: {
    catalog_id: string;
    product_retailer_id: string;
  };
}
/**
 * Context for interactive/button replies
 */
interface ReplyContext {
  from: string;
  id: string;
}
//#endregion
//#region src/core/webhook/types/appStateSync.d.ts
/**
 * Contact data in state sync
 */
interface StateSyncContact {
  full_name: string;
  first_name: string;
  phone_number: string;
}
/**
 * State sync metadata
 */
interface StateSyncMetadata {
  timestamp: string;
  version: number;
}
/**
 * State sync data
 */
interface StateSyncData {
  type: string;
  contact: StateSyncContact;
  action: string;
  metadata: StateSyncMetadata;
}
/**
 * SMB App State Sync value
 */
interface SmbAppStateSyncValue {
  messaging_product: string;
  metadata: WebhookMetadata;
  state_sync: StateSyncData[];
}
interface SmbAppStateSyncWebhookValue {
  field: 'smb_app_state_sync';
  value: SmbAppStateSyncValue;
}
//#endregion
//#region src/core/webhook/types/business.d.ts
/**
 * Business capability limits
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#business-capability-updates
 */
interface BusinessCapabilityUpdateValue {
  max_daily_conversation_per_phone?: number;
  max_phone_numbers_per_business?: number;
  max_phone_numbers_per_waba?: number;
}
interface BusinessCapabilityUpdateWebhookValue {
  field: 'business_capability_update';
  value: BusinessCapabilityUpdateValue;
}
type BusinessStatusUpdateEvent = 'ACCOUNT_DELETED' | 'ACCOUNT_RESTRICTION' | 'ACCOUNT_VIOLATION' | 'DISABLED_UPDATE' | string;
interface BusinessStatusUpdateValue {
  /** Event type describing the status change */
  event: BusinessStatusUpdateEvent;
  [key: string]: unknown;
}
interface BusinessStatusUpdateWebhookValue {
  field: 'business_status_update';
  value: BusinessStatusUpdateValue;
}
//#endregion
//#region src/core/webhook/types/calls.d.ts
/**
 * Lifecycle event type for a call.
 *
 * - "connect"      — Call initiated; for consumer-initiated calls, respond with action=accept
 * - "call_status"  — Business-initiated call started ringing or was accepted (business-initiated only)
 * - "media_update" — Consumer-side media event; apply the new SDP to your peer connection (business-initiated only)
 * - "terminate"    — Call ended for any reason
 */
type CallEventType = 'connect' | 'call_status' | 'media_update' | 'terminate';
/**
 * Direction of the call.
 *
 * - "business_initiated" — The business placed the call
 * - "user_initiated"     — The user placed the call
 */
type CallDirection = 'business_initiated' | 'user_initiated';
/**
 * Status for business-initiated calls (call_status event).
 *
 * - "ringing"  — The outgoing call is ringing on the consumer's device
 * - "accepted" — The consumer accepted the call
 */
type CallStatusValue = 'ringing' | 'accepted';
/**
 * Final call outcome (terminate event).
 *
 * - "Completed" — Call finished normally (includes calls rejected by either party)
 * - "Failed"    — Call failed mid-connection
 */
type CallTerminateStatus = 'Completed' | 'Failed';
interface CallSdpRenegotiation {
  /** SDP type — always "offer" for incoming media_update events */
  sdp_type: 'offer';
  /** SDP data compliant with RFC 4566 */
  sdp: string;
}
interface CallSession$1 {
  /**
   * Incremented each time Meta provides new SDP.
   * If multiple media_update webhooks arrive, apply the one with the highest version.
   */
  version: number;
  /** Contains the SDP offer from Meta; generate an answer and apply to your peer connection */
  sdp_renegotiation: CallSdpRenegotiation;
}
interface CallEntry {
  /** Unique ID for the call — use in accept / reject / terminate API calls */
  id: string;
  /**
   * Lifecycle event type.
   * @see CallEventType
   */
  event: CallEventType;
  /** Unix timestamp */
  timestamp: number;
  /** Callee of the call (Page ID) — present on connect */
  to?: string;
  /** Caller of the call (PSID) — present on connect */
  from?: string;
  /** Whether the call was business- or user-initiated — present on connect */
  call_direction?: CallDirection;
  /** PSID of the consumer — present on call_status */
  recipient_id?: string;
  /** Ringing or accepted — present on call_status */
  call_status?: CallStatusValue;
  /** SDP session information; apply the offer to your local peer connection — present on media_update */
  session?: CallSession$1;
  /** Final status of the call — present on terminate */
  status?: CallTerminateStatus;
  /** When the call started (Unix timestamp) — present on terminate */
  start_time?: number;
  /** When the call ended (Unix timestamp) — present on terminate */
  end_time?: number;
  /**
   * Call duration in seconds, counted from when the business connects.
   * Empty if the business did not successfully connect.
   * Present on terminate.
   */
  duration?: number;
}
interface CallContact {
  profile: {
    /** Display name of the caller */name: string; /** Business-scoped username, when Meta includes it */
    username?: string;
  };
  /** WhatsApp ID of the caller */
  wa_id: string;
  /** Business-scoped user ID, when Meta includes it */
  user_id?: string;
}
interface CallsValue {
  messaging_product: 'whatsapp';
  metadata: {
    display_phone_number: string;
    phone_number_id: string;
  };
  /** Array of call lifecycle events */
  calls: CallEntry[];
  /** Contact profile information for the caller */
  contacts?: CallContact[];
}
interface CallsWebhookValue {
  field: 'calls';
  value: CallsValue;
}
//#endregion
//#region src/core/webhook/types/flows.d.ts
/**
 * Flow event types
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--event
 */
type FlowEvent = 'FLOW_STATUS_CHANGE' | 'FLOW_HEALTH_UPDATE' | 'FLOW_THROTTLED';
/**
 * Flow status values
 * @see https://developers.facebook.com/docs/whatsapp/flows/reference/flowsapi#statuses
 */
type FlowStatus = 'DRAFT' | 'PUBLISHED' | 'DEPRECATED' | 'BLOCKED' | 'THROTTLED';
/**
 * Flow alert state
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--alert_state
 */
type FlowAlertState = 'ACTIVE' | 'RESOLVED';
/**
 * Flow endpoint request error
 */
interface FlowEndpointRequestError {
  error_code: string;
  error_message: string;
  error_count: number;
}
/**
 * Flow webhook value
 */
interface FlowsValue {
  event: FlowEvent;
  message?: string;
  flow_id: string;
  old_status?: FlowStatus;
  new_status?: FlowStatus;
  warning?: string;
  p90_latency?: number;
  p50_latency?: number;
  error_rate?: number;
  errors?: FlowEndpointRequestError[];
  requests_count?: number;
  availability?: number;
  threshold?: number;
  alert_state?: FlowAlertState;
}
interface FlowsWebhookValue {
  field: 'flows';
  value: FlowsValue;
}
//#endregion
//#region src/core/webhook/types/groups.d.ts
interface GroupWebhookError {
  /** Error code */
  code: string;
  /** Human-readable error message */
  message: string;
  /** Short title for the error */
  title: string;
  error_data?: {
    /** Detailed error description */details: string;
  };
}
interface GroupAddedParticipant {
  /** WhatsApp ID of the participant */
  wa_id: string;
  /** Phone number input provided when adding (optional) */
  input?: string;
}
interface GroupRemovedParticipant {
  /** Phone number or WhatsApp ID of the removed participant */
  input: string;
}
interface GroupFailedParticipant {
  /** Phone number or WhatsApp ID that failed */
  input: string;
  errors: GroupWebhookError[];
}
type GroupLifecycleEventType = 'group_create' | 'group_delete';
interface GroupLifecycleEntry {
  /** Unix timestamp of the event */
  timestamp: string;
  /** The group's WhatsApp ID */
  group_id: string;
  /** Event type: group_create or group_delete */
  type: GroupLifecycleEventType;
  /** Correlation ID for the API request that triggered this event */
  request_id: string;
  /** Group subject/name — present on group_create */
  subject?: string;
  /** Group description — present on group_create */
  description?: string;
  /** Invite link for the group — present on successful group_create */
  invite_link?: string;
  /** Whether users need admin approval to join — present on group_create */
  join_approval_mode?: string;
  /** Present when the operation failed */
  errors?: GroupWebhookError[];
}
interface GroupLifecycleUpdateValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  /** Array of group lifecycle events */
  groups: GroupLifecycleEntry[];
}
interface GroupLifecycleUpdateWebhookValue {
  field: 'group_lifecycle_update';
  value: GroupLifecycleUpdateValue;
}
type GroupParticipantsEventType = 'group_participants_add' | 'group_participants_remove' | 'group_join_request_created' | 'group_join_request_revoked';
type GroupParticipantsAddReason = 'invite_link' | 'admin_added';
/** Who initiated the remove action */
type GroupParticipantsInitiatedBy = 'business' | 'participant';
interface GroupParticipantsEntry {
  /** Unix timestamp of the event */
  timestamp: string;
  /** The group's WhatsApp ID */
  group_id: string;
  /** Event type */
  type: GroupParticipantsEventType;
  /** Correlation ID for the API request */
  request_id?: string;
  /** Reason participants were added (e.g. invite_link) */
  reason?: GroupParticipantsAddReason | string;
  /** Participants successfully added */
  added_participants?: GroupAddedParticipant[];
  /** Whether business or participant initiated the removal */
  initiated_by?: GroupParticipantsInitiatedBy;
  /** Participants successfully removed */
  removed_participants?: GroupRemovedParticipant[];
  /** Participants that could not be removed */
  failed_participants?: GroupFailedParticipant[];
  /** ID of the join request */
  join_request_id?: string;
  /** WhatsApp ID of the user who submitted or cancelled the request */
  wa_id?: string;
  /** Present when the operation partially or fully failed */
  errors?: GroupWebhookError[];
}
interface GroupParticipantsUpdateValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  /** Array of participant update events */
  groups: GroupParticipantsEntry[];
}
interface GroupParticipantsUpdateWebhookValue {
  field: 'group_participants_update';
  value: GroupParticipantsUpdateValue;
}
interface GroupSettingFieldResult {
  /** Whether this specific field was successfully updated */
  update_successful: boolean;
  /** Present on profile_picture updates */
  mime_type?: string;
  /** SHA-256 hash of the uploaded image — present on profile_picture updates */
  sha256?: string;
  /** New text value — present on group_subject / group_description updates */
  text?: string;
  /** Present when update_successful is false */
  errors?: GroupWebhookError[];
}
interface GroupSettingsEntry {
  /** Unix timestamp of the event */
  timestamp: string;
  /** The group's WhatsApp ID */
  group_id: string;
  /** Always "group_settings_update" */
  type: 'group_settings_update';
  /** Correlation ID for the API request */
  request_id?: string;
  /** Result of the profile picture update */
  profile_picture?: GroupSettingFieldResult;
  /** Result of the group subject (name) update */
  group_subject?: GroupSettingFieldResult;
  /** Result of the group description update */
  group_description?: GroupSettingFieldResult;
  /** Top-level errors when the entire update failed */
  errors?: GroupWebhookError[];
}
interface GroupSettingsUpdateValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  /** Array of group settings update events */
  groups: GroupSettingsEntry[];
}
interface GroupSettingsUpdateWebhookValue {
  field: 'group_settings_update';
  value: GroupSettingsUpdateValue;
}
type GroupStatusEventType = 'group_suspend' | 'group_suspend_cleared';
interface GroupStatusEntry {
  /** Unix timestamp of the event */
  timestamp: string;
  /** The group's WhatsApp ID */
  group_id: string;
  /** Event type: group_suspend or group_suspend_cleared */
  type: GroupStatusEventType;
}
interface GroupStatusUpdateValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  /** Array of group status events */
  groups: GroupStatusEntry[];
}
interface GroupStatusUpdateWebhookValue {
  field: 'group_status_update';
  value: GroupStatusUpdateValue;
}
//#endregion
//#region src/core/webhook/types/message.d.ts
/**
 * Base message properties common to all message types
 */
interface BaseMessage {
  from: string;
  id: string;
  timestamp: string;
}
interface TextMessage extends BaseMessage {
  type: MessageTypesEnum.Text;
  text: {
    body: string;
  };
  context?: ForwardedContext | ProductContext;
  referral?: ReferralInfo;
}
interface ImageMessage extends BaseMessage {
  type: MessageTypesEnum.Image;
  image: {
    caption?: string;
    mime_type: string;
    sha256: string;
    id: string;
    url: string;
  };
  context?: ForwardedContext;
  referral?: ReferralInfo;
}
interface VideoMessage extends BaseMessage {
  type: MessageTypesEnum.Video;
  video: {
    caption?: string;
    mime_type: string;
    sha256: string;
    id: string;
    url: string;
  };
  context?: ForwardedContext;
  referral?: ReferralInfo;
}
interface AudioMessage extends BaseMessage {
  type: MessageTypesEnum.Audio;
  audio: {
    mime_type: string;
    sha256: string;
    id: string;
    url: string;
    voice: boolean;
  };
  referral?: ReferralInfo;
}
interface DocumentMessage extends BaseMessage {
  type: MessageTypesEnum.Document;
  document: {
    caption?: string;
    filename: string;
    mime_type: string;
    sha256: string;
    id: string;
    url: string;
  };
  referral?: ReferralInfo;
}
interface StickerMessage extends BaseMessage {
  type: MessageTypesEnum.Sticker;
  sticker: {
    mime_type: string;
    sha256: string;
    id: string;
    url: string;
    animated: boolean;
  };
  referral?: ReferralInfo;
}
interface InteractiveListReplyMessage extends BaseMessage {
  type: MessageTypesEnum.Interactive;
  context: ReplyContext;
  interactive: {
    type: 'list_reply';
    list_reply: {
      id: string;
      title: string;
      description?: string;
    };
  };
}
interface InteractiveButtonReplyMessage extends BaseMessage {
  type: MessageTypesEnum.Interactive;
  context: ReplyContext;
  interactive: {
    type: 'button_reply';
    button_reply: {
      id: string;
      title: string;
    };
  };
}
interface InteractiveNfmReplyMessage extends BaseMessage {
  type: MessageTypesEnum.Interactive;
  context: ReplyContext;
  interactive: {
    type: 'nfm_reply';
    nfm_reply: {
      name: string;
      body: string;
      response_json: string;
    };
  };
}
type InteractiveMessage = InteractiveListReplyMessage | InteractiveButtonReplyMessage | InteractiveNfmReplyMessage;
interface ButtonMessage extends BaseMessage {
  type: MessageTypesEnum.Button;
  context: ReplyContext;
  button: {
    payload: string;
    text: string;
  };
}
interface LocationMessage extends BaseMessage {
  type: MessageTypesEnum.Location;
  location: {
    latitude: number;
    longitude: number;
    name?: string;
    address?: string;
    url?: string;
  };
  referral?: ReferralInfo;
}
interface ContactsMessage extends BaseMessage {
  type: MessageTypesEnum.Contacts;
  contacts: Array<{
    addresses?: Array<{
      city?: string;
      country?: string;
      country_code?: string;
      state?: string;
      street?: string;
      type?: string;
      zip?: string;
    }>;
    birthday?: string;
    emails?: Array<{
      email: string;
      type?: string;
    }>;
    name: {
      formatted_name: string;
      first_name?: string;
      last_name?: string;
      middle_name?: string;
      suffix?: string;
      prefix?: string;
    };
    org?: {
      company?: string;
      department?: string;
      title?: string;
    };
    phones?: Array<{
      phone: string;
      wa_id?: string;
      type?: string;
    }>;
    urls?: Array<{
      url: string;
      type?: string;
    }>;
  }>;
  referral?: ReferralInfo;
}
interface ReactionMessage extends BaseMessage {
  type: MessageTypesEnum.Reaction;
  reaction: {
    message_id: string;
    emoji?: string;
  };
}
interface OrderMessage extends BaseMessage {
  type: MessageTypesEnum.Order;
  order: {
    catalog_id: string;
    text?: string;
    product_items: Array<{
      product_retailer_id: string;
      quantity: number;
      item_price: number;
      currency: string;
    }>;
  };
}
interface SystemMessage extends BaseMessage {
  type: MessageTypesEnum.System;
  system: {
    body: string;
    wa_id: string;
    type: 'user_changed_number';
  };
}
interface UnsupportedMessage extends BaseMessage {
  type: MessageTypesEnum.Unsupported;
  errors: Array<WebhookError>;
}
type GroupMessage = {
  group_id: string;
} & (TextMessage | ImageMessage | VideoMessage | AudioMessage | DocumentMessage | LocationMessage | ContactsMessage);
type WhatsAppMessage = TextMessage | ImageMessage | VideoMessage | AudioMessage | DocumentMessage | StickerMessage | InteractiveMessage | ButtonMessage | LocationMessage | ContactsMessage | ReactionMessage | OrderMessage | SystemMessage | UnsupportedMessage | GroupMessage;
//#endregion
//#region src/core/webhook/types/history.d.ts
/**
 * History sync metadata
 */
interface HistorySyncMetadata {
  phase: number;
  chunk_order: number;
  progress: number;
}
/**
 * Reaction object in history
 */
interface HistoryReaction {
  message_id: string;
  emoji: string;
}
/**
 * Message echo data (sent messages)
 */
interface HistoryMessageEcho {
  from: string;
  to: string;
  id: string;
  timestamp: string;
  text?: {
    body: string;
  };
  interactive?: any;
  location?: any;
  image?: any;
  document?: any;
  voice?: any;
  audio?: any;
  video?: any;
  sticker?: any;
  button?: any;
  contacts?: any;
  reaction?: HistoryReaction;
  order?: any;
  biz_opaque_callback_data?: string;
  template?: any;
}
/**
 * History sync thread data
 */
interface HistorySyncThread {
  id: string;
  messages: WhatsAppMessage[];
}
/**
 * History sync error data
 */
interface HistorySyncError {
  message: string;
  error_data?: {
    details: string;
  };
}
/**
 * History sync data
 */
interface HistorySyncData {
  metadata: HistorySyncMetadata;
  threads?: HistorySyncThread[];
  errors?: HistorySyncError[];
}
/**
 * History webhook value
 */
interface HistoryValue {
  messaging_product: string;
  metadata: HistorySyncMetadata;
  history?: HistorySyncData[];
  messages?: WhatsAppMessage[];
  message_echoes?: HistoryMessageEcho[];
}
interface HistoryWebhookValue {
  field: 'history';
  value: HistoryValue;
}
//#endregion
//#region src/core/webhook/types/marketing.d.ts
/**
 * Detected event type.
 * Sample payload uses lowercase ("purchase"), docs use PascalCase ("Purchase").
 * Accept both forms.
 */
type AutomaticEventName = 'LeadSubmitted' | 'Purchase' | 'purchase' | 'lead_submitted' | string;
interface AutomaticEventCustomData {
  /** ISO 4217 currency code (e.g. "USD") — present on Purchase events */
  currency: string;
  /** Monetary value of the purchase — present on Purchase events */
  value: number;
}
interface AutomaticEvent {
  /** WhatsApp message ID that triggered the event detection */
  id: string;
  /**
   * Detected event type.
   * @see AutomaticEventName
   */
  event_name: AutomaticEventName;
  /** Unix timestamp of when the event was detected */
  timestamp: number;
  /**
   * Click-to-WhatsApp ad click ID — use with Conversions API.
   * Present when the event originated from a Click-to-WhatsApp ad.
   */
  ctwa_clid?: string;
  /** Present on Purchase events */
  custom_data?: AutomaticEventCustomData;
}
interface AutomaticEventsValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  /** Array of detected automatic events */
  automatic_events: AutomaticEvent[];
}
interface AutomaticEventsWebhookValue {
  field: 'automatic_events';
  value: AutomaticEventsValue;
}
interface TrackingEventData {
  /** Unique identifier for the click, also appended to the destination URL */
  click_id?: string;
  /** Internal Meta token for processing and tracking */
  tracking_token?: string;
}
interface TrackingEvent {
  /**
   * Name of the tracked event.
   * Known values: "sent"
   */
  event_name: string;
  /** Unix timestamp of the event */
  timestamp: number;
  /** Tracking data associated with the event */
  tracking_data?: TrackingEventData;
}
interface TrackingEventsValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  /** Array of tracking events */
  events: TrackingEvent[];
}
interface TrackingEventsWebhookValue {
  field: 'tracking_events';
  value: TrackingEventsValue;
}
//#endregion
//#region src/core/webhook/types/messageEchoes.d.ts
/**
 * Message echo error
 */
interface MessageEchoError {
  message: string;
  error_data?: {
    details: string;
  };
}
/**
 * Message echo data (sent messages from business)
 */
interface MessageEcho {
  from: string;
  to: string;
  id: string;
  timestamp: string;
  text?: {
    body: string;
  };
  interactive?: any;
  location?: any;
  image?: any;
  document?: any;
  voice?: any;
  audio?: any;
  video?: any;
  sticker?: any;
  button?: any;
  contacts?: any;
  reaction?: {
    message_id: string;
    emoji: string;
  };
  order?: any;
  biz_opaque_callback_data?: string;
  template?: any;
  system?: {
    type: string;
  };
  user_actions?: any[];
}
/**
 * SMB Message Echoes value
 */
interface SmbMessageEchoesValue {
  metadata: WebhookMetadata;
  errors?: MessageEchoError[];
  message_echoes: MessageEcho[];
}
interface SmbMessageEchoesWebhookValue {
  field: 'smb_message_echoes';
  value: SmbMessageEchoesValue;
}
interface MessageEchoSender {
  /** Page ID that sent the message */
  id: string;
}
interface MessageEchoRecipient {
  /** Page-scoped ID of the user who received the message */
  id: string;
}
interface MessageEchoAttachment {
  /** Attachment type: image, audio, video, file, template, fallback */
  type: string;
  /** URL of the attachment or fallback URL */
  url?: string;
  /** Template payload for template attachments */
  payload?: unknown;
  title?: string;
}
interface MessageEchoBody {
  /** Indicates the message was sent by the page */
  is_echo: true;
  /** ID of the app that sent the message */
  app_id: number;
  /** Custom metadata string set in the Send API request */
  metadata?: string;
  /** Message ID */
  mid: string;
  /** Text content — present on text messages */
  text?: string;
  /** Attachments — present on media/template messages */
  attachments?: MessageEchoAttachment[];
}
interface MessageEchoEntry {
  sender: MessageEchoSender;
  recipient: MessageEchoRecipient;
  /** Unix timestamp in milliseconds */
  timestamp: number;
  message: MessageEchoBody;
}
interface MessageEchoesValue {
  /** Array of echoed messages */
  messaging: MessageEchoEntry[];
}
interface MessageEchoesWebhookValue {
  field: 'message_echoes';
  value: MessageEchoesValue;
}
//#endregion
//#region src/core/webhook/types/messaging.d.ts
interface MessagingHandoverControlPassed {
  /** Optional metadata string passed with the handover */
  metadata?: string;
}
interface MessagingHandoversValue {
  messaging_product: 'whatsapp';
  /** The business phone number that received the handover event */
  recipient: {
    display_phone_number: string;
    phone_number_id: string;
  };
  /** The user involved in the handover */
  sender: {
    phone_number: string;
  };
  /** Unix timestamp of the event */
  timestamp: string;
  /** Present when thread control is passed to another app */
  control_passed?: MessagingHandoverControlPassed;
}
interface MessagingHandoversWebhookValue {
  field: 'messaging_handovers';
  value: MessagingHandoversValue;
}
interface StandbyValue {
  messaging_product: 'whatsapp';
  [key: string]: unknown;
}
interface StandbyWebhookValue {
  field: 'standby';
  value: StandbyValue;
}
interface UserPreferenceEntry {
  /** WhatsApp ID of the user */
  wa_id: string;
  /** Meta user ID (e.g. "US.1234567") */
  user_id: string;
  /** Human-readable description of the preference change */
  detail: string;
  /**
   * Category of the preference that changed.
   * Known value: "marketing_messages"
   */
  category: 'marketing_messages' | string;
  /**
   * New preference value.
   * Known value: "stop" (user opted out)
   */
  value: 'stop' | string;
  /** Unix timestamp of when the preference was changed */
  timestamp: number;
  /** Signup ID associated with the preference, if applicable */
  signup_id?: string;
}
interface UserPreferencesContact {
  profile: {
    /** Display name of the user */name: string; /** WhatsApp username, if available */
    username?: string;
  };
  /** WhatsApp ID of the user */
  wa_id: string;
  /** Meta user ID */
  user_id?: string;
}
interface UserPreferencesValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  /** Array of user preference change events */
  user_preferences: UserPreferenceEntry[];
  /** Contact profile information for the users */
  contacts?: UserPreferencesContact[];
}
interface UserPreferencesWebhookValue {
  field: 'user_preferences';
  value: UserPreferencesValue;
}
//#endregion
//#region src/core/webhook/types/partner.d.ts
/**
 * Partner solution event types.
 * Known value: "SOLUTION_CREATED"
 */
type PartnerSolutionEvent = 'SOLUTION_CREATED' | string;
/**
 * Partner solution status values.
 * Known value: "INITIATED"
 */
type PartnerSolutionStatus = 'INITIATED' | string;
interface PartnerSolutionsValue {
  /** Type of partner solution event */
  event: PartnerSolutionEvent;
  /** Unique identifier for the partner solution */
  solution_id: string;
  /** Current status of the partner solution */
  solution_status: PartnerSolutionStatus;
}
interface PartnerSolutionsWebhookValue {
  field: 'partner_solutions';
  value: PartnerSolutionsValue;
}
//#endregion
//#region src/core/webhook/types/payments.d.ts
interface PaymentConfigurationUpdateValue {
  /** Name of the payment configuration */
  configuration_name: string;
  /** Payment provider name (e.g. "razorpay") */
  provider_name: string;
  /** Merchant ID assigned by the payment provider */
  provider_mid: string;
  /**
   * Current status of the payment configuration.
   * Known values: "Needs Testing"
   */
  status: string;
  /** Unix timestamp of when the configuration was created */
  created_timestamp: number;
  /** Unix timestamp of when the configuration was last updated */
  updated_timestamp: number;
}
interface PaymentConfigurationUpdateWebhookValue {
  field: 'payment_configuration_update';
  value: PaymentConfigurationUpdateValue;
}
//#endregion
//#region src/core/webhook/types/phoneNumber.d.ts
/**
 * Phone number name update decision
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#phone-number-updates
 */
type PhoneNumberDecision = 'APPROVED' | 'REJECTED' | 'DEFERRED';
interface PhoneNumberNameUpdateValue {
  display_phone_number: string;
  decision: PhoneNumberDecision;
  requested_verified_name: string;
  rejection_reason: string | null;
}
interface PhoneNumberNameUpdateWebhookValue {
  field: 'phone_number_name_update';
  value: PhoneNumberNameUpdateValue;
}
/**
 * Phone number quality events
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--event
 */
type PhoneNumberQualityEvent = 'FLAGGED' | 'UNFLAGGED' | 'UPGRADE' | 'DOWNGRADE' | 'ONBOARDING';
/**
 * Messaging tier limits
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--current_limit
 */
type CurrentLimit = 'TIER_50' | 'TIER_250' | 'TIER_1K' | 'TIER_10K' | 'TIER_100K' | 'TIER_UNLIMITED';
interface PhoneNumberQualityUpdateValue {
  display_phone_number: string;
  event: PhoneNumberQualityEvent;
  current_limit: CurrentLimit;
}
interface PhoneNumberQualityUpdateWebhookValue {
  field: 'phone_number_quality_update';
  value: PhoneNumberQualityUpdateValue;
}
//#endregion
//#region src/core/webhook/types/security.d.ts
/**
 * Two-step verification security events
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--event
 */
type SecurityEvent = 'PIN_CHANGED' | 'PIN_RESET_REQUEST' | 'PIN_RESET_SUCCESS';
interface SecurityValue {
  event: SecurityEvent;
  requester?: string;
}
interface SecurityWebhookValue {
  field: 'security';
  value: SecurityValue;
}
//#endregion
//#region src/core/webhook/types/status.d.ts
interface StatusWebhook {
  id: string;
  status: 'sent' | 'delivered' | 'read' | 'failed';
  timestamp: string;
  recipient_id: string;
  recipient_type?: 'group';
  recipient_participant_id?: string;
  recipient_identity_key_hash?: string;
  biz_opaque_callback_data?: string;
  conversation?: {
    id: string;
    expiration_timestamp?: string;
    origin: {
      type: 'authentication' | 'authentication_international' | 'marketing' | 'marketing_lite' | 'referral_conversion' | 'service' | 'utility';
    };
  };
  pricing?: {
    billable: boolean;
    pricing_model: 'CBP' | 'PMP';
    type: 'regular' | 'free_customer_service' | 'free_entry_point';
    category: 'authentication' | 'authentication_international' | 'marketing' | 'marketing_lite' | 'referral_conversion' | 'service' | 'utility';
  };
  errors?: Array<WebhookError>;
}
//#endregion
//#region src/core/webhook/types/template.d.ts
/**
 * Message template status events
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--event
 */
type TemplateStatusEvent = 'APPROVED' | 'REJECTED' | 'PENDING' | 'DISABLED' | 'REINSTATED' | 'IN_APPEAL' | 'FLAGGED' | 'PAUSED' | 'PENDING_DELETION';
/**
 * Template rejection reasons
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--reason
 */
type TemplateRejectionReason = 'NONE' | 'ABUSIVE_CONTENT' | 'INCORRECT_CATEGORY' | 'INVALID_FORMAT' | 'SCAM';
interface TemplateDisableInfo {
  disable_date: string;
}
interface TemplatePauseInfo {
  title: string;
  description: string;
}
interface MessageTemplateStatusUpdateValue {
  event: TemplateStatusEvent;
  message_template_id: number;
  message_template_name: string;
  message_template_language: string;
  reason: TemplateRejectionReason | null;
  disable_info?: TemplateDisableInfo;
  other_info?: TemplatePauseInfo;
}
interface MessageTemplateStatusUpdateWebhookValue {
  field: 'message_template_status_update';
  value: MessageTemplateStatusUpdateValue;
}
/**
 * Template categories
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--event
 */
type TemplateCategory = 'MARKETING' | 'OTP' | 'TRANSACTIONAL' | 'AUTHENTICATION' | 'UTILITY';
interface TemplateCategoryUpdateValue {
  message_template_id: number;
  message_template_name: string;
  message_template_language: string;
  previous_category: TemplateCategory;
  new_category: TemplateCategory;
}
interface TemplateCategoryUpdateWebhookValue {
  field: 'template_category_update';
  value: TemplateCategoryUpdateValue;
}
/**
 * Template quality scores
 * @see https://developers.facebook.com/docs/whatsapp/business-management-api/webhooks/components#value--event
 */
type TemplateQualityScore = 'GREEN' | 'YELLOW' | 'RED' | 'UNKNOWN';
interface MessageTemplateQualityUpdateValue {
  previous_quality_score: TemplateQualityScore;
  new_quality_score: TemplateQualityScore;
  message_template_id: number;
  message_template_name: string;
  message_template_language: string;
}
interface MessageTemplateQualityUpdateWebhookValue {
  field: 'message_template_quality_update';
  value: MessageTemplateQualityUpdateValue;
}
interface MessageTemplateComponentsUpdateValue {
  /** Numeric ID of the message template */
  message_template_id: number;
  /** Name of the message template */
  message_template_name: string;
  /** Language code of the message template (e.g. "en_US") */
  message_template_language: string;
  /** Event describing what changed */
  event: string;
  [key: string]: unknown;
}
interface MessageTemplateComponentsUpdateWebhookValue {
  field: 'message_template_components_update';
  value: MessageTemplateComponentsUpdateValue;
}
interface TemplateCorrectCategoryDetectionValue {
  /** Numeric ID of the affected message template */
  message_template_id: number;
  /** Name of the affected message template */
  message_template_name: string;
  /** Language code of the affected message template (e.g. "en_US") */
  message_template_language: string;
  /** The category WhatsApp determined the template should belong to */
  suggested_category: TemplateCategory;
  /** The template's current (approved) category */
  current_category: TemplateCategory;
}
interface TemplateCorrectCategoryDetectionWebhookValue {
  field: 'template_correct_category_detection';
  value: TemplateCorrectCategoryDetectionValue;
}
//#endregion
//#region src/core/webhook/types/index.d.ts
/**
 * Webhook value for incoming messages
 */
interface MessageWebhookValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  contacts: Array<WebhookContact>;
  messages: Array<WhatsAppMessage>;
}
/**
 * Webhook value for status updates
 */
interface StatusWebhookValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  statuses: Array<StatusWebhook>;
}
/**
 * Webhook value for errors (no contacts or messages)
 */
interface ErrorWebhookValue {
  messaging_product: 'whatsapp';
  metadata: WebhookMetadata;
  errors: Array<WebhookError>;
}
/**
 * Union type for all webhook value types
 */
type WebhookValue = MessageWebhookValue | StatusWebhookValue | ErrorWebhookValue;
/**
 * Union type for all webhook field values
 */
type WebhookFieldValue = AccountUpdateWebhookValue | AccountReviewUpdateWebhookValue | AccountAlertsWebhookValue | AccountSettingsUpdateWebhookValue | AutomaticEventsWebhookValue | BusinessCapabilityUpdateWebhookValue | BusinessStatusUpdateWebhookValue | CallsWebhookValue | FlowsWebhookValue | GroupLifecycleUpdateWebhookValue | GroupParticipantsUpdateWebhookValue | GroupSettingsUpdateWebhookValue | GroupStatusUpdateWebhookValue | HistoryWebhookValue | MessageEchoesWebhookValue | MessageTemplateComponentsUpdateWebhookValue | MessageTemplateQualityUpdateWebhookValue | MessageTemplateStatusUpdateWebhookValue | MessagingHandoversWebhookValue | PartnerSolutionsWebhookValue | PaymentConfigurationUpdateWebhookValue | PhoneNumberNameUpdateWebhookValue | PhoneNumberQualityUpdateWebhookValue | SecurityWebhookValue | SmbAppStateSyncWebhookValue | SmbMessageEchoesWebhookValue | StandbyWebhookValue | TemplateCategoryUpdateWebhookValue | TemplateCorrectCategoryDetectionWebhookValue | TrackingEventsWebhookValue | UserPreferencesWebhookValue;
interface WebhookPayload {
  object: 'whatsapp_business_account';
  entry: Array<{
    id: string;
    changes: Array<{
      value: WebhookValue;
      field: 'messages';
    } | WebhookFieldValue>;
  }>;
}
/**
 * @deprecated Use specific message types instead
 * Represents a message received through the webhook
 */
interface WebhookMessage {
  wabaId: string;
  id: string;
  from: string;
  timestamp: string;
  type: any;
  phoneNumberId: string;
  displayPhoneNumber: string;
  profileName: string;
  text?: any;
  image?: any;
  video?: any;
  audio?: any;
  document?: any;
  sticker?: any;
  location?: any;
  contacts?: any;
  interactive?: any;
  button?: any;
  order?: any;
  system?: any;
  reaction?: any;
  statuses?: StatusWebhook;
  originalData: any;
}
/**
 * Webhook event received from WhatsApp
 */
interface WebhookEvent {
  field: string;
  value: any;
  timestamp: number;
}
//#endregion
//#region src/utils/isMetaError.d.ts
type MetaErrorData = {
  message: string;
  type: string;
  code: number;
  error_data?: {
    messaging_product?: 'whatsapp';
    details?: string;
  };
  error_subcode?: number;
  fbtrace_id: string;
};
interface MetaError extends Error {
  error: MetaErrorData;
}
declare const WHATSAPP_ERROR_CODES: readonly [0, 1, 2, 3, 4, 10, 33, 100, 190, 200, 299, 368, 613, 80007, 130429, 130472, 130497, 131000, 131005, 131008, 131009, 131016, 131020, 131021, 131026, 131030, 131031, 131037, 131041, 131042, 131044, 131045, 131047, 131048, 131049, 131050, 131051, 131052, 131053, 131055, 131056, 131057, 131059, 131201, 131202, 131203, 131204, 131207, 131208, 131209, 131210, 131211, 131212, 131213, 131214, 131215, 132000, 132001, 132005, 132007, 132008, 132012, 132015, 132016, 132068, 132069, 133000, 133004, 133005, 133006, 133008, 133009, 133010, 133015, 133016, 134011, 134100, 134101, 134102, 135000, 137000, 138000, 138001, 138002, 138003, 138004, 138005, 138006, 138007, 138009, 138012, 138013, 138018, 139000, 139001, 139002, 139003, 139004, 139100, 139101, 139102, 139103, 200005, 200006, 200007, 1752041, 2388001, 2388012, 2388019, 2388040, 2388047, 2388072, 2388073, 2388091, 2388093, 2388103, 2388293, 2388299, 2494100, 2593079, 2593085, 2593107, 2593108];
type ApiPermissionErrorCode = number;
type WhatsAppErrorCode = (typeof WHATSAPP_ERROR_CODES)[number] | ApiPermissionErrorCode;
//#endregion
//#region src/api/flow/types/common.d.ts
/**
 * Enum for Flow Status
 */
declare enum FlowStatusEnum {
  Draft = "DRAFT",
  Published = "PUBLISHED",
  Throttled = "THROTTLED",
  Blocked = "BLOCKED",
  Deprecated = "DEPRECATED"
}
/**
 * Enum for Flow Categories
 */
declare enum FlowCategoryEnum {
  SignUp = "SIGN_UP",
  SignIn = "SIGN_IN",
  AppointmentBooking = "APPOINTMENT_BOOKING",
  LeadGeneration = "LEAD_GENERATION",
  ContactUs = "CONTACT_US",
  CustomerSupport = "CUSTOMER_SUPPORT",
  Survey = "SURVEY",
  Other = "OTHER"
}
declare enum FlowActionEnum {
  INIT = "INIT",
  BACK = "BACK",
  DATA_EXCHANGE = "data_exchange"
}
/**
 * Enum for Flow Types in webhook handlers
 * Used to register handlers for specific flow events
 */
declare enum FlowTypeEnum {
  /** Health check/ping requests */
  Ping = "ping",
  /** Data exchange requests */
  Change = "data_exchange",
  /** Error notification requests */
  Error = "error",
  /** Match all flow action types */
  All = "*"
}
type FlowType = (typeof FlowTypeEnum)[keyof typeof FlowTypeEnum];
/**
 * Flow Validation Error Pointer
 */
interface FlowValidationErrorPointer {
  line_start: number;
  line_end: number;
  column_start: number;
  column_end: number;
  path: string;
}
/**
 * Flow Validation Error
 */
interface FlowValidationError {
  error: string;
  error_type: string;
  message: string;
  line_start: number;
  line_end: number;
  column_start: number;
  column_end: number;
  pointers: FlowValidationErrorPointer[];
}
/**
 * Flow Item
 */
interface Flow {
  id: string;
  name: string;
  status: FlowStatusEnum;
  categories: FlowCategoryEnum[];
  validation_errors: FlowValidationError[];
}
/**
 * Pagination Cursors
 */
interface PaginationCursors {
  before: string;
  after: string;
}
/**
 * Pagination Object
 */
interface Pagination {
  cursors: PaginationCursors;
}
/**
 * Flows List Response
 */
interface FlowsListResponse {
  data: Flow[];
  paging: Pagination;
}
/**
 * Flow Asset
 */
interface FlowAsset {
  name: string;
  asset_type: string;
  download_url: string;
}
/**
 * Flow Assets Response
 */
interface FlowAssetsResponse {
  data: FlowAsset[];
  paging: Pagination;
}
/**
 * Flow Preview
 */
interface FlowPreview {
  preview_url: string;
  expires_at: string;
}
/**
 * Flow Preview Response
 */
interface FlowPreviewResponse {
  preview: FlowPreview;
  id: string;
}
/**
 * Flow Migration Result
 */
interface FlowMigrationResult {
  source_name: string;
  source_id: string;
  migrated_id: string;
}
/**
 * Flow Migration Failure
 */
interface FlowMigrationFailure {
  source_name: string;
  error_code: string;
  error_message: string;
}
/**
 * Create Flow Response
 */
interface CreateFlowResponse {
  id: string;
  success: boolean;
  validation_errors?: FlowValidationError[];
}
/**
 * Update Flow Response
 */
interface UpdateFlowResponse {
  success: boolean;
  validation_errors?: FlowValidationError[];
}
/**
 * Flow Migration Response
 */
interface FlowMigrationResponse {
  migrated_flows: FlowMigrationResult[];
  failed_flows: FlowMigrationFailure[];
}
/**
 * Validate Flow JSON Response
 */
interface ValidateFlowJsonResponse {
  valid: boolean;
  success: boolean;
  validation_errors?: FlowValidationError[];
}
/**
 * WhatsApp Flow Endpoint - Encrypted Request Payload
 * Represents the raw encrypted data received from WhatsApp
 */
interface FlowEncryptedRequestPayload {
  encrypted_aes_key: string;
  encrypted_flow_data: string;
  initial_vector: string;
}
/**
 * WhatsApp Flow Endpoint - Decrypted Request Response
 * Represents the successfully decrypted data and encryption keys
 */
interface FlowDecryptedRequestResponse {
  decryptedBody: any;
  aesKeyBuffer: Buffer;
  initialVectorBuffer: Buffer;
}
/**
 * WhatsApp Flow Endpoint - HTTP Request with Body
 * Represents an HTTP request with the encrypted payload
 */
interface FlowHttpRequest extends IncomingMessage {
  body: FlowEncryptedRequestPayload;
  headers: IncomingHttpHeaders;
}
/**
 * WhatsApp Flow Endpoint - Health Check Request
 * Represents the structure of a health check request
 */
interface FlowHealthCheckRequest {
  action: 'ping';
  version: '3.0';
}
/**
 * WhatsApp Flow Endpoint - Health Check Response
 * The expected response structure for health check requests
 */
interface FlowHealthCheckResponse {
  data: {
    status: 'active';
  };
}
/**
 * WhatsApp Flow Endpoint - Data Exchange Request
 * Represents the structure of a data exchange request
 */
interface FlowDataExchangeRequest {
  version: '3.0';
  action: FlowActionEnum;
  screen: string;
  flow_token: string;
  data?: Record<string, any> & {
    error_message?: string;
  };
}
/**
 * WhatsApp Flow Endpoint - Data Exchange Response
 * The expected response structure for data exchange requests
 */
interface FlowDataExchangeResponse {
  screen?: string;
  data?: Record<string, any | {
    error_message?: string;
  }>;
}
/**
 * WhatsApp Flow Endpoint - Success Screen Response
 * The expected response structure for success screen requests
 */
interface FlowSuccessScreenResponse {
  screen: 'SUCCESS';
  data: {
    extension_message_response?: {
      params?: {
        flow_token: string;
        [key: string]: string;
      };
    };
  };
}
/**
 * WhatsApp Flow Endpoint - Error Notification Request
 * Represents the structure of an error notification request
 */
interface FlowErrorNotificationRequest {
  version: '3.0';
  action: Exclude<FlowActionEnum, FlowActionEnum.BACK>;
  screen: string;
  flow_token: string;
  data: {
    error: string;
    error_message: string;
  };
}
/**
 * WhatsApp Flow Endpoint - Error Notification Response
 * The expected response structure for error notification requests
 */
interface FlowErrorNotificationResponse {
  acknowledged: boolean;
}
/**
 * WhatsApp Flow Endpoint - Comprehensive Request Object
 * A combined type that includes all possible fields from different request types
 * with all fields being optional for flexibility
 */
interface FlowEndpointRequest {
  version?: '3.0';
  action?: 'ping' | FlowActionEnum;
  screen?: string;
  flow_token?: string;
  data?: Record<string, any> & {
    error_key?: string;
    error_message?: string;
  };
}
/**
 * WhatsApp Flow Endpoint - Response
 * Union type for all possible response types from a Flow endpoint
 */
type FlowEndpointResponse = FlowHealthCheckResponse | FlowDataExchangeResponse | FlowErrorNotificationResponse | FlowSuccessScreenResponse;
interface FlowClass {
  /**
   * List Flows
   *
   * @param wabaId - The WABA ID
   * @returns Promise with the list of flows
   */
  listFlows(wabaId: string): Promise<FlowsListResponse>;
  /**
   * Create Flow
   *
   * @param wabaId - The WABA ID
   * @param data - The flow data including name, categories, endpoint_uri, and optional clone_flow_id
   * @returns Promise with the created flow ID
   */
  createFlow(wabaId: string, data: {
    name: string;
    categories?: FlowCategoryEnum[];
    endpoint_uri?: string;
    clone_flow_id?: string;
    flow_json?: string;
    publish?: boolean;
  }): Promise<CreateFlowResponse>;
  /**
   * Get Flow
   *
   * @param flowId - The flow ID
   * @param fields - Optional fields to return
   * @param dateFormat - Optional date format
   * @returns Promise with the flow details
   */
  getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<Flow | FlowPreviewResponse>;
  /**
   * Update Flow Metadata
   *
   * @param flowId - The flow ID
   * @param data - The flow metadata to update
   * @returns Promise with the success status
   */
  updateFlowMetadata(flowId: string, data: {
    name?: string;
    categories?: FlowCategoryEnum[];
    endpoint_uri?: string;
    application_id?: string;
  }): Promise<ResponseSuccess>;
  /**
   * Delete Flow
   *
   * @param flowId - The flow ID
   * @returns Promise with the success status
   */
  deleteFlow(flowId: string): Promise<ResponseSuccess>;
  /**
   * List Assets (Get Flow JSON URL)
   *
   * @param flowId - The flow ID
   * @returns Promise with the list of assets
   */
  listAssets(flowId: string): Promise<FlowAssetsResponse>;
  /**
   * Update Flow JSON
   *
   * @param flowId - The flow ID
   * @param data - The asset data including asset_type, file, and name
   * @returns Promise with the success status and validation errors
   */
  updateFlowJson(flowId: string, data: {
    file: Blob | Buffer | object;
    name?: string;
  }): Promise<UpdateFlowResponse>;
  /**
   * Validate Flow JSON by attempting an update without publishing.
   * This is a convenience method; the API doesn't have a dedicated validation endpoint.
   *
   * @param flowId - The ID of the Flow (must exist, can be in DRAFT status).
   * @param flowJsonData - The Flow JSON content as a Buffer, JSON object, or Blob.
   * @returns Promise indicating if the JSON is valid and includes validation errors if any.
   */
  validateFlowJson(flowId: string, flowJsonData: Blob | Buffer | object): Promise<ValidateFlowJsonResponse>;
  /**
   * Publish Flow
   *
   * @param flowId - The flow ID
   * @returns Promise with the success status
   */
  publishFlow(flowId: string): Promise<ResponseSuccess>;
  /**
   * Deprecate Flow
   *
   * @param flowId - The flow ID
   * @returns Promise with the success status
   */
  deprecateFlow(flowId: string): Promise<ResponseSuccess>;
  /**
   * Migrate Flows
   *
   * @param wabaId - The destination WABA ID
   * @param data - The migration data including source_waba_id and optional source_flow_names
   * @returns Promise with migration results
   */
  migrateFlows(wabaId: string, data: {
    source_waba_id: string;
    source_flow_names?: string[];
  }): Promise<FlowMigrationResponse>;
}
//#endregion
//#region src/types/constants.d.ts
/**
 * As-const alternatives to enums.
 *
 * Every enum in enums.ts gets a matching `as const` object and a union type here.
 * Use whichever style you prefer:
 *   - Enum:  CategoryEnum.Marketing
 *   - Const: Category.Marketing  (value: 'MARKETING')
 *   - Type:  CategoryType        (union: 'AUTHENTICATION' | 'MARKETING' | 'UTILITY')
 */
declare const Category: {
  readonly Authentication: "AUTHENTICATION";
  readonly Marketing: "MARKETING";
  readonly Utility: "UTILITY";
};
type CategoryType = (typeof Category)[keyof typeof Category];
declare const TemplateStatus: {
  readonly Approved: "APPROVED";
  readonly Pending: "PENDING";
  readonly Rejected: "REJECTED";
};
type TemplateStatusType = (typeof TemplateStatus)[keyof typeof TemplateStatus];
declare const HttpMethods: {
  readonly Get: "GET";
  readonly Post: "POST";
  readonly Put: "PUT";
  readonly Delete: "DELETE";
};
type HttpMethodsType = (typeof HttpMethods)[keyof typeof HttpMethods];
declare const MessageTypes: {
  readonly Audio: "audio";
  readonly Contacts: "contacts";
  readonly Document: "document";
  readonly Image: "image";
  readonly Interactive: "interactive";
  readonly Location: "location";
  readonly Reaction: "reaction";
  readonly Sticker: "sticker";
  readonly Template: "template";
  readonly Text: "text";
  readonly Video: "video";
  readonly Button: "button";
  readonly Order: "order";
  readonly System: "system";
  readonly Unsupported: "unsupported";
  readonly Unknown: "unknown"; /** @deprecated Use WebhookProcessor.onStatus() instead */
  readonly Statuses: "statuses";
  readonly All: "*";
};
type MessageTypesType = (typeof MessageTypes)[keyof typeof MessageTypes];
declare const ParametersTypes: {
  readonly Action: "ACTION";
  readonly CouponCode: "COUPON_CODE";
  readonly Currency: "CURRENCY";
  readonly DateTime: "DATE_TIME";
  readonly Document: "DOCUMENT";
  readonly ExpirationTimeMs: "EXPIRATION_TIME_MS";
  readonly Image: "IMAGE";
  readonly LimitedTimeOffer: "LIMITED_TIME_OFFER";
  readonly Location: "LOCATION";
  readonly OrderStatus: "ORDER_STATUS";
  readonly Payload: "PAYLOAD";
  readonly Product: "PRODUCT";
  readonly Text: "TEXT";
  readonly TtlMinutes: "TTL_MINUTES";
  readonly Video: "VIDEO";
  readonly WebviewInteraction: "WEBVIEW_INTERACTION";
  readonly WebviewPresentation: "WEBVIEW_PRESENTATION";
};
type ParametersTypesType = (typeof ParametersTypes)[keyof typeof ParametersTypes];
declare const InteractiveTypes: {
  readonly Button: "button";
  readonly List: "list";
  readonly Product: "product";
  readonly ProductList: "product_list";
  readonly CtaUrl: "cta_url";
  readonly Carousel: "carousel";
  readonly LocationRequest: "location_request_message";
  readonly AddressMessage: "address_message";
  readonly Flow: "flow";
};
type InteractiveTypesType = (typeof InteractiveTypes)[keyof typeof InteractiveTypes];
declare const ButtonPosition: {
  readonly First: 1;
  readonly Second: 2;
  readonly Third: 3;
  readonly Fourth: 4;
  readonly Fifth: 5;
};
type ButtonPositionType = (typeof ButtonPosition)[keyof typeof ButtonPosition];
declare const SubType: {
  readonly Catalog: "CATALOG";
  readonly CopyCode: "COPY_CODE";
  readonly Flow: "FLOW";
  readonly Mpm: "MPM";
  readonly OrderDetails: "ORDER_DETAILS";
  readonly QuickReply: "QUICK_REPLY";
  readonly Reminder: "REMINDER";
  readonly Url: "URL";
  readonly VoiceCall: "VOICE_CALL";
};
type SubTypeType = (typeof SubType)[keyof typeof SubType];
declare const ComponentType: {
  readonly Header: "HEADER";
  readonly Body: "BODY";
  readonly Button: "BUTTON";
  readonly Footer: "FOOTER";
};
type ComponentTypeType = (typeof ComponentType)[keyof typeof ComponentType];
declare const ConversationTypes: {
  readonly BusinessInitiated: "business_initiated";
  readonly CustomerInitiated: "customer_initiated";
  readonly ReferralConversion: "referral_conversion";
};
type ConversationTypesType = (typeof ConversationTypes)[keyof typeof ConversationTypes];
declare const Status: {
  readonly Delivered: "delivered";
  readonly Read: "read";
  readonly Sent: "sent";
};
type StatusType = (typeof Status)[keyof typeof Status];
declare const VideoMediaTypes: {
  readonly Mp4: "video/mp4";
  readonly Threegp: "video/3gp";
};
type VideoMediaTypesType = (typeof VideoMediaTypes)[keyof typeof VideoMediaTypes];
declare const StickerMediaTypes: {
  readonly Webp: "image/webp";
};
type StickerMediaTypesType = (typeof StickerMediaTypes)[keyof typeof StickerMediaTypes];
declare const ImageMediaTypes: {
  readonly Jpeg: "image/jpeg";
  readonly Png: "image/png";
};
type ImageMediaTypesType = (typeof ImageMediaTypes)[keyof typeof ImageMediaTypes];
declare const DocumentMediaTypes: {
  readonly Text: "text/plain";
  readonly Pdf: "application/pdf";
  readonly Ppt: "application/vnd.ms-powerpoint";
  readonly Word: "application/msword";
  readonly Excel: "application/vnd.ms-excel";
  readonly OpenDoc: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
  readonly OpenPres: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
  readonly OpenSheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
};
type DocumentMediaTypesType = (typeof DocumentMediaTypes)[keyof typeof DocumentMediaTypes];
declare const AudioMediaTypes: {
  readonly Aac: "audio/aac";
  readonly Mp4: "audio/mp4";
  readonly Mpeg: "audio/mpeg";
  readonly Amr: "audio/amr";
  readonly Ogg: "audio/ogg";
};
type AudioMediaTypesType = (typeof AudioMediaTypes)[keyof typeof AudioMediaTypes];
declare const WebhookTypes: {
  readonly Audio: "audio";
  readonly Button: "button";
  readonly Document: "document";
  readonly Text: "text";
  readonly Image: "image";
  readonly Interactive: "interactive";
  readonly Order: "order";
  readonly Sticker: "sticker";
  readonly System: "system";
  readonly Unknown: "unknown";
  readonly Video: "video";
};
type WebhookTypesType = (typeof WebhookTypes)[keyof typeof WebhookTypes];
declare const SystemChangeTypes: {
  readonly CustomerChangedNumber: "customer_changed_number";
  readonly CustomerIdentityChanged: "customer_identity_changed";
};
type SystemChangeTypesType = (typeof SystemChangeTypes)[keyof typeof SystemChangeTypes];
declare const ReferralSourceTypes: {
  readonly Ad: "ad";
  readonly Post: "post";
};
type ReferralSourceTypesType = (typeof ReferralSourceTypes)[keyof typeof ReferralSourceTypes];
declare const RequestCodeMethods: {
  readonly Sms: "SMS";
  readonly Voice: "VOICE";
};
type RequestCodeMethodsType = (typeof RequestCodeMethods)[keyof typeof RequestCodeMethods];
declare const Languages: {
  readonly Afrikaans: "af";
  readonly Albanian: "sq";
  readonly Arabic: "ar";
  readonly Azerbaijani: "az";
  readonly Bengali: "bn";
  readonly Bulgarian: "bg";
  readonly Catalan: "ca";
  readonly Chinese_CHN: "zh_CN";
  readonly Chinese_HKG: "zh_HK";
  readonly Chinese_TAI: "zh_TW";
  readonly Croatian: "hr";
  readonly Czech: "cs";
  readonly Danish: "da";
  readonly Dutch: "nl";
  readonly English: "en";
  readonly English_UK: "en_GB";
  readonly English_US: "en_US";
  readonly Estonian: "et";
  readonly Filipino: "fil";
  readonly Finnish: "fi";
  readonly French: "fr";
  readonly Georgian: "ka";
  readonly German: "de";
  readonly Greek: "el";
  readonly Gujarati: "gu";
  readonly Hausa: "ha";
  readonly Hebrew: "he";
  readonly Hindi: "hi";
  readonly Hungarian: "hu";
  readonly Indonesian: "id";
  readonly Irish: "ga";
  readonly Italian: "it";
  readonly Japanese: "ja";
  readonly Kannada: "kn";
  readonly Kazakh: "kk";
  readonly Kinyarwanda: "rw_RW";
  readonly Korean: "ko";
  readonly Kyrgyz_Kyrgyzstan: "ky_KG";
  readonly Lao: "lo";
  readonly Latvian: "lv";
  readonly Lithuanian: "lt";
  readonly Macedonian: "mk";
  readonly Malay: "ms";
  readonly Malayalam: "ml";
  readonly Marathi: "mr";
  readonly Norwegian: "nb";
  readonly Persian: "fa";
  readonly Polish: "pl";
  readonly Portuguese_BR: "pt_BR";
  readonly Portuguese_POR: "pt_PT";
  readonly Punjabi: "pa";
  readonly Romanian: "ro";
  readonly Russian: "ru";
  readonly Serbian: "sr";
  readonly Slovak: "sk";
  readonly Slovenian: "sl";
  readonly Spanish: "es";
  readonly Spanish_ARG: "es_AR";
  readonly Spanish_SPA: "es_ES";
  readonly Spanish_MEX: "es_MX";
  readonly Swahili: "sw";
  readonly Swedish: "sv";
  readonly Tamil: "ta";
  readonly Telugu: "te";
  readonly Thai: "th";
  readonly Turkish: "tr";
  readonly Ukrainian: "uk";
  readonly Urdu: "ur";
  readonly Uzbek: "uz";
  readonly Vietnamese: "vi";
  readonly Zulu: "zu";
};
type LanguagesType = (typeof Languages)[keyof typeof Languages];
declare const DataLocalizationRegion: {
  readonly AU: "AU";
  readonly ID: "ID";
  readonly IN: "IN";
  readonly JP: "JP";
  readonly SG: "SG";
  readonly KR: "KR";
  readonly DE: "DE";
  readonly CH: "CH";
  readonly GB: "GB";
  readonly BR: "BR";
  readonly BH: "BH";
  readonly ZA: "ZA";
  readonly AE: "AE";
  readonly CA: "CA";
};
type DataLocalizationRegionType = (typeof DataLocalizationRegion)[keyof typeof DataLocalizationRegion];
//#endregion
//#region src/types/httpsClient.d.ts
type ResponseHeaderValue = string | string[] | undefined;
type ResponseHeaders = Record<string, ResponseHeaderValue>;
type ResponseJSONBody = Record<string, unknown>;
declare class HttpsClientResponseClass {
  constructor(resp: Response);
  statusCode: () => number;
  headers: () => ResponseHeaders;
  rawResponse: () => Response;
  json: () => Promise<ResponseJSONBody>;
}
declare class HttpsClientClass {
  constructor();
  clearSockets: () => boolean;
  sendRequest: (host: string, path: string, method: HttpMethodsEnum, headers: HeadersInit, timeout: number, body?: BodyInit | null) => Promise<HttpsClientResponseClass>;
}
//#endregion
//#region src/types/logger.d.ts
interface LoggerInterface {
  log(...data: any[]): void;
  error(...data: any[]): void;
  warn(...data: any[]): void;
  info(...data: any[]): void;
  debug(...data: any[]): void;
}
//#endregion
export { type AcceptCallRequest, type AccountMode, type ApiPermissionErrorCode, type AudioMediaObject, AudioMediaTypes, AudioMediaTypesEnum, AudioMediaTypesType, type AudioMessage, type AuthenticationTemplateOptions, type BaseClass, type BlockUsersClass, type BlockUsersResponse, type BlockedUserInfo, type BodyOptions, type BusinessProfileClass, type BusinessProfileData, type BusinessProfileField, type BusinessProfileFieldsParam, type BusinessProfileResponse, BusinessVerticalEnum, type ButtonMessage, type ButtonOptions, ButtonPosition, ButtonPositionEnum, ButtonPositionType, type CallAction, type CallActionResponse, type CallHours, type CallHoursDay, type CallHoursStatus, type CallIconVisibility, type CallPermission, type CallPermissionAction, type CallPermissionLimit, type CallPermissionsResponse, type CallSdpType, type CallSession, type CallbackPermissionStatus, type CallingClass, type CallingSettings, type CallingSettingsResponse, type CallingStatus, type CarouselCard, type CarouselOptions, type CatalogButton, type CatalogTemplateOptions, Category, CategoryEnum, CategoryType, type CodeVerificationStatus, type CommerceClass, type CommerceSetting, type CommerceSettingsResponse, ComponentType, ComponentTypeType, type ComponentTypes, ComponentTypesEnum, type ContactObject, type ContactsMessage, ConversationTypes, ConversationTypesEnum, ConversationTypesType, type CopyCodeButton, type CouponTemplateOptions, CreateFlowResponse, type CreateQrCodeRequest, CurrencyCodesEnum, type CurrencyParameter, type Cursors, DataLocalizationRegion, DataLocalizationRegionEnum, DataLocalizationRegionType, type DateTimeParameter, type DocumentMediaObject, DocumentMediaTypes, DocumentMediaTypesEnum, DocumentMediaTypesType, type DocumentMessage, type EncryptionPublicKeyResponse, type ErrorWebhookValue, type FailedUserInfo, type Flow, FlowActionEnum, type FlowAsset, type FlowAssetsResponse, type FlowButton, FlowCategoryEnum, type FlowClass, type FlowDataExchangeRequest, type FlowDataExchangeResponse, type FlowDecryptedRequestResponse, type FlowEncryptedRequestPayload, type FlowEndpointRequest, type FlowEndpointResponse, type FlowErrorNotificationRequest, type FlowErrorNotificationResponse, type FlowHealthCheckRequest, type FlowHealthCheckResponse, type FlowHttpRequest, type FlowMigrationFailure, type FlowMigrationResponse, type FlowMigrationResult, type FlowPreview, type FlowPreviewResponse, FlowStatusEnum, type FlowSuccessScreenResponse, type FlowType, FlowTypeEnum, type FlowValidationError, type FlowValidationErrorPointer, type FlowsListResponse, type FooterOptions, type GeneralHeaderInterface, type GeneralMessageBody, type GeneralRequestBody, type GroupCreateRequest, type GroupCreateResponse, type GroupInfoField, type GroupInfoFieldsParam, type GroupInfoResponse, type GroupInviteLinkResponse, type GroupJoinApprovalMode, type GroupJoinRequest, type GroupJoinRequestError, type GroupJoinRequestFailure, type GroupJoinRequestsActionResponse, type GroupJoinRequestsResponse, type GroupListParams, type GroupListResponse, type GroupMessage, type GroupParticipant, type GroupSettingsResponse, type GroupsClass, type HeaderOptions, type HealthStatus, type HealthStatusEntity, type HolidaySchedule, type HostPlatform, HttpMethods, HttpMethodsEnum, HttpMethodsType, type HttpsClientClass, type HttpsClientResponseClass, type ImageMediaObject, ImageMediaTypes, ImageMediaTypesEnum, ImageMediaTypesType, type ImageMessage, type InitiateCallRequest, type InitiateCallResponse, type InteractiveButtonReplyMessage, type InteractiveListReplyMessage, type InteractiveMessage, type InteractiveObject, InteractiveTypes, InteractiveTypesEnum, InteractiveTypesType, Languages, LanguagesEnum, LanguagesType, type LimitedTimeOfferOptions, type LimitedTimeOfferTemplateOptions, type ListBlockedUsersParams, type ListBlockedUsersResponse, type LocationMessage, type LocationObject, type LocationParameter, type LoggerInterface, type MPMButton, type MPMTemplateOptions, type MarketingMessageRequest, type MarketingMessagesClass, type MediaCardCarouselTemplateOptions, type MediaCarouselCard, MediaClass, type MediaParameter, MediaResponse, MediasResponse, type MessageRecipientType, type MessageRequestBody, type MessageRequestParams, type MessageTemplateObject, MessageTypes, MessageTypesEnum, MessageTypesType, type MessageWebhookValue, type MessagesClass, type MessagesResponse, type MessagingLimitTier, type MetaError, type MetaErrorData, type MetaErrorDetail, type OTPButton, type OTPTemplateOptions, type OrderMessage, type Pagination, type PaginationCursors, type Paging, ParametersTypes, ParametersTypesEnum, ParametersTypesType, type PaymentConfiguration, type PaymentConfigurationCode, type PaymentConfigurationCreateRequest, type PaymentConfigurationCreateResponse, type PaymentConfigurationDeleteRequest, type PaymentConfigurationOauthLinkRequest, type PaymentConfigurationOauthLinkResponse, type PaymentConfigurationProvider, type PaymentConfigurationStatus, type PaymentConfigurationUpdateRequest, type PaymentConfigurationUpdateResponse, type PaymentConfigurationsResponse, type PaymentsClass, type PhoneNumberButton, type PhoneNumberClass, type PhoneNumberField, type PhoneNumberFieldsParam, type PhoneNumberFilter, type PhoneNumberResponse, type PhoneNumberSort, type PhoneNumberStatus, type PhoneNumbersListParams, type PhoneNumbersResponse, type PlatformType, type PreAcceptCallRequest, type ProductCardCarouselTemplateOptions, type ProductCarouselCard, type ProductParameter, type ProductSection, type QrCodeClass, type QrCodeResponse, type QrCodesResponse, type QualityRating, type QualityScore, type QuickReplyButton, type ReactionMessage, type ReactionParams, ReferralSourceTypes, ReferralSourceTypesEnum, ReferralSourceTypesType, type RegistrationClass, type RegistrationRequest, type RejectCallRequest, RequestCodeMethods, RequestCodeMethodsEnum, RequestCodeMethodsType, type RequestVerificationCodeRequest, type RequesterClass, type RequesterResponseInterface, type ResponseData, type ResponseHeaderValue, type ResponseHeaders, type ResponseJSONBody, type ResponsePagination, type ResponseSuccess, type SPMButton, type SPMTemplateOptions, type SipServer, type SipSettings, type SipStatus, Status, StatusEnum, type StatusParams, type StatusResponse, StatusType, type StatusWebhook, type StatusWebhookValue, type StickerMediaObject, StickerMediaTypes, StickerMediaTypesEnum, StickerMediaTypesType, type StickerMessage, SubType, SubTypeEnum, SubTypeType, SystemChangeTypes, SystemChangeTypesEnum, SystemChangeTypesType, type SystemMessage, type TemplateBody, type TemplateButton, type TemplateButtons, type TemplateCarousel, type TemplateClass, type TemplateDeleteParams, type TemplateFooter, type TemplateFormat, type TemplateGetParams, type TemplateHeader, type TemplateHeaderExample, type TemplateLimitedTimeOffer, type TemplateOptions, type TemplateParameter, type TemplateRequestBody, type TemplateResponse, TemplateStatus, TemplateStatusEnum, TemplateStatusType, type TerminateCallRequest, type TextMessage, type TextMessageParams, type TextObject, type TextParameter, type Throughput, type ThroughputLevel, type TwoStepVerificationClass, type TwoStepVerificationParams, type TwoStepVerificationRequest, type URLButton, type UnifiedCertStatus, type UnsupportedMessage, type UpdateBusinessProfileRequest, type UpdateCallingSettingsRequest, type UpdateCommerceSettingsRequest, type UpdateFlowResponse, type UpdateGroupSettingsRequest, type UpdateQrCodeRequest, type UpdateWabaSubscription, UploadMediaResponse, type ValidateFlowJsonResponse, type VerifyCodeRequest, type VideoMediaObject, VideoMediaTypes, VideoMediaTypesEnum, VideoMediaTypesType, type VideoMessage, type WABAClass, type WabaAccount, type WabaAccountFields, type WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaBusinessVerificationStatus, WabaConfigEnum, type WabaConfigType, type WabaHealthStatus, WabaHealthStatusCanSendMessage, type WabaHealthStatusEntity, type WabaHealthStatusError, type WabaSubscription, type WabaSubscriptions, type WebhookContact, type WebhookEvent, type WebhookMessage, type WebhookPayload, WebhookTypes, WebhookTypesEnum, WebhookTypesType, type WebhookValue, type WeeklyOperatingHours, type WhatsAppConfig, type WhatsAppErrorCode, type WhatsAppMessage };
//# sourceMappingURL=index.d.ts.map