epist 1.2.0 → 1.2.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.
package/README.md CHANGED
@@ -19,8 +19,14 @@ const client = new Epist({
19
19
  apiKey: process.env.EPIST_API_KEY,
20
20
  });
21
21
 
22
- // 1. Upload and Transcribe
23
- const audio = await client.uploadFile(file);
22
+ // 1. Transcribe from URL with Webhooks
23
+ const audio = await client.transcribeUrl(
24
+ "https://example.com/audio.mp3",
25
+ true,
26
+ "en",
27
+ "general",
28
+ "https://your-app.com/webhooks"
29
+ );
24
30
  console.log(`Processing: ${audio.id}`);
25
31
 
26
32
  // 2. Ingest entire RSS Feed (Beta)
@@ -16,6 +16,10 @@ export interface AudioStatus {
16
16
  title: string;
17
17
  created_at: string;
18
18
  error?: string;
19
+ webhook_url?: string;
20
+ transcript?: string;
21
+ summary?: string;
22
+ entities?: any[];
19
23
  }
20
24
  export interface TranscriptSegment {
21
25
  id: string;
@@ -62,5 +66,10 @@ export declare class Epist {
62
66
  /**
63
67
  * Ingest a podcast RSS feed
64
68
  */
65
- ingestRss(url: string, name?: string, refreshIntervalMinutes?: number): Promise<any>;
69
+ ingestRss(url: string, name?: string, refreshIntervalMinutes?: number, options?: {
70
+ max_episodes?: number;
71
+ start_date?: string;
72
+ include_keywords?: string;
73
+ exclude_keywords?: string;
74
+ }): Promise<any>;
66
75
  }
package/dist/cjs/index.js CHANGED
@@ -124,13 +124,16 @@ class Epist {
124
124
  /**
125
125
  * Ingest a podcast RSS feed
126
126
  */
127
- async ingestRss(url, name, refreshIntervalMinutes) {
127
+ async ingestRss(url, name, refreshIntervalMinutes, options) {
128
128
  try {
129
- const payload = { url };
130
- if (name)
131
- payload.name = name;
132
- if (refreshIntervalMinutes)
133
- payload.refresh_interval_minutes = refreshIntervalMinutes;
129
+ const payload = {
130
+ url,
131
+ name,
132
+ refresh_interval_minutes: refreshIntervalMinutes,
133
+ ...options
134
+ };
135
+ // Filter undefined values
136
+ Object.keys(payload).forEach(key => payload[key] === undefined && delete payload[key]);
134
137
  const response = await this.client.post('/ingest/rss', payload);
135
138
  return response.data;
136
139
  }
package/dist/esm/index.js CHANGED
@@ -117,13 +117,16 @@ export class Epist {
117
117
  /**
118
118
  * Ingest a podcast RSS feed
119
119
  */
120
- async ingestRss(url, name, refreshIntervalMinutes) {
120
+ async ingestRss(url, name, refreshIntervalMinutes, options) {
121
121
  try {
122
- const payload = { url };
123
- if (name)
124
- payload.name = name;
125
- if (refreshIntervalMinutes)
126
- payload.refresh_interval_minutes = refreshIntervalMinutes;
122
+ const payload = {
123
+ url,
124
+ name,
125
+ refresh_interval_minutes: refreshIntervalMinutes,
126
+ ...options
127
+ };
128
+ // Filter undefined values
129
+ Object.keys(payload).forEach(key => payload[key] === undefined && delete payload[key]);
127
130
  const response = await this.client.post('/ingest/rss', payload);
128
131
  return response.data;
129
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epist",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Official JavaScript/TypeScript SDK for Epist.ai",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/publish_npm.sh ADDED
@@ -0,0 +1,24 @@
1
+ #!/bin/bash
2
+
3
+ # Script to publish the JS SDK to NPM
4
+ # Usage: ./publish_npm.sh
5
+
6
+ set -e
7
+
8
+ echo "🚀 Starting NPM publish process for epist-js..."
9
+
10
+ # 1. Navigate to JS SDK directory
11
+ cd "$(dirname "$0")"
12
+
13
+ # 2. Build the package
14
+ echo "📦 Building package..."
15
+ npm install
16
+ npm run build
17
+
18
+ # 3. Publish to NPM
19
+ echo "🚢 Publishing to NPM..."
20
+ # In CI, we use --access public and rely on NPM_TOKEN
21
+ # For manual use, this might require npm login
22
+ npm publish --access public
23
+
24
+ echo "✅ Successfully published epist version $(node -p "require('./package.json').version")"
package/src/index.ts CHANGED
@@ -20,6 +20,10 @@ export interface AudioStatus {
20
20
  title: string;
21
21
  created_at: string;
22
22
  error?: string;
23
+ webhook_url?: string;
24
+ transcript?: string;
25
+ summary?: string;
26
+ entities?: any[];
23
27
  }
24
28
 
25
29
  export interface TranscriptSegment {
@@ -164,11 +168,27 @@ export class Epist {
164
168
  /**
165
169
  * Ingest a podcast RSS feed
166
170
  */
167
- async ingestRss(url: string, name?: string, refreshIntervalMinutes?: number): Promise<any> {
171
+ async ingestRss(
172
+ url: string,
173
+ name?: string,
174
+ refreshIntervalMinutes?: number,
175
+ options?: {
176
+ max_episodes?: number;
177
+ start_date?: string;
178
+ include_keywords?: string;
179
+ exclude_keywords?: string;
180
+ }
181
+ ): Promise<any> {
168
182
  try {
169
- const payload: any = { url };
170
- if (name) payload.name = name;
171
- if (refreshIntervalMinutes) payload.refresh_interval_minutes = refreshIntervalMinutes;
183
+ const payload: any = {
184
+ url,
185
+ name,
186
+ refresh_interval_minutes: refreshIntervalMinutes,
187
+ ...options
188
+ };
189
+
190
+ // Filter undefined values
191
+ Object.keys(payload).forEach(key => payload[key] === undefined && delete payload[key]);
172
192
 
173
193
  const response = await this.client.post('/ingest/rss', payload);
174
194
  return response.data;