@wave-av/sdk 2.0.0 → 2.0.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/CHANGELOG.md +1 -1
- package/README.md +27 -23
- package/dist/audience.js +93 -0
- package/dist/audience.mjs +9 -0
- package/dist/camera-control.js +95 -0
- package/dist/camera-control.mjs +71 -0
- package/dist/captions-types.js +18 -0
- package/dist/captions-types.mjs +0 -0
- package/dist/captions.js +266 -0
- package/dist/captions.mjs +9 -0
- package/dist/chapters-types.js +18 -0
- package/dist/chapters-types.mjs +0 -0
- package/dist/chapters.js +280 -0
- package/dist/chapters.mjs +9 -0
- package/dist/chunk-362MRITF.mjs +46 -0
- package/dist/chunk-3ZLK4J3V.mjs +69 -0
- package/dist/chunk-4DG4OBRD.mjs +52 -0
- package/dist/chunk-4G7FMCMJ.mjs +68 -0
- package/dist/chunk-4KD5F6E3.mjs +0 -0
- package/dist/chunk-7M6XVUUK.mjs +241 -0
- package/dist/chunk-A344OOT7.mjs +243 -0
- package/dist/chunk-AI64YR5W.mjs +173 -0
- package/dist/chunk-C2GQ756E.mjs +57 -0
- package/dist/chunk-CO2VB72Z.mjs +255 -0
- package/dist/chunk-DWXWAILB.mjs +44 -0
- package/dist/chunk-FLEFYLDM.mjs +71 -0
- package/dist/chunk-H2YYTNUH.mjs +266 -0
- package/dist/chunk-IGDBED5P.mjs +246 -0
- package/dist/chunk-IL2SGWBC.mjs +0 -0
- package/dist/chunk-IVFZ5X4W.mjs +68 -0
- package/dist/chunk-JC32PG3T.mjs +114 -0
- package/dist/chunk-K5X42NLD.mjs +54 -0
- package/dist/chunk-KCEPNS2U.mjs +276 -0
- package/dist/chunk-LVOVF6XC.mjs +54 -0
- package/dist/chunk-M4Z33V3N.mjs +247 -0
- package/dist/chunk-M6FKIX75.mjs +0 -0
- package/dist/chunk-M744Z327.mjs +244 -0
- package/dist/chunk-MRFDPPFK.mjs +61 -0
- package/dist/chunk-MXU3Q23F.mjs +68 -0
- package/dist/chunk-NCVUZ746.mjs +60 -0
- package/dist/chunk-NLQVD2LF.mjs +210 -0
- package/dist/chunk-O6DOGYP5.mjs +238 -0
- package/dist/chunk-S25NY5GE.mjs +124 -0
- package/dist/chunk-TFHXBICQ.mjs +305 -0
- package/dist/chunk-TXWOA2VR.mjs +57 -0
- package/dist/chunk-UCDSNV22.mjs +63 -0
- package/dist/chunk-V5DWA5P4.mjs +279 -0
- package/dist/chunk-VLQQDYGP.mjs +173 -0
- package/dist/chunk-VPKZUXZW.mjs +53 -0
- package/dist/chunk-WS3PEFYJ.mjs +60 -0
- package/dist/chunk-XGAYMWRH.mjs +74 -0
- package/dist/chunk-XMM5J57W.mjs +0 -0
- package/dist/chunk-XWABBOSX.mjs +278 -0
- package/dist/chunk-Y6FXYEAI.mjs +10 -0
- package/dist/chunk-YBLXHI3M.mjs +257 -0
- package/dist/chunk-YEK26SSO.mjs +100 -0
- package/dist/chunk-YLCQKCZL.mjs +0 -0
- package/dist/chunk-YRKO4XI7.mjs +0 -0
- package/dist/chunk-ZJO7AP4Q.mjs +0 -0
- package/dist/client-types.js +18 -0
- package/dist/client-types.mjs +0 -0
- package/dist/client.js +311 -0
- package/dist/client.mjs +14 -0
- package/dist/clips-types.js +18 -0
- package/dist/clips-types.mjs +0 -0
- package/dist/clips.js +198 -0
- package/dist/clips.mjs +9 -0
- package/dist/cloud-switcher.js +80 -0
- package/dist/cloud-switcher.mjs +56 -0
- package/dist/collab-types.js +18 -0
- package/dist/collab-types.mjs +1 -0
- package/dist/collab.js +304 -0
- package/dist/collab.mjs +10 -0
- package/dist/connect.js +85 -0
- package/dist/connect.mjs +9 -0
- package/dist/creator.js +79 -0
- package/dist/creator.mjs +9 -0
- package/dist/desktop.js +77 -0
- package/dist/desktop.mjs +9 -0
- package/dist/distribution.js +88 -0
- package/dist/distribution.mjs +9 -0
- package/dist/drm.js +85 -0
- package/dist/drm.mjs +9 -0
- package/dist/edge.js +93 -0
- package/dist/edge.mjs +9 -0
- package/dist/editor-types.js +18 -0
- package/dist/editor-types.mjs +1 -0
- package/dist/editor.js +330 -0
- package/dist/editor.mjs +10 -0
- package/dist/fleet.js +149 -0
- package/dist/fleet.mjs +9 -0
- package/dist/ghost.js +139 -0
- package/dist/ghost.mjs +9 -0
- package/dist/index.js +0 -250
- package/dist/index.mjs +161 -5445
- package/dist/marketplace.js +82 -0
- package/dist/marketplace.mjs +9 -0
- package/dist/mesh.js +198 -0
- package/dist/mesh.mjs +9 -0
- package/dist/notifications.js +79 -0
- package/dist/notifications.mjs +9 -0
- package/dist/phone-types.js +18 -0
- package/dist/phone-types.mjs +0 -0
- package/dist/phone.js +269 -0
- package/dist/phone.mjs +9 -0
- package/dist/pipeline-types.js +18 -0
- package/dist/pipeline-types.mjs +0 -0
- package/dist/pipeline.js +263 -0
- package/dist/pipeline.mjs +9 -0
- package/dist/podcast.js +94 -0
- package/dist/podcast.mjs +9 -0
- package/dist/prism.js +82 -0
- package/dist/prism.mjs +9 -0
- package/dist/prompter.js +99 -0
- package/dist/prompter.mjs +76 -0
- package/dist/pulse.js +99 -0
- package/dist/pulse.mjs +9 -0
- package/dist/qr.js +71 -0
- package/dist/qr.mjs +9 -0
- package/dist/replay.js +62 -0
- package/dist/replay.mjs +38 -0
- package/dist/scene-types.js +18 -0
- package/dist/scene-types.mjs +1 -0
- package/dist/scene.js +271 -0
- package/dist/scene.mjs +10 -0
- package/dist/search-types.js +18 -0
- package/dist/search-types.mjs +1 -0
- package/dist/search.js +268 -0
- package/dist/search.mjs +10 -0
- package/dist/sentiment-types.js +18 -0
- package/dist/sentiment-types.mjs +0 -0
- package/dist/sentiment.js +235 -0
- package/dist/sentiment.mjs +9 -0
- package/dist/signage.js +93 -0
- package/dist/signage.mjs +9 -0
- package/dist/slides.js +78 -0
- package/dist/slides.mjs +9 -0
- package/dist/studio-ai-types.js +18 -0
- package/dist/studio-ai-types.mjs +1 -0
- package/dist/studio-ai.js +301 -0
- package/dist/studio-ai.mjs +10 -0
- package/dist/studio-types.js +18 -0
- package/dist/studio-types.mjs +1 -0
- package/dist/studio.js +303 -0
- package/dist/studio.mjs +10 -0
- package/dist/telemetry.js +124 -0
- package/dist/telemetry.mjs +15 -0
- package/dist/transcribe-types.js +18 -0
- package/dist/transcribe-types.mjs +1 -0
- package/dist/transcribe.js +282 -0
- package/dist/transcribe.mjs +10 -0
- package/dist/usb.js +69 -0
- package/dist/usb.mjs +9 -0
- package/dist/vault.js +96 -0
- package/dist/vault.mjs +9 -0
- package/dist/voice-types.js +18 -0
- package/dist/voice-types.mjs +0 -0
- package/dist/voice.js +272 -0
- package/dist/voice.mjs +9 -0
- package/dist/zoom.js +86 -0
- package/dist/zoom.mjs +9 -0
- package/package.json +3 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/pipeline-types.ts
|
|
17
|
+
var pipeline_types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(pipeline_types_exports);
|
|
File without changes
|
package/dist/pipeline.js
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/pipeline.ts
|
|
21
|
+
var pipeline_exports = {};
|
|
22
|
+
__export(pipeline_exports, {
|
|
23
|
+
PipelineAPI: () => PipelineAPI,
|
|
24
|
+
createPipelineAPI: () => createPipelineAPI
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(pipeline_exports);
|
|
27
|
+
var PipelineAPI = class {
|
|
28
|
+
client;
|
|
29
|
+
basePath = "/v1/streams";
|
|
30
|
+
constructor(client) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
// ==========================================================================
|
|
34
|
+
// Stream CRUD
|
|
35
|
+
// ==========================================================================
|
|
36
|
+
/**
|
|
37
|
+
* Create a new stream
|
|
38
|
+
*
|
|
39
|
+
* Requires: streams:create permission
|
|
40
|
+
*/
|
|
41
|
+
async create(request) {
|
|
42
|
+
return this.client.post(this.basePath, request);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get a stream by ID
|
|
46
|
+
*
|
|
47
|
+
* Requires: streams:read permission
|
|
48
|
+
*/
|
|
49
|
+
async get(streamId) {
|
|
50
|
+
return this.client.get(`${this.basePath}/${streamId}`);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Update a stream
|
|
54
|
+
*
|
|
55
|
+
* Requires: streams:update permission
|
|
56
|
+
*/
|
|
57
|
+
async update(streamId, request) {
|
|
58
|
+
return this.client.patch(`${this.basePath}/${streamId}`, request);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Remove a stream
|
|
62
|
+
*
|
|
63
|
+
* Requires: streams:remove permission (server-side RBAC enforced)
|
|
64
|
+
*/
|
|
65
|
+
async remove(streamId) {
|
|
66
|
+
await this.client.delete(`${this.basePath}/${streamId}`);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* List streams with optional filters
|
|
70
|
+
*
|
|
71
|
+
* Requires: streams:read permission
|
|
72
|
+
*/
|
|
73
|
+
async list(params) {
|
|
74
|
+
const queryParams = {
|
|
75
|
+
limit: params?.limit,
|
|
76
|
+
offset: params?.offset,
|
|
77
|
+
cursor: params?.cursor,
|
|
78
|
+
status: params?.status,
|
|
79
|
+
protocol: params?.protocol,
|
|
80
|
+
created_after: params?.created_after,
|
|
81
|
+
created_before: params?.created_before,
|
|
82
|
+
order_by: params?.order_by,
|
|
83
|
+
order: params?.order
|
|
84
|
+
};
|
|
85
|
+
return this.client.get(this.basePath, {
|
|
86
|
+
params: queryParams
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// ==========================================================================
|
|
90
|
+
// Stream Lifecycle
|
|
91
|
+
// ==========================================================================
|
|
92
|
+
/**
|
|
93
|
+
* Start a stream
|
|
94
|
+
*
|
|
95
|
+
* Transitions the stream from idle to connecting. The stream will move
|
|
96
|
+
* to "live" once media is received on the ingest endpoint.
|
|
97
|
+
*
|
|
98
|
+
* Requires: streams:start permission
|
|
99
|
+
*/
|
|
100
|
+
async start(streamId) {
|
|
101
|
+
return this.client.post(`${this.basePath}/${streamId}/start`);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Stop a stream
|
|
105
|
+
*
|
|
106
|
+
* Gracefully ends the stream. Any active recording will be finalized.
|
|
107
|
+
*
|
|
108
|
+
* Requires: streams:stop permission
|
|
109
|
+
*/
|
|
110
|
+
async stop(streamId) {
|
|
111
|
+
return this.client.post(`${this.basePath}/${streamId}/stop`);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Switch the ingest protocol for a live stream
|
|
115
|
+
*
|
|
116
|
+
* Performs a zero-downtime protocol switch. The stream will briefly
|
|
117
|
+
* enter "reconnecting" status during the transition.
|
|
118
|
+
*
|
|
119
|
+
* Requires: streams:update permission
|
|
120
|
+
*/
|
|
121
|
+
async switchProtocol(streamId, protocol) {
|
|
122
|
+
return this.client.post(`${this.basePath}/${streamId}/switch-protocol`, { protocol });
|
|
123
|
+
}
|
|
124
|
+
// ==========================================================================
|
|
125
|
+
// Health & Monitoring
|
|
126
|
+
// ==========================================================================
|
|
127
|
+
/**
|
|
128
|
+
* Get real-time health metrics for a stream
|
|
129
|
+
*
|
|
130
|
+
* Returns current bitrate, frame rate, latency, and overall health status.
|
|
131
|
+
*
|
|
132
|
+
* Requires: streams:read permission
|
|
133
|
+
*/
|
|
134
|
+
async getHealth(streamId) {
|
|
135
|
+
return this.client.get(`${this.basePath}/${streamId}/health`);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Get ingest endpoints for a stream
|
|
139
|
+
*
|
|
140
|
+
* Returns primary and backup URLs for each configured protocol.
|
|
141
|
+
*
|
|
142
|
+
* Requires: streams:read permission
|
|
143
|
+
*/
|
|
144
|
+
async getIngestEndpoints(streamId) {
|
|
145
|
+
return this.client.get(`${this.basePath}/${streamId}/ingest-endpoints`);
|
|
146
|
+
}
|
|
147
|
+
// ==========================================================================
|
|
148
|
+
// Recording
|
|
149
|
+
// ==========================================================================
|
|
150
|
+
/**
|
|
151
|
+
* Start recording a live stream
|
|
152
|
+
*
|
|
153
|
+
* Begins capturing the stream to a file. The stream must be in "live" status.
|
|
154
|
+
*
|
|
155
|
+
* Requires: streams:record permission
|
|
156
|
+
*/
|
|
157
|
+
async startRecording(streamId) {
|
|
158
|
+
return this.client.post(`${this.basePath}/${streamId}/recordings/start`);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Stop recording a live stream
|
|
162
|
+
*
|
|
163
|
+
* Finalizes the current recording. The recording enters "processing" status
|
|
164
|
+
* while it is being packaged.
|
|
165
|
+
*
|
|
166
|
+
* Requires: streams:record permission
|
|
167
|
+
*/
|
|
168
|
+
async stopRecording(streamId) {
|
|
169
|
+
return this.client.post(`${this.basePath}/${streamId}/recordings/stop`);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* List recordings for a stream
|
|
173
|
+
*
|
|
174
|
+
* Requires: streams:read permission
|
|
175
|
+
*/
|
|
176
|
+
async listRecordings(streamId, params) {
|
|
177
|
+
return this.client.get(
|
|
178
|
+
`${this.basePath}/${streamId}/recordings`,
|
|
179
|
+
{ params }
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get a specific recording
|
|
184
|
+
*
|
|
185
|
+
* Requires: streams:read permission
|
|
186
|
+
*/
|
|
187
|
+
async getRecording(streamId, recordingId) {
|
|
188
|
+
return this.client.get(
|
|
189
|
+
`${this.basePath}/${streamId}/recordings/${recordingId}`
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
// ==========================================================================
|
|
193
|
+
// Viewers
|
|
194
|
+
// ==========================================================================
|
|
195
|
+
/**
|
|
196
|
+
* List active viewer sessions for a stream
|
|
197
|
+
*
|
|
198
|
+
* Requires: streams:read permission
|
|
199
|
+
*/
|
|
200
|
+
async listViewers(streamId, params) {
|
|
201
|
+
return this.client.get(
|
|
202
|
+
`${this.basePath}/${streamId}/viewers`,
|
|
203
|
+
{ params }
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Get current and peak viewer count for a stream
|
|
208
|
+
*
|
|
209
|
+
* Requires: streams:read permission
|
|
210
|
+
*/
|
|
211
|
+
async getViewerCount(streamId) {
|
|
212
|
+
return this.client.get(
|
|
213
|
+
`${this.basePath}/${streamId}/viewers/count`
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
// ==========================================================================
|
|
217
|
+
// Polling Helpers
|
|
218
|
+
// ==========================================================================
|
|
219
|
+
/**
|
|
220
|
+
* Wait for a stream to reach "live" status
|
|
221
|
+
*
|
|
222
|
+
* Polls the stream until it transitions to "live" or a terminal state.
|
|
223
|
+
* Useful after calling `start()` to wait for the encoder to connect.
|
|
224
|
+
*
|
|
225
|
+
* @param streamId - Stream to monitor
|
|
226
|
+
* @param options - Polling configuration
|
|
227
|
+
* @param options.pollInterval - Milliseconds between polls (default: 2000)
|
|
228
|
+
* @param options.timeout - Maximum wait time in milliseconds (default: 120000)
|
|
229
|
+
* @param options.onProgress - Called on each poll with the current stream state
|
|
230
|
+
* @returns The stream once it reaches "live" status
|
|
231
|
+
* @throws Error if the stream enters "failed" or "ended" status, or if the timeout is exceeded
|
|
232
|
+
*/
|
|
233
|
+
async waitForLive(streamId, options) {
|
|
234
|
+
const pollInterval = options?.pollInterval || 2e3;
|
|
235
|
+
const timeout = options?.timeout || 12e4;
|
|
236
|
+
const startTime = Date.now();
|
|
237
|
+
while (Date.now() - startTime < timeout) {
|
|
238
|
+
const stream = await this.get(streamId);
|
|
239
|
+
if (options?.onProgress) {
|
|
240
|
+
options.onProgress(stream);
|
|
241
|
+
}
|
|
242
|
+
if (stream.status === "live") {
|
|
243
|
+
return stream;
|
|
244
|
+
}
|
|
245
|
+
if (stream.status === "failed") {
|
|
246
|
+
throw new Error(`Stream failed to go live: ${stream.id}`);
|
|
247
|
+
}
|
|
248
|
+
if (stream.status === "ended") {
|
|
249
|
+
throw new Error(`Stream ended before going live: ${stream.id}`);
|
|
250
|
+
}
|
|
251
|
+
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
252
|
+
}
|
|
253
|
+
throw new Error(`Stream did not go live within ${timeout}ms`);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
function createPipelineAPI(client) {
|
|
257
|
+
return new PipelineAPI(client);
|
|
258
|
+
}
|
|
259
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
260
|
+
0 && (module.exports = {
|
|
261
|
+
PipelineAPI,
|
|
262
|
+
createPipelineAPI
|
|
263
|
+
});
|
package/dist/podcast.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/podcast.ts
|
|
21
|
+
var podcast_exports = {};
|
|
22
|
+
__export(podcast_exports, {
|
|
23
|
+
PodcastAPI: () => PodcastAPI,
|
|
24
|
+
createPodcastAPI: () => createPodcastAPI
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(podcast_exports);
|
|
27
|
+
var PodcastAPI = class {
|
|
28
|
+
client;
|
|
29
|
+
basePath = "/v1/podcasts";
|
|
30
|
+
constructor(client) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
async create(request) {
|
|
34
|
+
return this.client.post(this.basePath, request);
|
|
35
|
+
}
|
|
36
|
+
async get(podcastId) {
|
|
37
|
+
return this.client.get(`${this.basePath}/${podcastId}`);
|
|
38
|
+
}
|
|
39
|
+
async update(podcastId, updates) {
|
|
40
|
+
return this.client.patch(`${this.basePath}/${podcastId}`, updates);
|
|
41
|
+
}
|
|
42
|
+
async remove(podcastId) {
|
|
43
|
+
await this.client.delete(`${this.basePath}/${podcastId}`);
|
|
44
|
+
}
|
|
45
|
+
async list(params) {
|
|
46
|
+
return this.client.get(this.basePath, {
|
|
47
|
+
params
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
async createEpisode(request) {
|
|
51
|
+
return this.client.post(`${this.basePath}/${request.podcast_id}/episodes`, request);
|
|
52
|
+
}
|
|
53
|
+
async getEpisode(episodeId) {
|
|
54
|
+
return this.client.get(`/v1/episodes/${episodeId}`);
|
|
55
|
+
}
|
|
56
|
+
async updateEpisode(episodeId, updates) {
|
|
57
|
+
return this.client.patch(`/v1/episodes/${episodeId}`, updates);
|
|
58
|
+
}
|
|
59
|
+
async removeEpisode(episodeId) {
|
|
60
|
+
await this.client.delete(`/v1/episodes/${episodeId}`);
|
|
61
|
+
}
|
|
62
|
+
async publishEpisode(episodeId) {
|
|
63
|
+
return this.client.post(`/v1/episodes/${episodeId}/publish`);
|
|
64
|
+
}
|
|
65
|
+
async listEpisodes(podcastId, params) {
|
|
66
|
+
return this.client.get(`${this.basePath}/${podcastId}/episodes`, {
|
|
67
|
+
params
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
async getRSSFeed(podcastId) {
|
|
71
|
+
return this.client.get(`${this.basePath}/${podcastId}/rss`);
|
|
72
|
+
}
|
|
73
|
+
async getAnalytics(podcastId, params) {
|
|
74
|
+
return this.client.get(`${this.basePath}/${podcastId}/analytics`, {
|
|
75
|
+
params
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
async distribute(podcastId, targets) {
|
|
79
|
+
return this.client.post(`${this.basePath}/${podcastId}/distribute`, {
|
|
80
|
+
targets
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async getDistributionStatus(podcastId) {
|
|
84
|
+
return this.client.get(`${this.basePath}/${podcastId}/distribution`);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
function createPodcastAPI(client) {
|
|
88
|
+
return new PodcastAPI(client);
|
|
89
|
+
}
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
PodcastAPI,
|
|
93
|
+
createPodcastAPI
|
|
94
|
+
});
|
package/dist/podcast.mjs
ADDED
package/dist/prism.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/prism.ts
|
|
21
|
+
var prism_exports = {};
|
|
22
|
+
__export(prism_exports, {
|
|
23
|
+
PrismAPI: () => PrismAPI,
|
|
24
|
+
createPrismAPI: () => createPrismAPI
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(prism_exports);
|
|
27
|
+
var PrismAPI = class {
|
|
28
|
+
client;
|
|
29
|
+
basePath = "/v1/prism";
|
|
30
|
+
constructor(client) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
async createDevice(request) {
|
|
34
|
+
return this.client.post(`${this.basePath}/devices`, request);
|
|
35
|
+
}
|
|
36
|
+
async getDevice(deviceId) {
|
|
37
|
+
return this.client.get(`${this.basePath}/devices/${deviceId}`);
|
|
38
|
+
}
|
|
39
|
+
async updateDevice(deviceId, request) {
|
|
40
|
+
return this.client.patch(`${this.basePath}/devices/${deviceId}`, request);
|
|
41
|
+
}
|
|
42
|
+
async removeDevice(deviceId) {
|
|
43
|
+
await this.client.delete(`${this.basePath}/devices/${deviceId}`);
|
|
44
|
+
}
|
|
45
|
+
async listDevices(params) {
|
|
46
|
+
return this.client.get(`${this.basePath}/devices`, {
|
|
47
|
+
params
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
async startDevice(deviceId) {
|
|
51
|
+
return this.client.post(`${this.basePath}/devices/${deviceId}/start`);
|
|
52
|
+
}
|
|
53
|
+
async stopDevice(deviceId) {
|
|
54
|
+
return this.client.post(`${this.basePath}/devices/${deviceId}/stop`);
|
|
55
|
+
}
|
|
56
|
+
async getHealth(deviceId) {
|
|
57
|
+
return this.client.get(`${this.basePath}/devices/${deviceId}/health`);
|
|
58
|
+
}
|
|
59
|
+
async discoverSources(options) {
|
|
60
|
+
return this.client.post(`${this.basePath}/discovery`, options);
|
|
61
|
+
}
|
|
62
|
+
async getPresets(deviceId) {
|
|
63
|
+
return this.client.get(`${this.basePath}/devices/${deviceId}/presets`);
|
|
64
|
+
}
|
|
65
|
+
async setPreset(deviceId, request) {
|
|
66
|
+
return this.client.put(`${this.basePath}/devices/${deviceId}/presets`, request);
|
|
67
|
+
}
|
|
68
|
+
async removePreset(deviceId, slotNumber) {
|
|
69
|
+
await this.client.delete(`${this.basePath}/devices/${deviceId}/presets/${slotNumber}`);
|
|
70
|
+
}
|
|
71
|
+
async recallPreset(deviceId, slotNumber) {
|
|
72
|
+
await this.client.post(`${this.basePath}/devices/${deviceId}/presets/${slotNumber}/recall`);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
function createPrismAPI(client) {
|
|
76
|
+
return new PrismAPI(client);
|
|
77
|
+
}
|
|
78
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
+
0 && (module.exports = {
|
|
80
|
+
PrismAPI,
|
|
81
|
+
createPrismAPI
|
|
82
|
+
});
|
package/dist/prism.mjs
ADDED
package/dist/prompter.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/prompter.ts
|
|
21
|
+
var prompter_exports = {};
|
|
22
|
+
__export(prompter_exports, {
|
|
23
|
+
createPrompterApi: () => createPrompterApi
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(prompter_exports);
|
|
26
|
+
function createPrompterApi(client) {
|
|
27
|
+
const basePath = "/api/v1/prompter";
|
|
28
|
+
return {
|
|
29
|
+
scripts: {
|
|
30
|
+
async list(params) {
|
|
31
|
+
return client.get(`${basePath}/scripts`, { params });
|
|
32
|
+
},
|
|
33
|
+
async get(scriptId) {
|
|
34
|
+
return client.get(`${basePath}/scripts/${scriptId}`);
|
|
35
|
+
},
|
|
36
|
+
async create(input) {
|
|
37
|
+
return client.post(`${basePath}/scripts`, input);
|
|
38
|
+
},
|
|
39
|
+
async update(scriptId, input) {
|
|
40
|
+
return client.patch(`${basePath}/scripts/${scriptId}`, input);
|
|
41
|
+
},
|
|
42
|
+
async delete(scriptId) {
|
|
43
|
+
return client.delete(`${basePath}/scripts/${scriptId}`);
|
|
44
|
+
},
|
|
45
|
+
async versions(scriptId) {
|
|
46
|
+
return client.get(`${basePath}/scripts/${scriptId}/versions`);
|
|
47
|
+
},
|
|
48
|
+
async restoreVersion(scriptId, versionNumber) {
|
|
49
|
+
return client.post(`${basePath}/scripts/${scriptId}/restore`, { versionNumber });
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
async generate(input) {
|
|
53
|
+
return client.post(`${basePath}/generate`, input);
|
|
54
|
+
},
|
|
55
|
+
async translate(scriptId, targetLanguage) {
|
|
56
|
+
return client.post(`${basePath}/scripts/${scriptId}/translate`, { targetLanguage });
|
|
57
|
+
},
|
|
58
|
+
sessions: {
|
|
59
|
+
async start(input) {
|
|
60
|
+
return client.post(`${basePath}/sessions`, input);
|
|
61
|
+
},
|
|
62
|
+
async get(sessionId) {
|
|
63
|
+
return client.get(`${basePath}/sessions/${sessionId}`);
|
|
64
|
+
},
|
|
65
|
+
async pause(sessionId) {
|
|
66
|
+
return client.post(`${basePath}/sessions/${sessionId}/pause`);
|
|
67
|
+
},
|
|
68
|
+
async resume(sessionId) {
|
|
69
|
+
return client.post(`${basePath}/sessions/${sessionId}/resume`);
|
|
70
|
+
},
|
|
71
|
+
async end(sessionId) {
|
|
72
|
+
return client.post(`${basePath}/sessions/${sessionId}/end`);
|
|
73
|
+
},
|
|
74
|
+
async analytics(sessionId) {
|
|
75
|
+
return client.get(`${basePath}/sessions/${sessionId}/analytics`);
|
|
76
|
+
},
|
|
77
|
+
async list(params) {
|
|
78
|
+
return client.get(`${basePath}/sessions`, { params });
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
templates: {
|
|
82
|
+
async search(params) {
|
|
83
|
+
return client.get(`${basePath}/templates`, { params });
|
|
84
|
+
},
|
|
85
|
+
async use(templateId) {
|
|
86
|
+
return client.post(`${basePath}/templates/${templateId}/use`);
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
usage: {
|
|
90
|
+
async summary(periodStart, periodEnd) {
|
|
91
|
+
return client.get(`${basePath}/usage`, { params: { periodStart, periodEnd } });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
+
0 && (module.exports = {
|
|
98
|
+
createPrompterApi
|
|
99
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import "./chunk-Y6FXYEAI.mjs";
|
|
2
|
+
|
|
3
|
+
// src/prompter.ts
|
|
4
|
+
function createPrompterApi(client) {
|
|
5
|
+
const basePath = "/api/v1/prompter";
|
|
6
|
+
return {
|
|
7
|
+
scripts: {
|
|
8
|
+
async list(params) {
|
|
9
|
+
return client.get(`${basePath}/scripts`, { params });
|
|
10
|
+
},
|
|
11
|
+
async get(scriptId) {
|
|
12
|
+
return client.get(`${basePath}/scripts/${scriptId}`);
|
|
13
|
+
},
|
|
14
|
+
async create(input) {
|
|
15
|
+
return client.post(`${basePath}/scripts`, input);
|
|
16
|
+
},
|
|
17
|
+
async update(scriptId, input) {
|
|
18
|
+
return client.patch(`${basePath}/scripts/${scriptId}`, input);
|
|
19
|
+
},
|
|
20
|
+
async delete(scriptId) {
|
|
21
|
+
return client.delete(`${basePath}/scripts/${scriptId}`);
|
|
22
|
+
},
|
|
23
|
+
async versions(scriptId) {
|
|
24
|
+
return client.get(`${basePath}/scripts/${scriptId}/versions`);
|
|
25
|
+
},
|
|
26
|
+
async restoreVersion(scriptId, versionNumber) {
|
|
27
|
+
return client.post(`${basePath}/scripts/${scriptId}/restore`, { versionNumber });
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
async generate(input) {
|
|
31
|
+
return client.post(`${basePath}/generate`, input);
|
|
32
|
+
},
|
|
33
|
+
async translate(scriptId, targetLanguage) {
|
|
34
|
+
return client.post(`${basePath}/scripts/${scriptId}/translate`, { targetLanguage });
|
|
35
|
+
},
|
|
36
|
+
sessions: {
|
|
37
|
+
async start(input) {
|
|
38
|
+
return client.post(`${basePath}/sessions`, input);
|
|
39
|
+
},
|
|
40
|
+
async get(sessionId) {
|
|
41
|
+
return client.get(`${basePath}/sessions/${sessionId}`);
|
|
42
|
+
},
|
|
43
|
+
async pause(sessionId) {
|
|
44
|
+
return client.post(`${basePath}/sessions/${sessionId}/pause`);
|
|
45
|
+
},
|
|
46
|
+
async resume(sessionId) {
|
|
47
|
+
return client.post(`${basePath}/sessions/${sessionId}/resume`);
|
|
48
|
+
},
|
|
49
|
+
async end(sessionId) {
|
|
50
|
+
return client.post(`${basePath}/sessions/${sessionId}/end`);
|
|
51
|
+
},
|
|
52
|
+
async analytics(sessionId) {
|
|
53
|
+
return client.get(`${basePath}/sessions/${sessionId}/analytics`);
|
|
54
|
+
},
|
|
55
|
+
async list(params) {
|
|
56
|
+
return client.get(`${basePath}/sessions`, { params });
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
templates: {
|
|
60
|
+
async search(params) {
|
|
61
|
+
return client.get(`${basePath}/templates`, { params });
|
|
62
|
+
},
|
|
63
|
+
async use(templateId) {
|
|
64
|
+
return client.post(`${basePath}/templates/${templateId}/use`);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
usage: {
|
|
68
|
+
async summary(periodStart, periodEnd) {
|
|
69
|
+
return client.get(`${basePath}/usage`, { params: { periodStart, periodEnd } });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
createPrompterApi
|
|
76
|
+
};
|