@wave-av/sdk 2.0.1 → 2.0.3
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 +5 -5
- package/dist/audience.d.ts +0 -104
- package/dist/audience.d.ts.map +0 -1
- package/dist/camera-control.d.ts +0 -54
- package/dist/camera-control.d.ts.map +0 -1
- package/dist/captions.d.ts +0 -362
- package/dist/captions.d.ts.map +0 -1
- package/dist/chapters.d.ts +0 -315
- package/dist/chapters.d.ts.map +0 -1
- package/dist/client.d.ts +0 -191
- package/dist/client.d.ts.map +0 -1
- package/dist/clips.d.ts +0 -258
- package/dist/clips.d.ts.map +0 -1
- package/dist/cloud-switcher.d.ts +0 -65
- package/dist/cloud-switcher.d.ts.map +0 -1
- package/dist/collab-types.d.ts +0 -204
- package/dist/collab-types.d.ts.map +0 -1
- package/dist/collab.d.ts +0 -226
- package/dist/collab.d.ts.map +0 -1
- package/dist/connect.d.ts +0 -88
- package/dist/connect.d.ts.map +0 -1
- package/dist/creator.d.ts +0 -109
- package/dist/creator.d.ts.map +0 -1
- package/dist/desktop.d.ts +0 -95
- package/dist/desktop.d.ts.map +0 -1
- package/dist/distribution.d.ts +0 -92
- package/dist/distribution.d.ts.map +0 -1
- package/dist/drm.d.ts +0 -87
- package/dist/drm.d.ts.map +0 -1
- package/dist/edge.d.ts +0 -112
- package/dist/edge.d.ts.map +0 -1
- package/dist/editor-types.d.ts +0 -236
- package/dist/editor-types.d.ts.map +0 -1
- package/dist/editor.d.ts +0 -206
- package/dist/editor.d.ts.map +0 -1
- package/dist/fleet.d.ts +0 -207
- package/dist/fleet.d.ts.map +0 -1
- package/dist/ghost.d.ts +0 -213
- package/dist/ghost.d.ts.map +0 -1
- package/dist/index.d.ts +0 -144
- package/dist/index.d.ts.map +0 -1
- package/dist/marketplace.d.ts +0 -90
- package/dist/marketplace.d.ts.map +0 -1
- package/dist/mesh.d.ts +0 -237
- package/dist/mesh.d.ts.map +0 -1
- package/dist/notifications.d.ts +0 -82
- package/dist/notifications.d.ts.map +0 -1
- package/dist/phone.d.ts +0 -369
- package/dist/phone.d.ts.map +0 -1
- package/dist/pipeline.d.ts +0 -409
- package/dist/pipeline.d.ts.map +0 -1
- package/dist/podcast.d.ts +0 -113
- package/dist/podcast.d.ts.map +0 -1
- package/dist/prism.d.ts +0 -132
- package/dist/prism.d.ts.map +0 -1
- package/dist/prompter.d.ts +0 -184
- package/dist/prompter.d.ts.map +0 -1
- package/dist/pulse.d.ts +0 -156
- package/dist/pulse.d.ts.map +0 -1
- package/dist/qr.d.ts +0 -82
- package/dist/qr.d.ts.map +0 -1
- package/dist/replay.d.ts +0 -52
- package/dist/replay.d.ts.map +0 -1
- package/dist/scene-types.d.ts +0 -190
- package/dist/scene-types.d.ts.map +0 -1
- package/dist/scene.d.ts +0 -213
- package/dist/scene.d.ts.map +0 -1
- package/dist/search-types.d.ts +0 -210
- package/dist/search-types.d.ts.map +0 -1
- package/dist/search.d.ts +0 -250
- package/dist/search.d.ts.map +0 -1
- package/dist/sentiment.d.ts +0 -378
- package/dist/sentiment.d.ts.map +0 -1
- package/dist/signage.d.ts +0 -101
- package/dist/signage.d.ts.map +0 -1
- package/dist/slides.d.ts +0 -68
- package/dist/slides.d.ts.map +0 -1
- package/dist/studio-ai-types.d.ts +0 -198
- package/dist/studio-ai-types.d.ts.map +0 -1
- package/dist/studio-ai.d.ts +0 -218
- package/dist/studio-ai.d.ts.map +0 -1
- package/dist/studio-types.d.ts +0 -267
- package/dist/studio-types.d.ts.map +0 -1
- package/dist/studio.d.ts +0 -234
- package/dist/studio.d.ts.map +0 -1
- package/dist/telemetry.d.ts +0 -76
- package/dist/telemetry.d.ts.map +0 -1
- package/dist/transcribe-types.d.ts +0 -153
- package/dist/transcribe-types.d.ts.map +0 -1
- package/dist/transcribe.d.ts +0 -218
- package/dist/transcribe.d.ts.map +0 -1
- package/dist/usb.d.ts +0 -64
- package/dist/usb.d.ts.map +0 -1
- package/dist/vault.d.ts +0 -121
- package/dist/vault.d.ts.map +0 -1
- package/dist/voice.d.ts +0 -307
- package/dist/voice.d.ts.map +0 -1
- package/dist/zoom.d.ts +0 -91
- package/dist/zoom.d.ts.map +0 -1
package/dist/studio.js
ADDED
|
@@ -0,0 +1,303 @@
|
|
|
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/studio.ts
|
|
21
|
+
var studio_exports = {};
|
|
22
|
+
__export(studio_exports, {
|
|
23
|
+
StudioAPI: () => StudioAPI,
|
|
24
|
+
createStudioAPI: () => createStudioAPI
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(studio_exports);
|
|
27
|
+
var StudioAPI = class {
|
|
28
|
+
client;
|
|
29
|
+
basePath = "/v1/productions";
|
|
30
|
+
constructor(client) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Create a new production
|
|
35
|
+
*
|
|
36
|
+
* Requires: productions:create permission
|
|
37
|
+
*/
|
|
38
|
+
async create(request) {
|
|
39
|
+
return this.client.post(this.basePath, request);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get a production by ID
|
|
43
|
+
*
|
|
44
|
+
* Requires: productions:read permission
|
|
45
|
+
*/
|
|
46
|
+
async get(productionId) {
|
|
47
|
+
return this.client.get(`${this.basePath}/${productionId}`);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Update a production
|
|
51
|
+
*
|
|
52
|
+
* Requires: productions:update permission
|
|
53
|
+
*/
|
|
54
|
+
async update(productionId, request) {
|
|
55
|
+
return this.client.patch(`${this.basePath}/${productionId}`, request);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Remove a production
|
|
59
|
+
*
|
|
60
|
+
* Requires: productions:remove permission (server-side RBAC enforced)
|
|
61
|
+
*/
|
|
62
|
+
async remove(productionId) {
|
|
63
|
+
await this.client.delete(`${this.basePath}/${productionId}`);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* List productions with optional filters
|
|
67
|
+
*
|
|
68
|
+
* Requires: productions:read permission
|
|
69
|
+
*/
|
|
70
|
+
async list(params) {
|
|
71
|
+
const queryParams = {
|
|
72
|
+
limit: params?.limit,
|
|
73
|
+
offset: params?.offset,
|
|
74
|
+
cursor: params?.cursor,
|
|
75
|
+
status: params?.status,
|
|
76
|
+
created_after: params?.created_after,
|
|
77
|
+
created_before: params?.created_before,
|
|
78
|
+
order_by: params?.order_by,
|
|
79
|
+
order: params?.order
|
|
80
|
+
};
|
|
81
|
+
return this.client.get(this.basePath, {
|
|
82
|
+
params: queryParams
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Start a production (go live)
|
|
87
|
+
*
|
|
88
|
+
* Transitions the production from 'idle' or 'rehearsal' to 'live'.
|
|
89
|
+
*
|
|
90
|
+
* Requires: productions:control permission
|
|
91
|
+
*/
|
|
92
|
+
async start(productionId) {
|
|
93
|
+
return this.client.post(`${this.basePath}/${productionId}/start`);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Stop a production (end broadcast)
|
|
97
|
+
*
|
|
98
|
+
* Transitions the production to 'ending' and then 'ended'.
|
|
99
|
+
*
|
|
100
|
+
* Requires: productions:control permission
|
|
101
|
+
*/
|
|
102
|
+
async stop(productionId) {
|
|
103
|
+
return this.client.post(`${this.basePath}/${productionId}/stop`);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Start a rehearsal session
|
|
107
|
+
*
|
|
108
|
+
* Allows testing sources, scenes, and transitions without going live.
|
|
109
|
+
* Transitions the production from 'idle' to 'rehearsal'.
|
|
110
|
+
*
|
|
111
|
+
* Requires: productions:control permission
|
|
112
|
+
*/
|
|
113
|
+
async startRehearsal(productionId) {
|
|
114
|
+
return this.client.post(`${this.basePath}/${productionId}/rehearsal`);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Add an input source to a production
|
|
118
|
+
*
|
|
119
|
+
* Requires: productions:sources:create permission
|
|
120
|
+
*/
|
|
121
|
+
async addSource(productionId, source) {
|
|
122
|
+
return this.client.post(`${this.basePath}/${productionId}/sources`, source);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Remove a source from a production
|
|
126
|
+
*
|
|
127
|
+
* Requires: productions:sources:remove permission
|
|
128
|
+
*/
|
|
129
|
+
async removeSource(productionId, sourceId) {
|
|
130
|
+
await this.client.delete(`${this.basePath}/${productionId}/sources/${sourceId}`);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* List all sources for a production
|
|
134
|
+
*
|
|
135
|
+
* Requires: productions:sources:read permission
|
|
136
|
+
*/
|
|
137
|
+
async listSources(productionId) {
|
|
138
|
+
return this.client.get(`${this.basePath}/${productionId}/sources`);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Get a specific source by ID
|
|
142
|
+
*
|
|
143
|
+
* Requires: productions:sources:read permission
|
|
144
|
+
*/
|
|
145
|
+
async getSource(productionId, sourceId) {
|
|
146
|
+
return this.client.get(`${this.basePath}/${productionId}/sources/${sourceId}`);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Create a new scene in a production
|
|
150
|
+
*
|
|
151
|
+
* Requires: productions:scenes:create permission
|
|
152
|
+
*/
|
|
153
|
+
async createScene(productionId, scene) {
|
|
154
|
+
return this.client.post(`${this.basePath}/${productionId}/scenes`, scene);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Update an existing scene
|
|
158
|
+
*
|
|
159
|
+
* Requires: productions:scenes:update permission
|
|
160
|
+
*/
|
|
161
|
+
async updateScene(productionId, sceneId, updates) {
|
|
162
|
+
return this.client.patch(`${this.basePath}/${productionId}/scenes/${sceneId}`, updates);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Remove a scene from a production
|
|
166
|
+
*
|
|
167
|
+
* Requires: productions:scenes:remove permission
|
|
168
|
+
*/
|
|
169
|
+
async removeScene(productionId, sceneId) {
|
|
170
|
+
await this.client.delete(`${this.basePath}/${productionId}/scenes/${sceneId}`);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* List all scenes for a production
|
|
174
|
+
*
|
|
175
|
+
* Requires: productions:scenes:read permission
|
|
176
|
+
*/
|
|
177
|
+
async listScenes(productionId) {
|
|
178
|
+
return this.client.get(`${this.basePath}/${productionId}/scenes`);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Activate a scene with an optional transition
|
|
182
|
+
*
|
|
183
|
+
* Sets the scene as the active scene for the production output.
|
|
184
|
+
*
|
|
185
|
+
* Requires: productions:scenes:control permission
|
|
186
|
+
*/
|
|
187
|
+
async activateScene(productionId, sceneId, transition) {
|
|
188
|
+
return this.client.post(
|
|
189
|
+
`${this.basePath}/${productionId}/scenes/${sceneId}/activate`,
|
|
190
|
+
transition ? { transition } : void 0
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Set the program (live) source with an optional transition
|
|
195
|
+
*
|
|
196
|
+
* Switches the currently live output to the specified source.
|
|
197
|
+
*
|
|
198
|
+
* Requires: productions:control permission
|
|
199
|
+
*/
|
|
200
|
+
async setProgram(productionId, sourceId, transition) {
|
|
201
|
+
await this.client.post(`${this.basePath}/${productionId}/program`, {
|
|
202
|
+
source_id: sourceId,
|
|
203
|
+
transition
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Set the preview source
|
|
208
|
+
*
|
|
209
|
+
* Loads a source into the preview output for inspection before going live.
|
|
210
|
+
*
|
|
211
|
+
* Requires: productions:control permission
|
|
212
|
+
*/
|
|
213
|
+
async setPreview(productionId, sourceId) {
|
|
214
|
+
await this.client.post(`${this.basePath}/${productionId}/preview`, { source_id: sourceId });
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Execute a transition between preview and program
|
|
218
|
+
*
|
|
219
|
+
* Swaps the current preview source into program using the specified transition.
|
|
220
|
+
*
|
|
221
|
+
* Requires: productions:control permission
|
|
222
|
+
*/
|
|
223
|
+
async transition(productionId, config) {
|
|
224
|
+
await this.client.post(`${this.basePath}/${productionId}/transition`, config);
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Add a graphic overlay to a production
|
|
228
|
+
*
|
|
229
|
+
* Requires: productions:graphics:create permission
|
|
230
|
+
*/
|
|
231
|
+
async addGraphic(productionId, graphic) {
|
|
232
|
+
return this.client.post(`${this.basePath}/${productionId}/graphics`, graphic);
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Update an existing graphic
|
|
236
|
+
*
|
|
237
|
+
* Requires: productions:graphics:update permission
|
|
238
|
+
*/
|
|
239
|
+
async updateGraphic(productionId, graphicId, updates) {
|
|
240
|
+
return this.client.patch(
|
|
241
|
+
`${this.basePath}/${productionId}/graphics/${graphicId}`,
|
|
242
|
+
updates
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Remove a graphic from a production
|
|
247
|
+
*
|
|
248
|
+
* Requires: productions:graphics:remove permission
|
|
249
|
+
*/
|
|
250
|
+
async removeGraphic(productionId, graphicId) {
|
|
251
|
+
await this.client.delete(`${this.basePath}/${productionId}/graphics/${graphicId}`);
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Show a graphic on the production output
|
|
255
|
+
*
|
|
256
|
+
* Makes the graphic visible on the live output.
|
|
257
|
+
*
|
|
258
|
+
* Requires: productions:graphics:control permission
|
|
259
|
+
*/
|
|
260
|
+
async showGraphic(productionId, graphicId) {
|
|
261
|
+
await this.client.post(`${this.basePath}/${productionId}/graphics/${graphicId}/show`);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Hide a graphic from the production output
|
|
265
|
+
*
|
|
266
|
+
* Removes the graphic from the live output without deleting it.
|
|
267
|
+
*
|
|
268
|
+
* Requires: productions:graphics:control permission
|
|
269
|
+
*/
|
|
270
|
+
async hideGraphic(productionId, graphicId) {
|
|
271
|
+
await this.client.post(`${this.basePath}/${productionId}/graphics/${graphicId}/hide`);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Get the current audio mix for a production
|
|
275
|
+
*
|
|
276
|
+
* Returns volume, mute, solo, pan, and processing settings for all channels.
|
|
277
|
+
*
|
|
278
|
+
* Requires: productions:audio:read permission
|
|
279
|
+
*/
|
|
280
|
+
async getAudioMix(productionId) {
|
|
281
|
+
return this.client.get(`${this.basePath}/${productionId}/audio-mix`);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Set the audio mix for a production
|
|
285
|
+
*
|
|
286
|
+
* Updates volume, mute, solo, pan, and processing settings for channels.
|
|
287
|
+
*
|
|
288
|
+
* Requires: productions:audio:control permission
|
|
289
|
+
*/
|
|
290
|
+
async setAudioMix(productionId, channels) {
|
|
291
|
+
return this.client.put(`${this.basePath}/${productionId}/audio-mix`, {
|
|
292
|
+
channels
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
function createStudioAPI(client) {
|
|
297
|
+
return new StudioAPI(client);
|
|
298
|
+
}
|
|
299
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
300
|
+
0 && (module.exports = {
|
|
301
|
+
StudioAPI,
|
|
302
|
+
createStudioAPI
|
|
303
|
+
});
|
package/dist/studio.mjs
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
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/telemetry.ts
|
|
21
|
+
var telemetry_exports = {};
|
|
22
|
+
__export(telemetry_exports, {
|
|
23
|
+
initTelemetry: () => initTelemetry,
|
|
24
|
+
isTelemetryEnabled: () => isTelemetryEnabled,
|
|
25
|
+
resetTelemetry: () => resetTelemetry,
|
|
26
|
+
withTelemetry: () => withTelemetry,
|
|
27
|
+
withTelemetrySync: () => withTelemetrySync
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(telemetry_exports);
|
|
30
|
+
var SPAN_STATUS_OK = 1;
|
|
31
|
+
var SPAN_STATUS_ERROR = 2;
|
|
32
|
+
var resolvedTracer = null;
|
|
33
|
+
var telemetryEnabled = false;
|
|
34
|
+
function initTelemetry(config) {
|
|
35
|
+
if (!config.enabled) {
|
|
36
|
+
telemetryEnabled = false;
|
|
37
|
+
resolvedTracer = null;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
const otelApi = require("@opentelemetry/api");
|
|
42
|
+
const serviceName = config.serviceName ?? "@wave/sdk";
|
|
43
|
+
resolvedTracer = otelApi.trace.getTracer(serviceName, "2.0.0");
|
|
44
|
+
telemetryEnabled = true;
|
|
45
|
+
} catch {
|
|
46
|
+
telemetryEnabled = false;
|
|
47
|
+
resolvedTracer = null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function resetTelemetry() {
|
|
51
|
+
telemetryEnabled = false;
|
|
52
|
+
resolvedTracer = null;
|
|
53
|
+
}
|
|
54
|
+
function isTelemetryEnabled() {
|
|
55
|
+
return telemetryEnabled;
|
|
56
|
+
}
|
|
57
|
+
async function withTelemetry(operationName, fn, attributes) {
|
|
58
|
+
if (!telemetryEnabled || !resolvedTracer) {
|
|
59
|
+
return fn();
|
|
60
|
+
}
|
|
61
|
+
const span = resolvedTracer.startSpan(`wave.sdk.${operationName}`);
|
|
62
|
+
const startTime = performance.now();
|
|
63
|
+
try {
|
|
64
|
+
if (attributes) {
|
|
65
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
66
|
+
span.setAttribute(key, value);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const result = await fn();
|
|
70
|
+
const durationMs = performance.now() - startTime;
|
|
71
|
+
span.setAttribute("wave.sdk.method", operationName);
|
|
72
|
+
span.setAttribute("wave.sdk.duration_ms", Math.round(durationMs));
|
|
73
|
+
span.setStatus({ code: SPAN_STATUS_OK });
|
|
74
|
+
span.end();
|
|
75
|
+
return result;
|
|
76
|
+
} catch (error) {
|
|
77
|
+
const durationMs = performance.now() - startTime;
|
|
78
|
+
span.setAttribute("wave.sdk.method", operationName);
|
|
79
|
+
span.setAttribute("wave.sdk.duration_ms", Math.round(durationMs));
|
|
80
|
+
const errorType = error instanceof Error ? error.constructor.name : "UnknownError";
|
|
81
|
+
span.setAttribute("wave.sdk.error_type", errorType);
|
|
82
|
+
span.setStatus({ code: SPAN_STATUS_ERROR });
|
|
83
|
+
span.end();
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
function withTelemetrySync(operationName, fn, attributes) {
|
|
88
|
+
if (!telemetryEnabled || !resolvedTracer) {
|
|
89
|
+
return fn();
|
|
90
|
+
}
|
|
91
|
+
const span = resolvedTracer.startSpan(`wave.sdk.${operationName}`);
|
|
92
|
+
const startTime = performance.now();
|
|
93
|
+
try {
|
|
94
|
+
if (attributes) {
|
|
95
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
96
|
+
span.setAttribute(key, value);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const result = fn();
|
|
100
|
+
const durationMs = performance.now() - startTime;
|
|
101
|
+
span.setAttribute("wave.sdk.method", operationName);
|
|
102
|
+
span.setAttribute("wave.sdk.duration_ms", Math.round(durationMs));
|
|
103
|
+
span.setStatus({ code: SPAN_STATUS_OK });
|
|
104
|
+
span.end();
|
|
105
|
+
return result;
|
|
106
|
+
} catch (error) {
|
|
107
|
+
const durationMs = performance.now() - startTime;
|
|
108
|
+
span.setAttribute("wave.sdk.method", operationName);
|
|
109
|
+
span.setAttribute("wave.sdk.duration_ms", Math.round(durationMs));
|
|
110
|
+
const errorType = error instanceof Error ? error.constructor.name : "UnknownError";
|
|
111
|
+
span.setAttribute("wave.sdk.error_type", errorType);
|
|
112
|
+
span.setStatus({ code: SPAN_STATUS_ERROR });
|
|
113
|
+
span.end();
|
|
114
|
+
throw error;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
118
|
+
0 && (module.exports = {
|
|
119
|
+
initTelemetry,
|
|
120
|
+
isTelemetryEnabled,
|
|
121
|
+
resetTelemetry,
|
|
122
|
+
withTelemetry,
|
|
123
|
+
withTelemetrySync
|
|
124
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
initTelemetry,
|
|
3
|
+
isTelemetryEnabled,
|
|
4
|
+
resetTelemetry,
|
|
5
|
+
withTelemetry,
|
|
6
|
+
withTelemetrySync
|
|
7
|
+
} from "./chunk-YEK26SSO.mjs";
|
|
8
|
+
import "./chunk-Y6FXYEAI.mjs";
|
|
9
|
+
export {
|
|
10
|
+
initTelemetry,
|
|
11
|
+
isTelemetryEnabled,
|
|
12
|
+
resetTelemetry,
|
|
13
|
+
withTelemetry,
|
|
14
|
+
withTelemetrySync
|
|
15
|
+
};
|
|
@@ -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/transcribe-types.ts
|
|
17
|
+
var transcribe_types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(transcribe_types_exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./chunk-M6FKIX75.mjs";
|