meta-cloud-api 0.2.40 → 0.2.42

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.
@@ -280,6 +280,9 @@ type SimpleTextObject = {
280
280
  text: string;
281
281
  };
282
282
  type TextParametersObject = ParametersObject<ParametersTypesEnum.Text> & SimpleTextObject;
283
+ type CouponCodeParametersObject = ParametersObject<ParametersTypesEnum.CouponCode> & {
284
+ coupon_code: string;
285
+ };
283
286
  type CurrencyObject = {
284
287
  fallback_value: string;
285
288
  code: CurrencyCodesEnum;
@@ -313,20 +316,12 @@ type VideoMediaObject = {
313
316
  type DocumentParametersObject = ParametersObject<ParametersTypesEnum.Document> & DocumentMediaObject;
314
317
  type ImageParametersObject = ParametersObject<ParametersTypesEnum.Image> & ImageMediaObject;
315
318
  type VideoParametersObject = ParametersObject<ParametersTypesEnum.Video> & VideoMediaObject;
316
- type QuickReplyButtonParametersObject = {
317
- type: ParametersTypesEnum.Payload;
318
- payload: string;
319
- };
320
- type URLButtonParametersObject = SimpleTextObject & {
321
- type: ParametersTypesEnum.Text;
322
- };
323
- type ButtonParameterObject = QuickReplyButtonParametersObject | URLButtonParametersObject;
324
319
  type ComponentObject<T extends ComponentTypesEnum> = {
325
320
  type: T;
326
- parameters: (CurrencyParametersObject | DateTimeParametersObject | DocumentParametersObject | ImageParametersObject | TextParametersObject | VideoParametersObject)[];
321
+ parameters: (CurrencyParametersObject | DateTimeParametersObject | DocumentParametersObject | ImageParametersObject | TextParametersObject | VideoParametersObject | CouponCodeParametersObject)[];
327
322
  };
328
323
  type ButtonComponentObject = ComponentObject<ComponentTypesEnum.Button> & {
329
- parameters: ButtonParameterObject;
324
+ parameters: Array<ParametersTypesEnum>;
330
325
  sub_type: SubTypeEnum;
331
326
  index: ButtonPositionEnum;
332
327
  };
@@ -1,7 +1,7 @@
1
1
  import { WabaConfigType, WhatsAppConfig } from './shared/types/config.js';
2
2
  import { M as MessageTypesEnum } from './enums-DvwSJq9w.js';
3
3
  import { g as FlowEndpointRequest, n as FlowTypeEnum } from './FlowApi-CASVC-Al.js';
4
- import { W as WhatsApp } from './index-BJ5dLlEF.js';
4
+ import { W as WhatsApp } from './index-DiCI1vEz.js';
5
5
 
6
6
  interface WebhookContact {
7
7
  /**
@@ -1,12 +1,12 @@
1
- export { F as FlowHandler, M as MessageStatus, W as WebhookContact, a as WebhookEvent, c as WebhookHandler, b as WebhookMessage, e as WebhookRequest, f as WebhookResponse, p as processFlowRequest, d as processWebhookMessages, v as verifyWebhook } from '../../WebhookHandler-ZZQSTfZb.js';
1
+ export { F as FlowHandler, M as MessageStatus, W as WebhookContact, a as WebhookEvent, c as WebhookHandler, b as WebhookMessage, e as WebhookRequest, f as WebhookResponse, p as processFlowRequest, d as processWebhookMessages, v as verifyWebhook } from '../../WebhookHandler-DQKQAFVn.js';
2
2
  import '../../shared/types/config.js';
3
3
  import '../../enums-DvwSJq9w.js';
4
4
  import '../../FlowApi-CASVC-Al.js';
5
5
  import '../../base-BhCbbsxB.js';
6
- import '../../index-BJ5dLlEF.js';
6
+ import '../../index-DiCI1vEz.js';
7
7
  import '../../EncryptionApi-PHxeI2G_.js';
8
8
  import '../../MediaApi-B2vtjiCm.js';
9
- import '../../MessageApi-B5xedsTj.js';
9
+ import '../../MessageApi-ptFlWg3O.js';
10
10
  import '../../PhoneNumberApi-DMb_G3uw.js';
11
11
  import '../../BusinessProfileApi-DE7Nnuy_.js';
12
12
  import '../../QrCodeApi-D3rVKuxV.js';
@@ -1,11 +1,11 @@
1
- export { W as WhatsApp, d as WhatsAppClass } from '../../index-BJ5dLlEF.js';
1
+ export { W as WhatsApp, d as WhatsAppClass } from '../../index-DiCI1vEz.js';
2
2
  import '../../EncryptionApi-PHxeI2G_.js';
3
3
  import '../../base-BhCbbsxB.js';
4
4
  import '../../shared/types/config.js';
5
5
  import '../../enums-DvwSJq9w.js';
6
6
  import '../../FlowApi-CASVC-Al.js';
7
7
  import '../../MediaApi-B2vtjiCm.js';
8
- import '../../MessageApi-B5xedsTj.js';
8
+ import '../../MessageApi-ptFlWg3O.js';
9
9
  import '../../PhoneNumberApi-DMb_G3uw.js';
10
10
  import '../../BusinessProfileApi-DE7Nnuy_.js';
11
11
  import '../../QrCodeApi-D3rVKuxV.js';
@@ -1,5 +1,5 @@
1
- import { M as MessagesApi } from '../../MessageApi-B5xedsTj.js';
2
- export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, b as MessageRequestParams, d as MessageTemplateObject, c as MessagesResponse, R as ReactionParams, S as StatusParams, e as StickerMediaObject, T as TextMessageParams, f as TextObject, V as VideoMediaObject } from '../../MessageApi-B5xedsTj.js';
1
+ import { M as MessagesApi } from '../../MessageApi-ptFlWg3O.js';
2
+ export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, b as MessageRequestParams, d as MessageTemplateObject, c as MessagesResponse, R as ReactionParams, S as StatusParams, e as StickerMediaObject, T as TextMessageParams, f as TextObject, V as VideoMediaObject } from '../../MessageApi-ptFlWg3O.js';
3
3
  import '../../base-BhCbbsxB.js';
4
4
  import '../../shared/types/config.js';
5
5
  import '../../enums-DvwSJq9w.js';
@@ -2,7 +2,7 @@ import { E as EncryptionApi } from './EncryptionApi-PHxeI2G_.js';
2
2
  import { F as FlowApi } from './FlowApi-CASVC-Al.js';
3
3
  import { WhatsAppConfig, WabaConfigType } from './shared/types/config.js';
4
4
  import { M as MediaApi } from './MediaApi-B2vtjiCm.js';
5
- import { M as MessagesApi } from './MessageApi-B5xedsTj.js';
5
+ import { M as MessagesApi } from './MessageApi-ptFlWg3O.js';
6
6
  import { P as PhoneNumberApi } from './PhoneNumberApi-DMb_G3uw.js';
7
7
  import { B as BusinessProfileApi } from './BusinessProfileApi-DE7Nnuy_.js';
8
8
  import { Q as QrCodeApi } from './QrCodeApi-D3rVKuxV.js';
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export { W as WebhookContact, a as WebhookEvent, c as WebhookHandler, b as WebhookMessage } from './WebhookHandler-ZZQSTfZb.js';
1
+ export { W as WebhookContact, a as WebhookEvent, c as WebhookHandler, b as WebhookMessage } from './WebhookHandler-DQKQAFVn.js';
2
2
  import { g as FlowEndpointRequest, o as FlowDataExchangeRequest, c as FlowActionEnum, p as FlowErrorNotificationRequest, q as FlowHealthCheckRequest } from './FlowApi-CASVC-Al.js';
3
3
  export { a as Flow, F as FlowApi, f as FlowClass, h as FlowEndpointResponse, b as FlowType, n as FlowTypeEnum } from './FlowApi-CASVC-Al.js';
4
4
  export { B as BaseAPI, d as BaseClass, e as GeneralHeaderInterface, G as GeneralRequestBody, P as Paging, a as RequesterClass, f as RequesterResponseInterface, c as ResponseData, b as ResponsePagination, R as ResponseSuccess } from './base-BhCbbsxB.js';
5
5
  export { WabaConfigType, WhatsAppConfig } from './shared/types/config.js';
6
- export { H as HttpsClientClass, a as HttpsClientResponseClass, b as ResponseHeaderValue, R as ResponseHeaders, c as ResponseJSONBody, W as WhatsApp } from './index-BJ5dLlEF.js';
6
+ export { H as HttpsClientClass, a as HttpsClientResponseClass, b as ResponseHeaderValue, R as ResponseHeaders, c as ResponseJSONBody, W as WhatsApp } from './index-DiCI1vEz.js';
7
7
  export { A as AudioMediaTypesEnum, B as BusinessVerticalEnum, b as ButtonPositionEnum, a as CategoryEnum, c as ComponentTypesEnum, d as ConversationTypesEnum, C as CurrencyCodesEnum, D as DataLocalizationRegionEnum, h as DocumentMediaTypesEnum, H as HttpMethodsEnum, g as ImageMediaTypesEnum, I as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, R as ReferralSourceTypesEnum, k as RequestCodeMethodsEnum, e as StatusEnum, f as StickerMediaTypesEnum, S as SubTypeEnum, j as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, i as WebhookTypesEnum } from './enums-DvwSJq9w.js';
8
8
  export { E as EncryptionApi } from './EncryptionApi-PHxeI2G_.js';
9
9
  export { a as MediaClass, b as MediaResponse, c as MediasResponse, U as UploadMediaResponse } from './MediaApi-B2vtjiCm.js';
10
- export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, b as MessageRequestParams, d as MessageTemplateObject, M as MessagesApi, c as MessagesResponse, R as ReactionParams, S as StatusParams, e as StickerMediaObject, T as TextMessageParams, f as TextObject, V as VideoMediaObject } from './MessageApi-B5xedsTj.js';
10
+ export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, b as MessageRequestParams, d as MessageTemplateObject, M as MessagesApi, c as MessagesResponse, R as ReactionParams, S as StatusParams, e as StickerMediaObject, T as TextMessageParams, f as TextObject, V as VideoMediaObject } from './MessageApi-ptFlWg3O.js';
11
11
  export { P as PhoneNumberApi, c as PhoneNumberClass, d as PhoneNumberResponse } from './PhoneNumberApi-DMb_G3uw.js';
12
12
  export { B as BusinessProfileApi, a as BusinessProfileClass, e as BusinessProfileResponse } from './BusinessProfileApi-DE7Nnuy_.js';
13
13
  export { Q as QrCodeApi, a as QrCodeClass, b as QrCodeResponse } from './QrCodeApi-D3rVKuxV.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meta-cloud-api",
3
- "version": "0.2.40",
3
+ "version": "0.2.42",
4
4
  "description": "TypeScript wrapper for Meta's Cloud API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",