@wats/types 0.3.1 → 0.3.2

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.
@@ -1,7 +1,7 @@
1
- export type { WhatsAppMessage } from "./messages/union";
2
- export type { WhatsAppContact, WhatsAppContactName, ContactPhone, ContactEmail, ContactAddress, ContactOrg, ContactUrl } from "./contacts";
3
- export type { WhatsAppMessageStatus, WhatsAppMessageStatusKind, ConversationRef, PricingRef } from "./statuses";
4
- export type { WhatsAppError, WhatsAppErrorPayload } from "./errors";
1
+ export type { WhatsAppMessage } from "./messages/union.js";
2
+ export type { WhatsAppContact, WhatsAppContactName, ContactPhone, ContactEmail, ContactAddress, ContactOrg, ContactUrl } from "./contacts.js";
3
+ export type { WhatsAppMessageStatus, WhatsAppMessageStatusKind, ConversationRef, PricingRef } from "./statuses.js";
4
+ export type { WhatsAppError, WhatsAppErrorPayload } from "./errors.js";
5
5
  export interface WhatsAppMessageText {
6
6
  body: string;
7
7
  }
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export * from "./config";
2
- export * from "./webhook";
3
- export * from "./entities";
4
- export type { TextMessage, ImageMessage, VideoMessage, AudioMessage, DocumentMessage, StickerMessage, LocationMessage, LocationPayload, ContactsMessage, ReactionMessage, ReactionPayload, OrderMessage, OrderPayload, OrderProductItem, SystemMessage, SystemNotification, UnsupportedMessage, InteractiveMessage, InteractiveReply, InteractiveButtonReply, InteractiveListReply, InteractiveNfmReply, InteractiveProductReply, InteractiveProductListReply, InteractiveCtaUrlReply, ButtonMessage, ButtonPayload, WhatsAppMessageKind, MediaReference, DocumentReference, MessageContext } from "./messages";
5
- export { WATS_TYPES_MESSAGES_EXPORTS } from "./messages";
6
- export { WATS_TYPES_STATUSES_EXPORTS } from "./statuses";
7
- export { WATS_TYPES_CONTACTS_EXPORTS } from "./contacts";
8
- export { WATS_TYPES_ERRORS_EXPORTS } from "./errors";
9
- export type { WhatsAppMessagesFieldValue, WhatsAppTemplateStatusUpdateValue, WhatsAppAccountReviewUpdateValue, WhatsAppUserMarketingPreferencesValue, WhatsAppPhoneNumberChangeValue, WhatsAppIdentityChangeValue, WhatsAppRawWebhookValue } from "./webhook";
1
+ export * from "./config.js";
2
+ export * from "./webhook.js";
3
+ export * from "./entities.js";
4
+ export type { TextMessage, ImageMessage, VideoMessage, AudioMessage, DocumentMessage, StickerMessage, LocationMessage, LocationPayload, ContactsMessage, ReactionMessage, ReactionPayload, OrderMessage, OrderPayload, OrderProductItem, SystemMessage, SystemNotification, UnsupportedMessage, InteractiveMessage, InteractiveReply, InteractiveButtonReply, InteractiveListReply, InteractiveNfmReply, InteractiveProductReply, InteractiveProductListReply, InteractiveCtaUrlReply, ButtonMessage, ButtonPayload, WhatsAppMessageKind, MediaReference, DocumentReference, MessageContext } from "./messages/index.js";
5
+ export { WATS_TYPES_MESSAGES_EXPORTS } from "./messages/index.js";
6
+ export { WATS_TYPES_STATUSES_EXPORTS } from "./statuses.js";
7
+ export { WATS_TYPES_CONTACTS_EXPORTS } from "./contacts.js";
8
+ export { WATS_TYPES_ERRORS_EXPORTS } from "./errors.js";
9
+ export type { WhatsAppMessagesFieldValue, WhatsAppTemplateStatusUpdateValue, WhatsAppAccountReviewUpdateValue, WhatsAppUserMarketingPreferencesValue, WhatsAppPhoneNumberChangeValue, WhatsAppIdentityChangeValue, WhatsAppRawWebhookValue } from "./webhook.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export * from "./config";
2
- export * from "./webhook";
3
- export * from "./entities";
4
- export { WATS_TYPES_MESSAGES_EXPORTS } from "./messages";
5
- export { WATS_TYPES_STATUSES_EXPORTS } from "./statuses";
6
- export { WATS_TYPES_CONTACTS_EXPORTS } from "./contacts";
7
- export { WATS_TYPES_ERRORS_EXPORTS } from "./errors";
1
+ export * from "./config.js";
2
+ export * from "./webhook.js";
3
+ export * from "./entities.js";
4
+ export { WATS_TYPES_MESSAGES_EXPORTS } from "./messages/index.js";
5
+ export { WATS_TYPES_STATUSES_EXPORTS } from "./statuses.js";
6
+ export { WATS_TYPES_CONTACTS_EXPORTS } from "./contacts.js";
7
+ export { WATS_TYPES_ERRORS_EXPORTS } from "./errors.js";
@@ -1,4 +1,4 @@
1
- import type { MediaReference, MessageContext } from "./media";
1
+ import type { MediaReference, MessageContext } from "./media.js";
2
2
  export interface AudioMessage {
3
3
  type: "audio";
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import type { MessageContext } from "./media";
1
+ import type { MessageContext } from "./media.js";
2
2
  export interface ButtonPayload {
3
3
  text: string;
4
4
  payload?: string;
@@ -1,5 +1,5 @@
1
- import type { WhatsAppContact } from "../contacts";
2
- import type { MessageContext } from "./media";
1
+ import type { WhatsAppContact } from "../contacts.js";
2
+ import type { MessageContext } from "./media.js";
3
3
  export interface ContactsMessage {
4
4
  type: "contacts";
5
5
  id: string;
@@ -1,4 +1,4 @@
1
- import type { DocumentReference, MessageContext } from "./media";
1
+ import type { DocumentReference, MessageContext } from "./media.js";
2
2
  export interface DocumentMessage {
3
3
  type: "document";
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import type { MediaReference, MessageContext } from "./media";
1
+ import type { MediaReference, MessageContext } from "./media.js";
2
2
  export interface ImageMessage {
3
3
  type: "image";
4
4
  id: string;
@@ -1,17 +1,17 @@
1
- export type { TextMessage } from "./text";
2
- export type { ImageMessage } from "./image";
3
- export type { VideoMessage } from "./video";
4
- export type { AudioMessage } from "./audio";
5
- export type { DocumentMessage } from "./document";
6
- export type { StickerMessage } from "./sticker";
7
- export type { LocationMessage, LocationPayload } from "./location";
8
- export type { ContactsMessage } from "./contacts";
9
- export type { ReactionMessage, ReactionPayload } from "./reaction";
10
- export type { OrderMessage, OrderPayload, OrderProductItem } from "./order";
11
- export type { SystemMessage, SystemNotification } from "./system";
12
- export type { UnsupportedMessage } from "./unsupported";
13
- export type { InteractiveMessage, InteractiveReply, InteractiveButtonReply, InteractiveListReply, InteractiveNfmReply, InteractiveProductReply, InteractiveProductListReply, InteractiveCtaUrlReply } from "./interactive";
14
- export type { ButtonMessage, ButtonPayload } from "./button";
15
- export type { WhatsAppMessage, WhatsAppMessageKind } from "./union";
16
- export type { MediaReference, DocumentReference, MessageContext } from "./media";
1
+ export type { TextMessage } from "./text.js";
2
+ export type { ImageMessage } from "./image.js";
3
+ export type { VideoMessage } from "./video.js";
4
+ export type { AudioMessage } from "./audio.js";
5
+ export type { DocumentMessage } from "./document.js";
6
+ export type { StickerMessage } from "./sticker.js";
7
+ export type { LocationMessage, LocationPayload } from "./location.js";
8
+ export type { ContactsMessage } from "./contacts.js";
9
+ export type { ReactionMessage, ReactionPayload } from "./reaction.js";
10
+ export type { OrderMessage, OrderPayload, OrderProductItem } from "./order.js";
11
+ export type { SystemMessage, SystemNotification } from "./system.js";
12
+ export type { UnsupportedMessage } from "./unsupported.js";
13
+ export type { InteractiveMessage, InteractiveReply, InteractiveButtonReply, InteractiveListReply, InteractiveNfmReply, InteractiveProductReply, InteractiveProductListReply, InteractiveCtaUrlReply } from "./interactive.js";
14
+ export type { ButtonMessage, ButtonPayload } from "./button.js";
15
+ export type { WhatsAppMessage, WhatsAppMessageKind } from "./union.js";
16
+ export type { MediaReference, DocumentReference, MessageContext } from "./media.js";
17
17
  export declare const WATS_TYPES_MESSAGES_EXPORTS: readonly ["TextMessage", "ImageMessage", "VideoMessage", "AudioMessage", "DocumentMessage", "StickerMessage", "LocationMessage", "ContactsMessage", "ReactionMessage", "OrderMessage", "SystemMessage", "UnsupportedMessage", "InteractiveMessage", "ButtonMessage", "WhatsAppMessage", "InteractiveReply", "MediaReference", "DocumentReference", "MessageContext"];
@@ -1,4 +1,4 @@
1
- import type { MessageContext } from "./media";
1
+ import type { MessageContext } from "./media.js";
2
2
  export interface InteractiveButtonReply {
3
3
  type: "button_reply";
4
4
  buttonReply: {
@@ -1,4 +1,4 @@
1
- import type { MessageContext } from "./media";
1
+ import type { MessageContext } from "./media.js";
2
2
  export interface LocationPayload {
3
3
  latitude: number;
4
4
  longitude: number;
@@ -1,4 +1,4 @@
1
- import type { MessageContext } from "./media";
1
+ import type { MessageContext } from "./media.js";
2
2
  export interface OrderProductItem {
3
3
  productRetailerId: string;
4
4
  quantity?: number;
@@ -1,4 +1,4 @@
1
- import type { MessageContext } from "./media";
1
+ import type { MessageContext } from "./media.js";
2
2
  export interface ReactionPayload {
3
3
  messageId: string;
4
4
  emoji: string;
@@ -1,4 +1,4 @@
1
- import type { MediaReference, MessageContext } from "./media";
1
+ import type { MediaReference, MessageContext } from "./media.js";
2
2
  export interface StickerMessage {
3
3
  type: "sticker";
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import type { MessageContext } from "./media";
1
+ import type { MessageContext } from "./media.js";
2
2
  export interface TextMessage {
3
3
  type: "text";
4
4
  id: string;
@@ -1,17 +1,17 @@
1
- import type { TextMessage } from "./text";
2
- import type { ImageMessage } from "./image";
3
- import type { VideoMessage } from "./video";
4
- import type { AudioMessage } from "./audio";
5
- import type { DocumentMessage } from "./document";
6
- import type { StickerMessage } from "./sticker";
7
- import type { LocationMessage } from "./location";
8
- import type { ContactsMessage } from "./contacts";
9
- import type { ReactionMessage } from "./reaction";
10
- import type { OrderMessage } from "./order";
11
- import type { SystemMessage } from "./system";
12
- import type { UnsupportedMessage } from "./unsupported";
13
- import type { InteractiveMessage } from "./interactive";
14
- import type { ButtonMessage } from "./button";
1
+ import type { TextMessage } from "./text.js";
2
+ import type { ImageMessage } from "./image.js";
3
+ import type { VideoMessage } from "./video.js";
4
+ import type { AudioMessage } from "./audio.js";
5
+ import type { DocumentMessage } from "./document.js";
6
+ import type { StickerMessage } from "./sticker.js";
7
+ import type { LocationMessage } from "./location.js";
8
+ import type { ContactsMessage } from "./contacts.js";
9
+ import type { ReactionMessage } from "./reaction.js";
10
+ import type { OrderMessage } from "./order.js";
11
+ import type { SystemMessage } from "./system.js";
12
+ import type { UnsupportedMessage } from "./unsupported.js";
13
+ import type { InteractiveMessage } from "./interactive.js";
14
+ import type { ButtonMessage } from "./button.js";
15
15
  export type WhatsAppMessage = TextMessage | ImageMessage | VideoMessage | AudioMessage | DocumentMessage | StickerMessage | LocationMessage | ContactsMessage | ReactionMessage | OrderMessage | SystemMessage | UnsupportedMessage | InteractiveMessage | ButtonMessage;
16
16
  /**
17
17
  * The closed set of `WhatsAppMessage.type` discriminators. Useful for
@@ -1,4 +1,4 @@
1
- import type { WhatsAppError } from "../errors";
1
+ import type { WhatsAppError } from "../errors.js";
2
2
  export interface UnsupportedMessage {
3
3
  type: "unsupported";
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import type { MediaReference, MessageContext } from "./media";
1
+ import type { MediaReference, MessageContext } from "./media.js";
2
2
  export interface VideoMessage {
3
3
  type: "video";
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import type { WhatsAppError } from "./errors";
1
+ import type { WhatsAppError } from "./errors.js";
2
2
  export type WhatsAppMessageStatusKind = "sent" | "delivered" | "read" | "failed" | "deleted" | "warning";
3
3
  export interface ConversationRef {
4
4
  id: string;
package/dist/webhook.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { WhatsAppError, WhatsAppErrorPayload } from "./errors";
2
- import type { WhatsAppContact } from "./contacts";
3
- import type { WhatsAppMessage } from "./messages/union";
4
- import type { WhatsAppMessageStatus } from "./statuses";
1
+ import type { WhatsAppError, WhatsAppErrorPayload } from "./errors.js";
2
+ import type { WhatsAppContact } from "./contacts.js";
3
+ import type { WhatsAppMessage } from "./messages/union.js";
4
+ import type { WhatsAppMessageStatus } from "./statuses.js";
5
5
  export interface WhatsAppWebhookEnvelope {
6
6
  object: string;
7
7
  entry: WhatsAppWebhookEntry[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wats/types",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",