meta-cloud-api 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,8 +101,7 @@ interface UploadSession {
101
101
  video?: boolean;
102
102
  }
103
103
  interface UploadSessionResponse {
104
- upload_session_id: string;
105
- video_id?: string;
104
+ id: string;
106
105
  }
107
106
  interface UploadHandle {
108
107
  handle: string;
@@ -101,8 +101,7 @@ interface UploadSession {
101
101
  video?: boolean;
102
102
  }
103
103
  interface UploadSessionResponse {
104
- upload_session_id: string;
105
- video_id?: string;
104
+ id: string;
106
105
  }
107
106
  interface UploadHandle {
108
107
  handle: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/businessProfile.ts"],"sourcesContent":["import { BusinessVerticalEnum } from './enums';\nimport { RequesterResponseInterface, ResponseSuccess } from './request';\n\nexport interface BusinessProfileData {\n /**\n * The business's About text. This text appears in the business's profile, beneath its profile image,\n * phone number, and contact buttons.\n * - String cannot be empty\n * - Strings must be between 1 and 139 characters\n * - Rendered emojis are supported however their unicode values are not.\n * Emoji unicode values must be Java- or JavaScript-escape encoded\n * - Hyperlinks can be included but will not render as clickable links\n * - Markdown is not supported\n */\n about?: string;\n /**\n * Address of the business. Character limit 256.\n */\n address?: string;\n /**\n * Description of the business. Character limit 512.\n */\n description?: string;\n /**\n * The contact email address (in valid email format) of the business. Character limit 128.\n */\n email?: string;\n /**\n * The messaging service used for the request. Always set it to \"whatsapp\" if you are using\n * the WhatsApp Business API.\n */\n messaging_product: string;\n /**\n * Profile picture URL.\n */\n profile_picture_url?: string;\n /**\n * The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.\n * - You must include the http:// or https:// portion of the URL\n * - There is a maximum of 2 websites with a maximum of 256 characters each\n */\n websites?: string[];\n /**\n * Business category. This can be either an empty string or one of the predefined business categories.\n * @see BusinessVerticalEnum for all available options\n */\n vertical?: BusinessVerticalEnum | string;\n}\n\nexport interface BusinessProfileResponse {\n data: BusinessProfileData[];\n}\n\nexport interface UpdateBusinessProfileRequest {\n /**\n * The messaging service used for the request. Always set it to \"whatsapp\" if you are using\n * the WhatsApp Business API.\n * @required\n */\n messaging_product: string;\n /**\n * The business's About text. This text appears in the business's profile, beneath its profile image,\n * phone number, and contact buttons.\n * - String cannot be empty\n * - Strings must be between 1 and 139 characters\n * - Rendered emojis are supported however their unicode values are not.\n * Emoji unicode values must be Java- or JavaScript-escape encoded\n * - Hyperlinks can be included but will not render as clickable links\n * - Markdown is not supported\n */\n about?: string;\n /**\n * Address of the business. Character limit 256.\n */\n address?: string;\n /**\n * Description of the business. Character limit 512.\n */\n description?: string;\n /**\n * Business category. This can be either an empty string or one of the predefined business categories.\n * @see BusinessVerticalEnum for all available options\n */\n vertical?: BusinessVerticalEnum | string;\n /**\n * The contact email address (in valid email format) of the business. Character limit 128.\n */\n email?: string;\n /**\n * The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.\n * - You must include the http:// or https:// portion of the URL\n * - There is a maximum of 2 websites with a maximum of 256 characters each\n */\n websites?: string[];\n /**\n * Handle of the profile picture. This handle is generated when you upload the binary file\n * for the profile picture to Meta using the Resumable Upload API.\n */\n profile_picture_handle?: string;\n}\n\nexport interface UploadSession {\n id: string;\n video?: boolean;\n}\n\nexport interface UploadSessionResponse {\n upload_session_id: string;\n video_id?: string;\n}\n\nexport interface UploadHandle {\n handle: string;\n file_size: number;\n upload_result: {\n handle_type: string;\n name: string;\n };\n}\n\nexport interface BusinessProfileClass {\n /**\n * Get your business profile.\n * @param fields Fields to be returned in the response. If not specified, all fields will be returned.\n * Possible values: about, address, description, email, profile_picture_url, websites, vertical\n */\n getBusinessProfile(fields?: string): Promise<RequesterResponseInterface<BusinessProfileResponse>>;\n\n /**\n * Update your business profile.\n * @param updateRequest The request object containing the fields to update.\n */\n updateBusinessProfile(\n updateRequest: UpdateBusinessProfileRequest,\n ): Promise<RequesterResponseInterface<ResponseSuccess>>;\n\n /**\n * Create an upload session for profile picture.\n * @param fileLength Length of the file to be uploaded in bytes.\n * @param fileType MIME type of the file (e.g., 'image/jpeg').\n * @param fileName Name of the file.\n */\n createUploadSession(\n fileLength: number,\n fileType: string,\n fileName: string,\n ): Promise<RequesterResponseInterface<UploadSessionResponse>>;\n\n /**\n * Upload media file to the upload session.\n * @param uploadId The ID of the upload session.\n * @param file The binary data of the file.\n */\n uploadMedia(uploadId: string, file: Buffer): Promise<RequesterResponseInterface<ResponseSuccess>>;\n\n /**\n * Get the upload handle information.\n * @param uploadId The ID of the upload session.\n */\n getUploadHandle(uploadId: string): Promise<RequesterResponseInterface<UploadHandle>>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["businessProfile_exports","__toCommonJS"]}
1
+ {"version":3,"sources":["../../src/types/businessProfile.ts"],"sourcesContent":["import { BusinessVerticalEnum } from './enums';\nimport { RequesterResponseInterface, ResponseSuccess } from './request';\n\nexport interface BusinessProfileData {\n /**\n * The business's About text. This text appears in the business's profile, beneath its profile image,\n * phone number, and contact buttons.\n * - String cannot be empty\n * - Strings must be between 1 and 139 characters\n * - Rendered emojis are supported however their unicode values are not.\n * Emoji unicode values must be Java- or JavaScript-escape encoded\n * - Hyperlinks can be included but will not render as clickable links\n * - Markdown is not supported\n */\n about?: string;\n /**\n * Address of the business. Character limit 256.\n */\n address?: string;\n /**\n * Description of the business. Character limit 512.\n */\n description?: string;\n /**\n * The contact email address (in valid email format) of the business. Character limit 128.\n */\n email?: string;\n /**\n * The messaging service used for the request. Always set it to \"whatsapp\" if you are using\n * the WhatsApp Business API.\n */\n messaging_product: string;\n /**\n * Profile picture URL.\n */\n profile_picture_url?: string;\n /**\n * The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.\n * - You must include the http:// or https:// portion of the URL\n * - There is a maximum of 2 websites with a maximum of 256 characters each\n */\n websites?: string[];\n /**\n * Business category. This can be either an empty string or one of the predefined business categories.\n * @see BusinessVerticalEnum for all available options\n */\n vertical?: BusinessVerticalEnum | string;\n}\n\nexport interface BusinessProfileResponse {\n data: BusinessProfileData[];\n}\n\nexport interface UpdateBusinessProfileRequest {\n /**\n * The messaging service used for the request. Always set it to \"whatsapp\" if you are using\n * the WhatsApp Business API.\n * @required\n */\n messaging_product: string;\n /**\n * The business's About text. This text appears in the business's profile, beneath its profile image,\n * phone number, and contact buttons.\n * - String cannot be empty\n * - Strings must be between 1 and 139 characters\n * - Rendered emojis are supported however their unicode values are not.\n * Emoji unicode values must be Java- or JavaScript-escape encoded\n * - Hyperlinks can be included but will not render as clickable links\n * - Markdown is not supported\n */\n about?: string;\n /**\n * Address of the business. Character limit 256.\n */\n address?: string;\n /**\n * Description of the business. Character limit 512.\n */\n description?: string;\n /**\n * Business category. This can be either an empty string or one of the predefined business categories.\n * @see BusinessVerticalEnum for all available options\n */\n vertical?: BusinessVerticalEnum | string;\n /**\n * The contact email address (in valid email format) of the business. Character limit 128.\n */\n email?: string;\n /**\n * The URLs associated with the business. For instance, a website, Facebook Page, or Instagram.\n * - You must include the http:// or https:// portion of the URL\n * - There is a maximum of 2 websites with a maximum of 256 characters each\n */\n websites?: string[];\n /**\n * Handle of the profile picture. This handle is generated when you upload the binary file\n * for the profile picture to Meta using the Resumable Upload API.\n */\n profile_picture_handle?: string;\n}\n\nexport interface UploadSession {\n id: string;\n video?: boolean;\n}\n\nexport interface UploadSessionResponse {\n id: string;\n}\n\nexport interface UploadHandle {\n handle: string;\n file_size: number;\n upload_result: {\n handle_type: string;\n name: string;\n };\n}\n\nexport interface BusinessProfileClass {\n /**\n * Get your business profile.\n * @param fields Fields to be returned in the response. If not specified, all fields will be returned.\n * Possible values: about, address, description, email, profile_picture_url, websites, vertical\n */\n getBusinessProfile(fields?: string): Promise<RequesterResponseInterface<BusinessProfileResponse>>;\n\n /**\n * Update your business profile.\n * @param updateRequest The request object containing the fields to update.\n */\n updateBusinessProfile(\n updateRequest: UpdateBusinessProfileRequest,\n ): Promise<RequesterResponseInterface<ResponseSuccess>>;\n\n /**\n * Create an upload session for profile picture.\n * @param fileLength Length of the file to be uploaded in bytes.\n * @param fileType MIME type of the file (e.g., 'image/jpeg').\n * @param fileName Name of the file.\n */\n createUploadSession(\n fileLength: number,\n fileType: string,\n fileName: string,\n ): Promise<RequesterResponseInterface<UploadSessionResponse>>;\n\n /**\n * Upload media file to the upload session.\n * @param uploadId The ID of the upload session.\n * @param file The binary data of the file.\n */\n uploadMedia(uploadId: string, file: Buffer): Promise<RequesterResponseInterface<ResponseSuccess>>;\n\n /**\n * Get the upload handle information.\n * @param uploadId The ID of the upload session.\n */\n getUploadHandle(uploadId: string): Promise<RequesterResponseInterface<UploadHandle>>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["businessProfile_exports","__toCommonJS"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meta-cloud-api",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "TypeScript SDK for WhatsApp Cloud API - simplified integration with Meta's WhatsApp Business Platform",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",