Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): all non-major dependencies #381

Merged
merged 3 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ A clear and concise description of what you expected to happen.

**Desktop (please complete the following information):**

- OS: [e.g. Windows]
- Runtime [e.g. node@19, [email protected]]
- Library Version [e.g. 1.0.0]
- OS: [e.g. Windows]
- Runtime [e.g. node@19, [email protected]]
- Library Version [e.g. 1.0.0]

**Additional context**
Add any other context about the problem here.
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
### Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

- [ ] It's really useful if your PR references an issue where it is discussed ahead of time.
- [ ] This message body should clearly illustrate what problems it solves.
- [ ] Ideally, include a test that fails without this PR but passes with it.
- [ ] It's really useful if your PR references an issue where it is discussed ahead of time.
- [ ] This message body should clearly illustrate what problems it solves.
- [ ] Ideally, include a test that fails without this PR but passes with it.

### Tests

- [ ] Run the tests with `npm run test` and lint the project with `npm run lint` and `npm run prettier`
- [ ] Run the tests with `npm run test` and lint the project with `npm run lint` and `npm run prettier`
68 changes: 34 additions & 34 deletions BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ Due to interoperability issues between ESM and CJS, all the default
exports were removed to assure a consistent behavior across all
runtimes. The list of affected imports by this change is:

- `whatsapp-api-js`
- `whatsapp-api-js/messages/location`
- `whatsapp-api-js/messages/reaction`
- `whatsapp-api-js/messages/text`
- `whatsapp-api-js/middleware/*` (yeah, all of them, issue [#306](https://github.com/Secreto31126/whatsapp-api-js/issues/306))
- `whatsapp-api-js/setup/bun`
- `whatsapp-api-js/setup/deno`
- `whatsapp-api-js/setup/web`
- `whatsapp-api-js`
- `whatsapp-api-js/messages/location`
- `whatsapp-api-js/messages/reaction`
- `whatsapp-api-js/messages/text`
- `whatsapp-api-js/middleware/*` (yeah, all of them, issue [#306](https://github.com/Secreto31126/whatsapp-api-js/issues/306))
- `whatsapp-api-js/setup/bun`
- `whatsapp-api-js/setup/deno`
- `whatsapp-api-js/setup/web`

ESM example:

Expand Down Expand Up @@ -150,32 +150,32 @@ the original catalog messages.

Among the affected classes and files are:

- `interactive.ts`

- `ActionCatalog` -> `ActionProduct`: `ActionCatalog` is now used for the
Catalog messages. The original class was renamed as `ActionProduct`.
- `Product` and `ProductSection`: These classes were moved from the file
`messages/interactive.ts` to `messages/globals.ts`, as they are now also
used in templates.
- `Section`: The class was moved from the file `messages/interactive.ts` to
`types.ts`.

- `template.ts`

- `ButtonComponent` -> `URLComponent`, `PayloadComponent`, `CatalogComponent`,
`MPMComponent`, `CopyComponent`, `SkipButtonComponent`: As the API now
supports mixing button types, the `ButtonComponent` was splitted into
different classes, each one representing a button types. For example, an URL
component was updated from `new ButtonComponent("url", "example")` to
`new URLComponent("example")`.
- `Template`: The constructor now receives multiple button components instead
of a single one.
- `ButtonComponent`: The class was replaced with an abstract class.
- `ButtonParameter`: The class was replaced with a type.

- `types.ts`
- `ClientBuildableMessageComponent`: The class was replaced with an interface.
- `PostData`: `PostData.entry[].changes[].value.contacts` may be undefined.
- `interactive.ts`

- `ActionCatalog` -> `ActionProduct`: `ActionCatalog` is now used for the
Catalog messages. The original class was renamed as `ActionProduct`.
- `Product` and `ProductSection`: These classes were moved from the file
`messages/interactive.ts` to `messages/globals.ts`, as they are now also
used in templates.
- `Section`: The class was moved from the file `messages/interactive.ts` to
`types.ts`.

- `template.ts`

- `ButtonComponent` -> `URLComponent`, `PayloadComponent`, `CatalogComponent`,
`MPMComponent`, `CopyComponent`, `SkipButtonComponent`: As the API now
supports mixing button types, the `ButtonComponent` was splitted into
different classes, each one representing a button types. For example, an URL
component was updated from `new ButtonComponent("url", "example")` to
`new URLComponent("example")`.
- `Template`: The constructor now receives multiple button components instead
of a single one.
- `ButtonComponent`: The class was replaced with an abstract class.
- `ButtonParameter`: The class was replaced with a type.

- `types.ts`
- `ClientBuildableMessageComponent`: The class was replaced with an interface.
- `PostData`: `PostData.entry[].changes[].value.contacts` may be undefined.

### Node min version bumped

Expand Down
6 changes: 3 additions & 3 deletions ENVIRONMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const { WhatsAppAPI } = require("whatsapp-api-js");
For each version of Node, you can use the `setup` function to simplify the
process.

- Node 19 and above (using Express and it's middleware):
- Node 19 and above (using Express and it's middleware):

```js
import { WhatsAppAPI } from "whatsapp-api-js/middleware/express";
Expand All @@ -43,7 +43,7 @@ app.post("/message", async (req, res) => {
});
```

- Node 18:
- Node 18:

```js
import { WhatsAppAPI } from "whatsapp-api-js";
Expand All @@ -57,7 +57,7 @@ const Whatsapp = new WhatsAppAPI(
);
```

- Node 15 to 17 (deprecated):
- Node 15 to 17 (deprecated):

```js
import { WhatsAppAPI } from "whatsapp-api-js";
Expand Down
102 changes: 51 additions & 51 deletions EXAMPLES/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,54 @@ the most basic methods or features.

## Index

- [Main](main.md)
- [Simple Whatsapp creation](main.md#simple-whatsapp-creation)
- [Using the setup helpers](main.md#using-the-setup-helpers)
- [Using the middlewares](main.md#using-the-middlewares)
- [Sending a message](main.md#sending-a-message)
- [Replying to a message](main.md#replying-to-a-message)
- [Text](text.md)
- [Simple text](text.md#simple-text)
- [Text with URL preview](text.md#text-with-url-preview)
- [Reaction](reaction.md)
- [Add reaction](reaction.md#add-reaction)
- [Remove reaction](reaction.md#remove-reaction)
- [Location](location.md)
- [Coordinates](location.md#coordinates)
- [Coordinates with name](location.md#coordinates-with-name)
- [Media](media.md)
- [Image](media.md#image)
- [Video](media.md#video)
- [Audio](media.md#audio)
- [Document](media.md#document)
- [Sticker](media.md#sticker)
- [Interactive](interactive.md)
- [Reply buttons](interactive.md#reply-buttons)
- [Options list](interactive.md#options-list)
- [Single Product](interactive.md#single-product)
- [Multi Product](interactive.md#multi-product)
- [Catalog](interactive.md#catalog)
- [Call To Action](interactive.md#call-to-action)
- [Navigate Flow](interactive.md#navigate-flow)
- [Data Exchange Flow](interactive.md#data-exchange-flow)
- [Payments and Location request](interactive.md#payments-and-location-request)
- [Contacts](contacts.md)
- [Simple contact](contacts.md#simple-contact)
- [Multiple contacts](contacts.md#multiple-contacts)
- [Complex contact](contacts.md#complex-contact)
- [Templates](templates.md)
- [Simple template with no variables](template.md#simple-template-with-no-variables)
- [Simple template with simple variables in header and body](template.md#simple-template-with-simple-variables-in-header-and-body)
- [Simple template with header media](template.md#simple-template-with-header-media)
- [Complex template with reply buttons](template.md#complex-template-with-reply-buttons)
- [Complex template with call to action url](template.md#complex-template-with-call-to-action-url)
- [Complex template with copy coupon button](template.md#complex-template-with-copy-coupon-button)
- [Complex template with flow component](template.md#complex-template-with-flow-component)
- [Complex template with combination of buttons](template.md#complex-template-with-combination-of-buttons)
- [Complex template with catalog](template.md#complex-template-with-catalog)
- [Complex template with Single-Product Message](template.md#complex-template-with-single-product-message)
- [Complex template with Multi-Product Message](template.md#complex-template-with-multi-product-message)
- [Complex template with Carousel](template.md#complex-template-with-carousel)
- [Complex template with Product Carousel](template.md#complex-template-with-product-carousel)
- [Complex template with Limited-Time Offer](template.md#complex-template-with-limited-time-offer)
- [OTP prefab template](template.md#otp-prefab-template)
- [Main](main.md)
- [Simple Whatsapp creation](main.md#simple-whatsapp-creation)
- [Using the setup helpers](main.md#using-the-setup-helpers)
- [Using the middlewares](main.md#using-the-middlewares)
- [Sending a message](main.md#sending-a-message)
- [Replying to a message](main.md#replying-to-a-message)
- [Text](text.md)
- [Simple text](text.md#simple-text)
- [Text with URL preview](text.md#text-with-url-preview)
- [Reaction](reaction.md)
- [Add reaction](reaction.md#add-reaction)
- [Remove reaction](reaction.md#remove-reaction)
- [Location](location.md)
- [Coordinates](location.md#coordinates)
- [Coordinates with name](location.md#coordinates-with-name)
- [Media](media.md)
- [Image](media.md#image)
- [Video](media.md#video)
- [Audio](media.md#audio)
- [Document](media.md#document)
- [Sticker](media.md#sticker)
- [Interactive](interactive.md)
- [Reply buttons](interactive.md#reply-buttons)
- [Options list](interactive.md#options-list)
- [Single Product](interactive.md#single-product)
- [Multi Product](interactive.md#multi-product)
- [Catalog](interactive.md#catalog)
- [Call To Action](interactive.md#call-to-action)
- [Navigate Flow](interactive.md#navigate-flow)
- [Data Exchange Flow](interactive.md#data-exchange-flow)
- [Payments and Location request](interactive.md#payments-and-location-request)
- [Contacts](contacts.md)
- [Simple contact](contacts.md#simple-contact)
- [Multiple contacts](contacts.md#multiple-contacts)
- [Complex contact](contacts.md#complex-contact)
- [Templates](templates.md)
- [Simple template with no variables](template.md#simple-template-with-no-variables)
- [Simple template with simple variables in header and body](template.md#simple-template-with-simple-variables-in-header-and-body)
- [Simple template with header media](template.md#simple-template-with-header-media)
- [Complex template with reply buttons](template.md#complex-template-with-reply-buttons)
- [Complex template with call to action url](template.md#complex-template-with-call-to-action-url)
- [Complex template with copy coupon button](template.md#complex-template-with-copy-coupon-button)
- [Complex template with flow component](template.md#complex-template-with-flow-component)
- [Complex template with combination of buttons](template.md#complex-template-with-combination-of-buttons)
- [Complex template with catalog](template.md#complex-template-with-catalog)
- [Complex template with Single-Product Message](template.md#complex-template-with-single-product-message)
- [Complex template with Multi-Product Message](template.md#complex-template-with-multi-product-message)
- [Complex template with Carousel](template.md#complex-template-with-carousel)
- [Complex template with Product Carousel](template.md#complex-template-with-product-carousel)
- [Complex template with Limited-Time Offer](template.md#complex-template-with-limited-time-offer)
- [OTP prefab template](template.md#otp-prefab-template)
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,30 @@ A TypeScript server agnostic Whatsapp's Official API framework.

## List of contents

- [whatsapp-api-js v4](#whatsapp-api-js-v4)
- [List of contents](#list-of-contents)
- [Set up](#set-up)
- [Examples and Tutorials](#examples-and-tutorials)
- [Types](#types)
- [Changelog](#changelog)
- [Documentation](#documentation)
- [Contributors](#contributors)
- [Contributions](#contributions)
- [Breaking changes](#breaking-changes)
- [Beta releases](#beta-releases)
- [whatsapp-api-js v4](#whatsapp-api-js-v4)
- [List of contents](#list-of-contents)
- [Set up](#set-up)
- [Examples and Tutorials](#examples-and-tutorials)
- [Types](#types)
- [Changelog](#changelog)
- [Documentation](#documentation)
- [Contributors](#contributors)
- [Contributions](#contributions)
- [Breaking changes](#breaking-changes)
- [Beta releases](#beta-releases)

## Set up

Before all, you will need a Meta Bussiness App with WhatsApp API activated. You
can create your first app following
[this steps](https://developers.facebook.com/docs/whatsapp/cloud-api/get-started).

- Get the API token, either a temporal or a
[permanent one](https://developers.facebook.com/docs/whatsapp/business-management-api/get-started).
- Get your App secret from the dashboard in App Settings > Basic > App Secret.
- More in-depth information on how to set and retrieve this values is available
at
[the module documentation](https://whatsappapijs.web.app/types/types.TheBasicConstructorArguments.html)
- Get the API token, either a temporal or a
[permanent one](https://developers.facebook.com/docs/whatsapp/business-management-api/get-started).
- Get your App secret from the dashboard in App Settings > Basic > App Secret.
- More in-depth information on how to set and retrieve this values is available
at
[the module documentation](https://whatsappapijs.web.app/types/types.TheBasicConstructorArguments.html)

You can now install the module using npm:

Expand Down
Loading
Loading