Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

chore(sdk): rename publish names to the @openwa/client scheme

Yudhi Armyndharisa531bc5ad888
diff --git a/sdk/README.md b/sdk/README.md
index 025ed7e8b..c9d1d0da8 100644
--- a/sdk/README.md
+++ b/sdk/README.md
@@ -10,11 +10,16 @@ The wire types live in a dedicated module (`types.ts` / `types.py`) so they can
later be regenerated by an OpenAPI codegen pass without touching the
hand-written resource methods.
-| Language | Package | Notes |
-| ----------------------- | ---------------------------- | --------------------------- |
-| JavaScript / TypeScript | [`@openwa/sdk`](javascript/) | dual ESM/CJS, bundled types |
-| Python | [`openwa-sdk`](python/) | sync (httpx), PEP 561 typed |
-| PHP | [`openwa/sdk`](php/) | sync (Guzzle, PHP 8.1+) |
+> **Not yet published** to npm / PyPI / Packagist. The package names below are
+> reserved for the first release; until then, install from a checkout of this
+> repo (see each language section). Note: an unrelated third-party `openwa-sdk`
+> exists on PyPI — it is **not** this project; do not install it.
+
+| Language | Package | Notes |
+| ----------------------- | ------------------------------- | --------------------------- |
+| JavaScript / TypeScript | [`@openwa/client`](javascript/) | dual ESM/CJS, bundled types |
+| Python | [`openwa-client`](python/) | sync (httpx), PEP 561 typed |
+| PHP | [`openwa/client`](php/) | sync (Guzzle, PHP 8.1+) |
## Coverage
@@ -48,7 +53,7 @@ npm run build # dual ESM + CJS output in dist/
```
```typescript
-import { OpenWAClient } from '@openwa/sdk';
+import { OpenWAClient } from '@openwa/client';
const client = new OpenWAClient({
baseUrl: 'http://localhost:2785',
@@ -66,7 +71,7 @@ console.log(result.messageId);
Errors are typed — branch with `instanceof`:
```typescript
-import { OpenWANotFoundError, OpenWAConflictError } from '@openwa/sdk';
+import { OpenWANotFoundError, OpenWAConflictError } from '@openwa/client';
try {
await client.messages.sendText(/* … */);
} catch (e) {
diff --git a/sdk/javascript/README.md b/sdk/javascript/README.md
index 1ae8639dd..1b210a2d8 100644
--- a/sdk/javascript/README.md
+++ b/sdk/javascript/README.md
@@ -1,4 +1,4 @@
-# @openwa/sdk
+# @openwa/client
Official JavaScript/TypeScript SDK for the [OpenWA](https://github.com/rmyndharis/OpenWA) WhatsApp API Gateway.
@@ -6,8 +6,11 @@ Ships dual CJS + ESM builds with bundled type declarations.
## Install
+> **Not yet published to npm.** Until the first release, install from a checkout
+> of the repo (`cd sdk/javascript && npm install && npm run build`) or from git.
+
```bash
-npm install @openwa/sdk
+npm install @openwa/client # once published
```
Requires Node.js >= 18 (relies on the global `fetch`).
@@ -15,7 +18,7 @@ Requires Node.js >= 18 (relies on the global `fetch`).
## Usage
```typescript
-import { OpenWAClient } from '@openwa/sdk';
+import { OpenWAClient } from '@openwa/client';
const client = new OpenWAClient({
baseUrl: 'https://your-gateway.example.com',
@@ -31,7 +34,7 @@ const result = await client.messages.sendText('my-session', {
console.log(result.messageId);
```
-CommonJS consumers use `require('@openwa/sdk')` identically.
+CommonJS consumers use `require('@openwa/client')` identically.
## Errors
diff --git a/sdk/javascript/package.json b/sdk/javascript/package.json
index 8a627e5f1..0dcecd1d5 100644
--- a/sdk/javascript/package.json
+++ b/sdk/javascript/package.json
@@ -1,5 +1,5 @@
{
- "name": "@openwa/sdk",
+ "name": "@openwa/client",
"version": "0.1.0",
"description": "Official JavaScript/TypeScript SDK for OpenWA WhatsApp API Gateway",
"type": "module",
diff --git a/sdk/javascript/src/client.ts b/sdk/javascript/src/client.ts
index ecd464bc6..8f8b5e742 100644
--- a/sdk/javascript/src/client.ts
+++ b/sdk/javascript/src/client.ts
@@ -6,7 +6,7 @@
* resources as properties:
*
* ```typescript
- * import { OpenWAClient } from '@openwa/sdk';
+ * import { OpenWAClient } from '@openwa/client';
*
* const client = new OpenWAClient({
* baseUrl: 'http://localhost:2785',
diff --git a/sdk/javascript/src/index.ts b/sdk/javascript/src/index.ts
index d58046747..5f755b9f1 100644
--- a/sdk/javascript/src/index.ts
+++ b/sdk/javascript/src/index.ts
@@ -5,7 +5,7 @@
*
* @example
* ```typescript
- * import { OpenWAClient, OpenWAApiError } from '@openwa/sdk';
+ * import { OpenWAClient, OpenWAApiError } from '@openwa/client';
*
* const client = new OpenWAClient({
* baseUrl: 'http://localhost:2785',
diff --git a/sdk/php/composer.json b/sdk/php/composer.json
index 64e7ab16a..b7c8fcc3d 100644
--- a/sdk/php/composer.json
+++ b/sdk/php/composer.json
@@ -1,5 +1,5 @@
{
- "name": "openwa/sdk",
+ "name": "openwa/client",
"description": "Official PHP SDK for OpenWA WhatsApp API Gateway",
"type": "library",
"license": "MIT",
diff --git a/sdk/php/composer.lock b/sdk/php/composer.lock
index eea65f35a..03813c426 100644
--- a/sdk/php/composer.lock
+++ b/sdk/php/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "98c18578ce6bc58c383aa8f25462b8d2",
+ "content-hash": "90c347053b74c878f4f7809adfd94a85",
"packages": [
{
"name": "guzzlehttp/guzzle",
diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml
index 0afa16af0..545a85c4b 100644
--- a/sdk/python/pyproject.toml
+++ b/sdk/python/pyproject.toml
@@ -3,7 +3,7 @@ requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
-name = "openwa-sdk"
+name = "openwa-client"
version = "0.1.0"
description = "Official Python SDK for OpenWA WhatsApp API Gateway"
readme = "README.md"