botcast-sdk 1.0.4 → 1.0.6
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.
- package/README.md +30 -1
- package/dist/admin.cjs +118 -0
- package/dist/admin.d.ts +97 -0
- package/dist/admin.d.ts.map +1 -0
- package/dist/admin.js +114 -0
- package/dist/index.cjs +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,7 +41,36 @@ bun add botcast-sdk
|
|
|
41
41
|
|
|
42
42
|
## Quick Start
|
|
43
43
|
|
|
44
|
-
### 1.
|
|
44
|
+
### 1. Admin & Fleet Management (Create, Manage & Renew Instances)
|
|
45
|
+
|
|
46
|
+
Use `BotcastAdminClient` with your Master Partner API Key (`bcast_live_...`) to programmatically create and manage customer instances:
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { BotcastAdminClient } from 'botcast-sdk';
|
|
50
|
+
|
|
51
|
+
const admin = new BotcastAdminClient({
|
|
52
|
+
baseUrl: 'https://botcast.site',
|
|
53
|
+
apiKey: process.env.BOTCAST_API_KEY!, // Master API Key
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// List all instances
|
|
57
|
+
const { instances } = await admin.listInstances();
|
|
58
|
+
|
|
59
|
+
// Create a new WhatsApp or Telegram instance for a customer
|
|
60
|
+
const { instance } = await admin.createInstance({
|
|
61
|
+
name: 'Customer Store 1',
|
|
62
|
+
platform: 'whatsapp',
|
|
63
|
+
type: 'paid',
|
|
64
|
+
plan_months: 12,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Renew subscription
|
|
68
|
+
await admin.renewInstance(instance.id, { months: 12 });
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### 2. WhatsApp Client
|
|
45
74
|
|
|
46
75
|
```typescript
|
|
47
76
|
import { BotcastClient } from 'botcast-sdk';
|
package/dist/admin.cjs
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BotcastAdminClient = void 0;
|
|
4
|
+
const errors_js_1 = require("./errors.js");
|
|
5
|
+
class BotcastAdminClient {
|
|
6
|
+
baseUrl;
|
|
7
|
+
apiKey;
|
|
8
|
+
timeout;
|
|
9
|
+
headers;
|
|
10
|
+
constructor(config) {
|
|
11
|
+
if (!config.apiKey) {
|
|
12
|
+
throw new Error('BotcastAdminClient requires a valid "apiKey" (e.g. bcast_live_...)');
|
|
13
|
+
}
|
|
14
|
+
this.baseUrl = (config.baseUrl || 'https://botcast.site').replace(/\/+$/, '');
|
|
15
|
+
this.apiKey = config.apiKey.trim();
|
|
16
|
+
this.timeout = config.timeout || 30000;
|
|
17
|
+
this.headers = config.headers || {};
|
|
18
|
+
}
|
|
19
|
+
async request(endpoint, options = {}) {
|
|
20
|
+
const url = `${this.baseUrl}${endpoint.startsWith('/') ? '' : '/'}${endpoint}`;
|
|
21
|
+
const controller = new AbortController();
|
|
22
|
+
const timer = setTimeout(() => controller.abort(), this.timeout);
|
|
23
|
+
const mergedHeaders = {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
'x-api-key': this.apiKey,
|
|
26
|
+
...this.headers,
|
|
27
|
+
...(options.headers || {}),
|
|
28
|
+
};
|
|
29
|
+
try {
|
|
30
|
+
const res = await fetch(url, {
|
|
31
|
+
...options,
|
|
32
|
+
headers: mergedHeaders,
|
|
33
|
+
signal: controller.signal,
|
|
34
|
+
});
|
|
35
|
+
const body = await res.json().catch(() => ({}));
|
|
36
|
+
if (!res.ok) {
|
|
37
|
+
throw new errors_js_1.BotcastError(body.message || body.error || `HTTP ${res.status}: ${res.statusText}`, res.status, body);
|
|
38
|
+
}
|
|
39
|
+
return body;
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
if (err.name === 'AbortError') {
|
|
43
|
+
throw new errors_js_1.BotcastError(`Request timed out after ${this.timeout}ms`, 408);
|
|
44
|
+
}
|
|
45
|
+
throw err;
|
|
46
|
+
}
|
|
47
|
+
finally {
|
|
48
|
+
clearTimeout(timer);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Lists all instances under this admin/partner account with live statuses and stats.
|
|
53
|
+
*/
|
|
54
|
+
async listInstances() {
|
|
55
|
+
return this.request('/api/instances', { method: 'GET' });
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Retrieves single instance details including QR code, pairing code, status, and expiry.
|
|
59
|
+
*/
|
|
60
|
+
async getInstance(instanceId) {
|
|
61
|
+
return this.request(`/api/instances/${instanceId}`, { method: 'GET' });
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Creates and immediately provisions a new WhatsApp or Telegram instance.
|
|
65
|
+
* Admins are zero-payment, so instances are provisioned as active paid instances.
|
|
66
|
+
*/
|
|
67
|
+
async createInstance(options) {
|
|
68
|
+
return this.request('/api/instances', {
|
|
69
|
+
method: 'POST',
|
|
70
|
+
body: JSON.stringify({
|
|
71
|
+
name: options.name,
|
|
72
|
+
platform: options.platform || 'whatsapp',
|
|
73
|
+
type: options.type || 'paid',
|
|
74
|
+
plan_months: options.plan_months || 12,
|
|
75
|
+
allowed_numbers: options.allowed_numbers || [],
|
|
76
|
+
webhook_url: options.webhook_url || '',
|
|
77
|
+
target_user_id: options.target_user_id,
|
|
78
|
+
}),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Programmatically renews an instance's subscription without payment transactions.
|
|
83
|
+
*/
|
|
84
|
+
async renewInstance(instanceId, options) {
|
|
85
|
+
return this.request(`/api/instances/${instanceId}/renew`, {
|
|
86
|
+
method: 'POST',
|
|
87
|
+
body: JSON.stringify({
|
|
88
|
+
months: options?.months || options?.plan_months || 12,
|
|
89
|
+
}),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Updates instance configuration (name, webhook URL, allowed recipient numbers).
|
|
94
|
+
*/
|
|
95
|
+
async updateInstance(instanceId, updates) {
|
|
96
|
+
return this.request(`/api/instances/${instanceId}`, {
|
|
97
|
+
method: 'PUT',
|
|
98
|
+
body: JSON.stringify(updates),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Regenerates secret instance token for an instance.
|
|
103
|
+
*/
|
|
104
|
+
async regenerateInstanceToken(instanceId) {
|
|
105
|
+
return this.request(`/api/instances/${instanceId}/regenerate-token`, {
|
|
106
|
+
method: 'POST',
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Deletes and cleans up an instance.
|
|
111
|
+
*/
|
|
112
|
+
async deleteInstance(instanceId) {
|
|
113
|
+
return this.request(`/api/instances/${instanceId}`, {
|
|
114
|
+
method: 'DELETE',
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.BotcastAdminClient = BotcastAdminClient;
|
package/dist/admin.d.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export interface BotcastAdminConfig {
|
|
2
|
+
baseUrl?: string;
|
|
3
|
+
apiKey: string;
|
|
4
|
+
timeout?: number;
|
|
5
|
+
headers?: Record<string, string>;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateAdminInstanceOptions {
|
|
8
|
+
name: string;
|
|
9
|
+
platform?: 'whatsapp' | 'telegram';
|
|
10
|
+
type?: 'dev' | 'paid';
|
|
11
|
+
plan_months?: number;
|
|
12
|
+
allowed_numbers?: string[];
|
|
13
|
+
webhook_url?: string;
|
|
14
|
+
target_user_id?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface AdminInstanceRecord {
|
|
17
|
+
id: string;
|
|
18
|
+
user_id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
instance_token: string;
|
|
21
|
+
platform: 'whatsapp' | 'telegram';
|
|
22
|
+
type: 'dev' | 'paid';
|
|
23
|
+
status: string;
|
|
24
|
+
allowed_numbers: string[];
|
|
25
|
+
webhook_url: string | null;
|
|
26
|
+
plan_months: number;
|
|
27
|
+
expires_at: string | null;
|
|
28
|
+
is_expired?: boolean;
|
|
29
|
+
qr?: string | null;
|
|
30
|
+
pairingCode?: string | null;
|
|
31
|
+
created_at: string;
|
|
32
|
+
}
|
|
33
|
+
export declare class BotcastAdminClient {
|
|
34
|
+
private baseUrl;
|
|
35
|
+
private apiKey;
|
|
36
|
+
private timeout;
|
|
37
|
+
private headers;
|
|
38
|
+
constructor(config: BotcastAdminConfig);
|
|
39
|
+
private request;
|
|
40
|
+
/**
|
|
41
|
+
* Lists all instances under this admin/partner account with live statuses and stats.
|
|
42
|
+
*/
|
|
43
|
+
listInstances(): Promise<{
|
|
44
|
+
instances: AdminInstanceRecord[];
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Retrieves single instance details including QR code, pairing code, status, and expiry.
|
|
48
|
+
*/
|
|
49
|
+
getInstance(instanceId: string): Promise<{
|
|
50
|
+
instance: AdminInstanceRecord;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates and immediately provisions a new WhatsApp or Telegram instance.
|
|
54
|
+
* Admins are zero-payment, so instances are provisioned as active paid instances.
|
|
55
|
+
*/
|
|
56
|
+
createInstance(options: CreateAdminInstanceOptions): Promise<{
|
|
57
|
+
message: string;
|
|
58
|
+
instance: AdminInstanceRecord;
|
|
59
|
+
}>;
|
|
60
|
+
/**
|
|
61
|
+
* Programmatically renews an instance's subscription without payment transactions.
|
|
62
|
+
*/
|
|
63
|
+
renewInstance(instanceId: string, options?: {
|
|
64
|
+
months?: number;
|
|
65
|
+
plan_months?: number;
|
|
66
|
+
}): Promise<{
|
|
67
|
+
success: boolean;
|
|
68
|
+
message: string;
|
|
69
|
+
instance: AdminInstanceRecord;
|
|
70
|
+
}>;
|
|
71
|
+
/**
|
|
72
|
+
* Updates instance configuration (name, webhook URL, allowed recipient numbers).
|
|
73
|
+
*/
|
|
74
|
+
updateInstance(instanceId: string, updates: {
|
|
75
|
+
name?: string;
|
|
76
|
+
webhook_url?: string;
|
|
77
|
+
allowed_numbers?: string[];
|
|
78
|
+
}): Promise<{
|
|
79
|
+
message: string;
|
|
80
|
+
instance: AdminInstanceRecord;
|
|
81
|
+
}>;
|
|
82
|
+
/**
|
|
83
|
+
* Regenerates secret instance token for an instance.
|
|
84
|
+
*/
|
|
85
|
+
regenerateInstanceToken(instanceId: string): Promise<{
|
|
86
|
+
message: string;
|
|
87
|
+
instance_token: string;
|
|
88
|
+
}>;
|
|
89
|
+
/**
|
|
90
|
+
* Deletes and cleans up an instance.
|
|
91
|
+
*/
|
|
92
|
+
deleteInstance(instanceId: string): Promise<{
|
|
93
|
+
message: string;
|
|
94
|
+
instanceId: string;
|
|
95
|
+
}>;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/admin.ts"],"names":[],"mappings":"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"}
|
package/dist/admin.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { BotcastError } from './errors.js';
|
|
2
|
+
export class BotcastAdminClient {
|
|
3
|
+
baseUrl;
|
|
4
|
+
apiKey;
|
|
5
|
+
timeout;
|
|
6
|
+
headers;
|
|
7
|
+
constructor(config) {
|
|
8
|
+
if (!config.apiKey) {
|
|
9
|
+
throw new Error('BotcastAdminClient requires a valid "apiKey" (e.g. bcast_live_...)');
|
|
10
|
+
}
|
|
11
|
+
this.baseUrl = (config.baseUrl || 'https://botcast.site').replace(/\/+$/, '');
|
|
12
|
+
this.apiKey = config.apiKey.trim();
|
|
13
|
+
this.timeout = config.timeout || 30000;
|
|
14
|
+
this.headers = config.headers || {};
|
|
15
|
+
}
|
|
16
|
+
async request(endpoint, options = {}) {
|
|
17
|
+
const url = `${this.baseUrl}${endpoint.startsWith('/') ? '' : '/'}${endpoint}`;
|
|
18
|
+
const controller = new AbortController();
|
|
19
|
+
const timer = setTimeout(() => controller.abort(), this.timeout);
|
|
20
|
+
const mergedHeaders = {
|
|
21
|
+
'Content-Type': 'application/json',
|
|
22
|
+
'x-api-key': this.apiKey,
|
|
23
|
+
...this.headers,
|
|
24
|
+
...(options.headers || {}),
|
|
25
|
+
};
|
|
26
|
+
try {
|
|
27
|
+
const res = await fetch(url, {
|
|
28
|
+
...options,
|
|
29
|
+
headers: mergedHeaders,
|
|
30
|
+
signal: controller.signal,
|
|
31
|
+
});
|
|
32
|
+
const body = await res.json().catch(() => ({}));
|
|
33
|
+
if (!res.ok) {
|
|
34
|
+
throw new BotcastError(body.message || body.error || `HTTP ${res.status}: ${res.statusText}`, res.status, body);
|
|
35
|
+
}
|
|
36
|
+
return body;
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
if (err.name === 'AbortError') {
|
|
40
|
+
throw new BotcastError(`Request timed out after ${this.timeout}ms`, 408);
|
|
41
|
+
}
|
|
42
|
+
throw err;
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
clearTimeout(timer);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Lists all instances under this admin/partner account with live statuses and stats.
|
|
50
|
+
*/
|
|
51
|
+
async listInstances() {
|
|
52
|
+
return this.request('/api/instances', { method: 'GET' });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves single instance details including QR code, pairing code, status, and expiry.
|
|
56
|
+
*/
|
|
57
|
+
async getInstance(instanceId) {
|
|
58
|
+
return this.request(`/api/instances/${instanceId}`, { method: 'GET' });
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Creates and immediately provisions a new WhatsApp or Telegram instance.
|
|
62
|
+
* Admins are zero-payment, so instances are provisioned as active paid instances.
|
|
63
|
+
*/
|
|
64
|
+
async createInstance(options) {
|
|
65
|
+
return this.request('/api/instances', {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
body: JSON.stringify({
|
|
68
|
+
name: options.name,
|
|
69
|
+
platform: options.platform || 'whatsapp',
|
|
70
|
+
type: options.type || 'paid',
|
|
71
|
+
plan_months: options.plan_months || 12,
|
|
72
|
+
allowed_numbers: options.allowed_numbers || [],
|
|
73
|
+
webhook_url: options.webhook_url || '',
|
|
74
|
+
target_user_id: options.target_user_id,
|
|
75
|
+
}),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Programmatically renews an instance's subscription without payment transactions.
|
|
80
|
+
*/
|
|
81
|
+
async renewInstance(instanceId, options) {
|
|
82
|
+
return this.request(`/api/instances/${instanceId}/renew`, {
|
|
83
|
+
method: 'POST',
|
|
84
|
+
body: JSON.stringify({
|
|
85
|
+
months: options?.months || options?.plan_months || 12,
|
|
86
|
+
}),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Updates instance configuration (name, webhook URL, allowed recipient numbers).
|
|
91
|
+
*/
|
|
92
|
+
async updateInstance(instanceId, updates) {
|
|
93
|
+
return this.request(`/api/instances/${instanceId}`, {
|
|
94
|
+
method: 'PUT',
|
|
95
|
+
body: JSON.stringify(updates),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Regenerates secret instance token for an instance.
|
|
100
|
+
*/
|
|
101
|
+
async regenerateInstanceToken(instanceId) {
|
|
102
|
+
return this.request(`/api/instances/${instanceId}/regenerate-token`, {
|
|
103
|
+
method: 'POST',
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Deletes and cleans up an instance.
|
|
108
|
+
*/
|
|
109
|
+
async deleteInstance(instanceId) {
|
|
110
|
+
return this.request(`/api/instances/${instanceId}`, {
|
|
111
|
+
method: 'DELETE',
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -14,9 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.BotcastWebhook = exports.BotcastClient = void 0;
|
|
17
|
+
exports.BotcastWebhook = exports.BotcastAdminClient = exports.BotcastClient = void 0;
|
|
18
18
|
var client_js_1 = require("./client.js");
|
|
19
19
|
Object.defineProperty(exports, "BotcastClient", { enumerable: true, get: function () { return client_js_1.BotcastClient; } });
|
|
20
|
+
var admin_js_1 = require("./admin.js");
|
|
21
|
+
Object.defineProperty(exports, "BotcastAdminClient", { enumerable: true, get: function () { return admin_js_1.BotcastAdminClient; } });
|
|
20
22
|
var index_js_1 = require("./webhooks/index.js");
|
|
21
23
|
Object.defineProperty(exports, "BotcastWebhook", { enumerable: true, get: function () { return index_js_1.BotcastWebhook; } });
|
|
22
24
|
__exportStar(require("./errors.js"), exports);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { BotcastClient } from './client.js';
|
|
2
|
+
export { BotcastAdminClient, BotcastAdminConfig, CreateAdminInstanceOptions, AdminInstanceRecord } from './admin.js';
|
|
2
3
|
export { BotcastWebhook } from './webhooks/index.js';
|
|
3
4
|
export * from './errors.js';
|
|
4
5
|
export * from './types/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,eAAe,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACrH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,eAAe,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED