@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.
Files changed (260) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +27 -23
  3. package/dist/audience.js +93 -0
  4. package/dist/audience.mjs +9 -0
  5. package/dist/camera-control.js +95 -0
  6. package/dist/camera-control.mjs +71 -0
  7. package/dist/captions-types.js +18 -0
  8. package/dist/captions-types.mjs +0 -0
  9. package/dist/captions.js +266 -0
  10. package/dist/captions.mjs +9 -0
  11. package/dist/chapters-types.js +18 -0
  12. package/dist/chapters-types.mjs +0 -0
  13. package/dist/chapters.js +280 -0
  14. package/dist/chapters.mjs +9 -0
  15. package/dist/chunk-362MRITF.mjs +46 -0
  16. package/dist/chunk-3ZLK4J3V.mjs +69 -0
  17. package/dist/chunk-4DG4OBRD.mjs +52 -0
  18. package/dist/chunk-4G7FMCMJ.mjs +68 -0
  19. package/dist/chunk-4KD5F6E3.mjs +0 -0
  20. package/dist/chunk-7M6XVUUK.mjs +241 -0
  21. package/dist/chunk-A344OOT7.mjs +243 -0
  22. package/dist/chunk-AI64YR5W.mjs +173 -0
  23. package/dist/chunk-C2GQ756E.mjs +57 -0
  24. package/dist/chunk-CO2VB72Z.mjs +255 -0
  25. package/dist/chunk-DWXWAILB.mjs +44 -0
  26. package/dist/chunk-FLEFYLDM.mjs +71 -0
  27. package/dist/chunk-H2YYTNUH.mjs +266 -0
  28. package/dist/chunk-IGDBED5P.mjs +246 -0
  29. package/dist/chunk-IL2SGWBC.mjs +0 -0
  30. package/dist/chunk-IVFZ5X4W.mjs +68 -0
  31. package/dist/chunk-JC32PG3T.mjs +114 -0
  32. package/dist/chunk-K5X42NLD.mjs +54 -0
  33. package/dist/chunk-KCEPNS2U.mjs +276 -0
  34. package/dist/chunk-LVOVF6XC.mjs +54 -0
  35. package/dist/chunk-M4Z33V3N.mjs +247 -0
  36. package/dist/chunk-M6FKIX75.mjs +0 -0
  37. package/dist/chunk-M744Z327.mjs +244 -0
  38. package/dist/chunk-MRFDPPFK.mjs +61 -0
  39. package/dist/chunk-MXU3Q23F.mjs +68 -0
  40. package/dist/chunk-NCVUZ746.mjs +60 -0
  41. package/dist/chunk-NLQVD2LF.mjs +210 -0
  42. package/dist/chunk-O6DOGYP5.mjs +238 -0
  43. package/dist/chunk-S25NY5GE.mjs +124 -0
  44. package/dist/chunk-TFHXBICQ.mjs +305 -0
  45. package/dist/chunk-TXWOA2VR.mjs +57 -0
  46. package/dist/chunk-UCDSNV22.mjs +63 -0
  47. package/dist/chunk-V5DWA5P4.mjs +279 -0
  48. package/dist/chunk-VLQQDYGP.mjs +173 -0
  49. package/dist/chunk-VPKZUXZW.mjs +53 -0
  50. package/dist/chunk-WS3PEFYJ.mjs +60 -0
  51. package/dist/chunk-XGAYMWRH.mjs +74 -0
  52. package/dist/chunk-XMM5J57W.mjs +0 -0
  53. package/dist/chunk-XWABBOSX.mjs +278 -0
  54. package/dist/chunk-Y6FXYEAI.mjs +10 -0
  55. package/dist/chunk-YBLXHI3M.mjs +257 -0
  56. package/dist/chunk-YEK26SSO.mjs +100 -0
  57. package/dist/chunk-YLCQKCZL.mjs +0 -0
  58. package/dist/chunk-YRKO4XI7.mjs +0 -0
  59. package/dist/chunk-ZJO7AP4Q.mjs +0 -0
  60. package/dist/client-types.js +18 -0
  61. package/dist/client-types.mjs +0 -0
  62. package/dist/client.js +311 -0
  63. package/dist/client.mjs +14 -0
  64. package/dist/clips-types.js +18 -0
  65. package/dist/clips-types.mjs +0 -0
  66. package/dist/clips.js +198 -0
  67. package/dist/clips.mjs +9 -0
  68. package/dist/cloud-switcher.js +80 -0
  69. package/dist/cloud-switcher.mjs +56 -0
  70. package/dist/collab-types.js +18 -0
  71. package/dist/collab-types.mjs +1 -0
  72. package/dist/collab.js +304 -0
  73. package/dist/collab.mjs +10 -0
  74. package/dist/connect.js +85 -0
  75. package/dist/connect.mjs +9 -0
  76. package/dist/creator.js +79 -0
  77. package/dist/creator.mjs +9 -0
  78. package/dist/desktop.js +77 -0
  79. package/dist/desktop.mjs +9 -0
  80. package/dist/distribution.js +88 -0
  81. package/dist/distribution.mjs +9 -0
  82. package/dist/drm.js +85 -0
  83. package/dist/drm.mjs +9 -0
  84. package/dist/edge.js +93 -0
  85. package/dist/edge.mjs +9 -0
  86. package/dist/editor-types.js +18 -0
  87. package/dist/editor-types.mjs +1 -0
  88. package/dist/editor.js +330 -0
  89. package/dist/editor.mjs +10 -0
  90. package/dist/fleet.js +149 -0
  91. package/dist/fleet.mjs +9 -0
  92. package/dist/ghost.js +139 -0
  93. package/dist/ghost.mjs +9 -0
  94. package/dist/index.js +0 -250
  95. package/dist/index.mjs +161 -5445
  96. package/dist/marketplace.js +82 -0
  97. package/dist/marketplace.mjs +9 -0
  98. package/dist/mesh.js +198 -0
  99. package/dist/mesh.mjs +9 -0
  100. package/dist/notifications.js +79 -0
  101. package/dist/notifications.mjs +9 -0
  102. package/dist/phone-types.js +18 -0
  103. package/dist/phone-types.mjs +0 -0
  104. package/dist/phone.js +269 -0
  105. package/dist/phone.mjs +9 -0
  106. package/dist/pipeline-types.js +18 -0
  107. package/dist/pipeline-types.mjs +0 -0
  108. package/dist/pipeline.js +263 -0
  109. package/dist/pipeline.mjs +9 -0
  110. package/dist/podcast.js +94 -0
  111. package/dist/podcast.mjs +9 -0
  112. package/dist/prism.js +82 -0
  113. package/dist/prism.mjs +9 -0
  114. package/dist/prompter.js +99 -0
  115. package/dist/prompter.mjs +76 -0
  116. package/dist/pulse.js +99 -0
  117. package/dist/pulse.mjs +9 -0
  118. package/dist/qr.js +71 -0
  119. package/dist/qr.mjs +9 -0
  120. package/dist/replay.js +62 -0
  121. package/dist/replay.mjs +38 -0
  122. package/dist/scene-types.js +18 -0
  123. package/dist/scene-types.mjs +1 -0
  124. package/dist/scene.js +271 -0
  125. package/dist/scene.mjs +10 -0
  126. package/dist/search-types.js +18 -0
  127. package/dist/search-types.mjs +1 -0
  128. package/dist/search.js +268 -0
  129. package/dist/search.mjs +10 -0
  130. package/dist/sentiment-types.js +18 -0
  131. package/dist/sentiment-types.mjs +0 -0
  132. package/dist/sentiment.js +235 -0
  133. package/dist/sentiment.mjs +9 -0
  134. package/dist/signage.js +93 -0
  135. package/dist/signage.mjs +9 -0
  136. package/dist/slides.js +78 -0
  137. package/dist/slides.mjs +9 -0
  138. package/dist/studio-ai-types.js +18 -0
  139. package/dist/studio-ai-types.mjs +1 -0
  140. package/dist/studio-ai.js +301 -0
  141. package/dist/studio-ai.mjs +10 -0
  142. package/dist/studio-types.js +18 -0
  143. package/dist/studio-types.mjs +1 -0
  144. package/dist/studio.js +303 -0
  145. package/dist/studio.mjs +10 -0
  146. package/dist/telemetry.js +124 -0
  147. package/dist/telemetry.mjs +15 -0
  148. package/dist/transcribe-types.js +18 -0
  149. package/dist/transcribe-types.mjs +1 -0
  150. package/dist/transcribe.js +282 -0
  151. package/dist/transcribe.mjs +10 -0
  152. package/dist/usb.js +69 -0
  153. package/dist/usb.mjs +9 -0
  154. package/dist/vault.js +96 -0
  155. package/dist/vault.mjs +9 -0
  156. package/dist/voice-types.js +18 -0
  157. package/dist/voice-types.mjs +0 -0
  158. package/dist/voice.js +272 -0
  159. package/dist/voice.mjs +9 -0
  160. package/dist/zoom.js +86 -0
  161. package/dist/zoom.mjs +9 -0
  162. package/package.json +5 -5
  163. package/dist/audience.d.ts +0 -104
  164. package/dist/audience.d.ts.map +0 -1
  165. package/dist/camera-control.d.ts +0 -54
  166. package/dist/camera-control.d.ts.map +0 -1
  167. package/dist/captions.d.ts +0 -362
  168. package/dist/captions.d.ts.map +0 -1
  169. package/dist/chapters.d.ts +0 -315
  170. package/dist/chapters.d.ts.map +0 -1
  171. package/dist/client.d.ts +0 -191
  172. package/dist/client.d.ts.map +0 -1
  173. package/dist/clips.d.ts +0 -258
  174. package/dist/clips.d.ts.map +0 -1
  175. package/dist/cloud-switcher.d.ts +0 -65
  176. package/dist/cloud-switcher.d.ts.map +0 -1
  177. package/dist/collab-types.d.ts +0 -204
  178. package/dist/collab-types.d.ts.map +0 -1
  179. package/dist/collab.d.ts +0 -226
  180. package/dist/collab.d.ts.map +0 -1
  181. package/dist/connect.d.ts +0 -88
  182. package/dist/connect.d.ts.map +0 -1
  183. package/dist/creator.d.ts +0 -109
  184. package/dist/creator.d.ts.map +0 -1
  185. package/dist/desktop.d.ts +0 -95
  186. package/dist/desktop.d.ts.map +0 -1
  187. package/dist/distribution.d.ts +0 -92
  188. package/dist/distribution.d.ts.map +0 -1
  189. package/dist/drm.d.ts +0 -87
  190. package/dist/drm.d.ts.map +0 -1
  191. package/dist/edge.d.ts +0 -112
  192. package/dist/edge.d.ts.map +0 -1
  193. package/dist/editor-types.d.ts +0 -236
  194. package/dist/editor-types.d.ts.map +0 -1
  195. package/dist/editor.d.ts +0 -206
  196. package/dist/editor.d.ts.map +0 -1
  197. package/dist/fleet.d.ts +0 -207
  198. package/dist/fleet.d.ts.map +0 -1
  199. package/dist/ghost.d.ts +0 -213
  200. package/dist/ghost.d.ts.map +0 -1
  201. package/dist/index.d.ts +0 -144
  202. package/dist/index.d.ts.map +0 -1
  203. package/dist/marketplace.d.ts +0 -90
  204. package/dist/marketplace.d.ts.map +0 -1
  205. package/dist/mesh.d.ts +0 -237
  206. package/dist/mesh.d.ts.map +0 -1
  207. package/dist/notifications.d.ts +0 -82
  208. package/dist/notifications.d.ts.map +0 -1
  209. package/dist/phone.d.ts +0 -369
  210. package/dist/phone.d.ts.map +0 -1
  211. package/dist/pipeline.d.ts +0 -409
  212. package/dist/pipeline.d.ts.map +0 -1
  213. package/dist/podcast.d.ts +0 -113
  214. package/dist/podcast.d.ts.map +0 -1
  215. package/dist/prism.d.ts +0 -132
  216. package/dist/prism.d.ts.map +0 -1
  217. package/dist/prompter.d.ts +0 -184
  218. package/dist/prompter.d.ts.map +0 -1
  219. package/dist/pulse.d.ts +0 -156
  220. package/dist/pulse.d.ts.map +0 -1
  221. package/dist/qr.d.ts +0 -82
  222. package/dist/qr.d.ts.map +0 -1
  223. package/dist/replay.d.ts +0 -52
  224. package/dist/replay.d.ts.map +0 -1
  225. package/dist/scene-types.d.ts +0 -190
  226. package/dist/scene-types.d.ts.map +0 -1
  227. package/dist/scene.d.ts +0 -213
  228. package/dist/scene.d.ts.map +0 -1
  229. package/dist/search-types.d.ts +0 -210
  230. package/dist/search-types.d.ts.map +0 -1
  231. package/dist/search.d.ts +0 -250
  232. package/dist/search.d.ts.map +0 -1
  233. package/dist/sentiment.d.ts +0 -378
  234. package/dist/sentiment.d.ts.map +0 -1
  235. package/dist/signage.d.ts +0 -101
  236. package/dist/signage.d.ts.map +0 -1
  237. package/dist/slides.d.ts +0 -68
  238. package/dist/slides.d.ts.map +0 -1
  239. package/dist/studio-ai-types.d.ts +0 -198
  240. package/dist/studio-ai-types.d.ts.map +0 -1
  241. package/dist/studio-ai.d.ts +0 -218
  242. package/dist/studio-ai.d.ts.map +0 -1
  243. package/dist/studio-types.d.ts +0 -267
  244. package/dist/studio-types.d.ts.map +0 -1
  245. package/dist/studio.d.ts +0 -234
  246. package/dist/studio.d.ts.map +0 -1
  247. package/dist/telemetry.d.ts +0 -76
  248. package/dist/telemetry.d.ts.map +0 -1
  249. package/dist/transcribe-types.d.ts +0 -153
  250. package/dist/transcribe-types.d.ts.map +0 -1
  251. package/dist/transcribe.d.ts +0 -218
  252. package/dist/transcribe.d.ts.map +0 -1
  253. package/dist/usb.d.ts +0 -64
  254. package/dist/usb.d.ts.map +0 -1
  255. package/dist/vault.d.ts +0 -121
  256. package/dist/vault.d.ts.map +0 -1
  257. package/dist/voice.d.ts +0 -307
  258. package/dist/voice.d.ts.map +0 -1
  259. package/dist/zoom.d.ts +0 -91
  260. package/dist/zoom.d.ts.map +0 -1
@@ -0,0 +1,244 @@
1
+ // src/phone.ts
2
+ var PhoneAPI = class {
3
+ client;
4
+ basePath = "/v1/phone";
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ /**
9
+ * List owned phone numbers
10
+ *
11
+ * Requires: phone:read permission
12
+ */
13
+ async listNumbers(params) {
14
+ return this.client.get(
15
+ `${this.basePath}/numbers`,
16
+ { params }
17
+ );
18
+ }
19
+ /**
20
+ * Get a phone number by ID
21
+ *
22
+ * Requires: phone:read permission
23
+ */
24
+ async getNumber(numberId) {
25
+ return this.client.get(`${this.basePath}/numbers/${numberId}`);
26
+ }
27
+ /**
28
+ * Search for available phone numbers to purchase
29
+ *
30
+ * Requires: phone:read permission
31
+ */
32
+ async searchAvailableNumbers(request) {
33
+ return this.client.post(
34
+ `${this.basePath}/numbers/available`,
35
+ request
36
+ );
37
+ }
38
+ /**
39
+ * Purchase a phone number
40
+ *
41
+ * Requires: phone:purchase permission
42
+ */
43
+ async purchaseNumber(number, options) {
44
+ return this.client.post(`${this.basePath}/numbers/purchase`, {
45
+ number,
46
+ ...options
47
+ });
48
+ }
49
+ /**
50
+ * Update a phone number
51
+ *
52
+ * Requires: phone:update permission
53
+ */
54
+ async updateNumber(numberId, updates) {
55
+ return this.client.patch(
56
+ `${this.basePath}/numbers/${numberId}`,
57
+ updates
58
+ );
59
+ }
60
+ /**
61
+ * Release a phone number
62
+ *
63
+ * Requires: phone:release permission (server-side RBAC enforced)
64
+ */
65
+ async releaseNumber(numberId) {
66
+ await this.client.delete(
67
+ `${this.basePath}/numbers/${numberId}`,
68
+ { method: "DELETE" }
69
+ );
70
+ }
71
+ /**
72
+ * Make an outbound call
73
+ *
74
+ * Requires: phone:call permission
75
+ */
76
+ async makeCall(request) {
77
+ return this.client.post(`${this.basePath}/calls`, request);
78
+ }
79
+ /**
80
+ * Get a call by ID
81
+ *
82
+ * Requires: phone:read permission
83
+ */
84
+ async getCall(callId) {
85
+ return this.client.get(`${this.basePath}/calls/${callId}`);
86
+ }
87
+ /**
88
+ * List calls
89
+ *
90
+ * Requires: phone:read permission
91
+ */
92
+ async listCalls(params) {
93
+ return this.client.get(
94
+ `${this.basePath}/calls`,
95
+ { params }
96
+ );
97
+ }
98
+ /**
99
+ * Update an active call
100
+ *
101
+ * Requires: phone:call permission
102
+ */
103
+ async updateCall(callId, updates) {
104
+ return this.client.patch(`${this.basePath}/calls/${callId}`, updates);
105
+ }
106
+ /**
107
+ * End an active call
108
+ *
109
+ * Requires: phone:call permission
110
+ */
111
+ async endCall(callId) {
112
+ return this.updateCall(callId, { status: "completed" });
113
+ }
114
+ /**
115
+ * Get call recording
116
+ *
117
+ * Requires: phone:read permission
118
+ */
119
+ async getRecording(callId) {
120
+ return this.client.get(`${this.basePath}/calls/${callId}/recording`);
121
+ }
122
+ /**
123
+ * Wait for call to end
124
+ */
125
+ async waitForCallEnd(callId, options) {
126
+ const pollInterval = options?.pollInterval || 2e3;
127
+ const timeout = options?.timeout || 36e5;
128
+ const startTime = Date.now();
129
+ const terminalStatuses = [
130
+ "completed",
131
+ "failed",
132
+ "busy",
133
+ "no_answer",
134
+ "canceled"
135
+ ];
136
+ while (Date.now() - startTime < timeout) {
137
+ const call = await this.getCall(callId);
138
+ if (options?.onUpdate) {
139
+ options.onUpdate(call);
140
+ }
141
+ if (terminalStatuses.includes(call.status)) {
142
+ return call;
143
+ }
144
+ await new Promise((resolve) => setTimeout(resolve, pollInterval));
145
+ }
146
+ throw new Error(`Call wait timed out after ${timeout}ms`);
147
+ }
148
+ /**
149
+ * Create a conference room
150
+ *
151
+ * Requires: phone:conference permission
152
+ */
153
+ async createConference(options) {
154
+ return this.client.post(`${this.basePath}/conferences`, options);
155
+ }
156
+ /**
157
+ * Get a conference by ID
158
+ *
159
+ * Requires: phone:read permission
160
+ */
161
+ async getConference(conferenceId) {
162
+ return this.client.get(
163
+ `${this.basePath}/conferences/${conferenceId}`
164
+ );
165
+ }
166
+ /**
167
+ * List conferences
168
+ *
169
+ * Requires: phone:read permission
170
+ */
171
+ async listConferences(params) {
172
+ return this.client.get(
173
+ `${this.basePath}/conferences`,
174
+ { params }
175
+ );
176
+ }
177
+ /**
178
+ * Add a participant to a conference
179
+ *
180
+ * Requires: phone:conference permission
181
+ */
182
+ async addConferenceParticipant(conferenceId, options) {
183
+ return this.client.post(
184
+ `${this.basePath}/conferences/${conferenceId}/participants`,
185
+ options
186
+ );
187
+ }
188
+ /**
189
+ * Update a conference participant
190
+ *
191
+ * Requires: phone:conference permission
192
+ */
193
+ async updateConferenceParticipant(conferenceId, callId, updates) {
194
+ return this.client.patch(
195
+ `${this.basePath}/conferences/${conferenceId}/participants/${callId}`,
196
+ updates
197
+ );
198
+ }
199
+ /**
200
+ * Remove a participant from a conference
201
+ *
202
+ * Requires: phone:conference permission (server-side RBAC enforced)
203
+ */
204
+ async removeConferenceParticipant(conferenceId, callId) {
205
+ await this.client.delete(
206
+ `${this.basePath}/conferences/${conferenceId}/participants/${callId}`,
207
+ { method: "DELETE" }
208
+ );
209
+ }
210
+ /**
211
+ * End a conference
212
+ *
213
+ * Requires: phone:conference permission
214
+ */
215
+ async endConference(conferenceId) {
216
+ return this.client.post(
217
+ `${this.basePath}/conferences/${conferenceId}/end`
218
+ );
219
+ }
220
+ /**
221
+ * Validate a phone number
222
+ *
223
+ * Requires: phone:read permission
224
+ */
225
+ async validateNumber(number) {
226
+ return this.client.post(`${this.basePath}/validate`, { number });
227
+ }
228
+ /**
229
+ * Get supported countries
230
+ *
231
+ * Requires: phone:read permission
232
+ */
233
+ async getSupportedCountries() {
234
+ return this.client.get(`${this.basePath}/countries`);
235
+ }
236
+ };
237
+ function createPhoneAPI(client) {
238
+ return new PhoneAPI(client);
239
+ }
240
+
241
+ export {
242
+ PhoneAPI,
243
+ createPhoneAPI
244
+ };
@@ -0,0 +1,61 @@
1
+ // src/zoom.ts
2
+ var ZoomAPI = class {
3
+ client;
4
+ basePath = "/v1/zoom";
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ async createMeeting(request) {
9
+ return this.client.post(`${this.basePath}/meetings`, request);
10
+ }
11
+ async getMeeting(meetingId) {
12
+ return this.client.get(`${this.basePath}/meetings/${meetingId}`);
13
+ }
14
+ async endMeeting(meetingId) {
15
+ await this.client.post(`${this.basePath}/meetings/${meetingId}/end`);
16
+ }
17
+ async listMeetings(params) {
18
+ return this.client.get(`${this.basePath}/meetings`, {
19
+ params
20
+ });
21
+ }
22
+ async listRooms(params) {
23
+ return this.client.get(`${this.basePath}/rooms`, {
24
+ params
25
+ });
26
+ }
27
+ async getRoomStatus(roomId) {
28
+ return this.client.get(`${this.basePath}/rooms/${roomId}`);
29
+ }
30
+ async getRecording(recordingId) {
31
+ return this.client.get(`${this.basePath}/recordings/${recordingId}`);
32
+ }
33
+ async listRecordings(meetingId, params) {
34
+ const path = meetingId ? `${this.basePath}/meetings/${meetingId}/recordings` : `${this.basePath}/recordings`;
35
+ return this.client.get(path, {
36
+ params
37
+ });
38
+ }
39
+ async startRTMS(meetingId, config) {
40
+ return this.client.post(
41
+ `${this.basePath}/meetings/${meetingId}/rtms/start`,
42
+ config
43
+ );
44
+ }
45
+ async stopRTMS(meetingId) {
46
+ return this.client.post(`${this.basePath}/meetings/${meetingId}/rtms/stop`);
47
+ }
48
+ async getRTMSStatus(meetingId) {
49
+ return this.client.get(
50
+ `${this.basePath}/meetings/${meetingId}/rtms`
51
+ );
52
+ }
53
+ };
54
+ function createZoomAPI(client) {
55
+ return new ZoomAPI(client);
56
+ }
57
+
58
+ export {
59
+ ZoomAPI,
60
+ createZoomAPI
61
+ };
@@ -0,0 +1,68 @@
1
+ // src/edge.ts
2
+ var EdgeAPI = class {
3
+ client;
4
+ basePath = "/v1/edge";
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ async listNodes(params) {
9
+ return this.client.get(`${this.basePath}/nodes`, {
10
+ params
11
+ });
12
+ }
13
+ async getNode(nodeId) {
14
+ return this.client.get(`${this.basePath}/nodes/${nodeId}`);
15
+ }
16
+ async getNodeMetrics(nodeId) {
17
+ return this.client.get(`${this.basePath}/nodes/${nodeId}/metrics`);
18
+ }
19
+ async deployWorker(request) {
20
+ return this.client.post(`${this.basePath}/workers`, request);
21
+ }
22
+ async getWorker(workerId) {
23
+ return this.client.get(`${this.basePath}/workers/${workerId}`);
24
+ }
25
+ async updateWorker(workerId, config) {
26
+ return this.client.patch(`${this.basePath}/workers/${workerId}`, config);
27
+ }
28
+ async removeWorker(workerId) {
29
+ await this.client.delete(`${this.basePath}/workers/${workerId}`);
30
+ }
31
+ async listWorkers(params) {
32
+ return this.client.get(`${this.basePath}/workers`, {
33
+ params
34
+ });
35
+ }
36
+ async startWorker(workerId) {
37
+ return this.client.post(`${this.basePath}/workers/${workerId}/start`);
38
+ }
39
+ async stopWorker(workerId) {
40
+ return this.client.post(`${this.basePath}/workers/${workerId}/stop`);
41
+ }
42
+ async listPops() {
43
+ return this.client.get(`${this.basePath}/pops`);
44
+ }
45
+ async purgeCache(patterns) {
46
+ return this.client.post(`${this.basePath}/cache/purge`, { patterns });
47
+ }
48
+ async getRoutingRules() {
49
+ return this.client.get(`${this.basePath}/routing`);
50
+ }
51
+ async setRoutingRule(rule) {
52
+ return this.client.post(`${this.basePath}/routing`, rule);
53
+ }
54
+ async removeRoutingRule(ruleId) {
55
+ await this.client.delete(`${this.basePath}/routing/${ruleId}`);
56
+ }
57
+ async getLatencyMap() {
58
+ return this.client.get(`${this.basePath}/latency-map`);
59
+ }
60
+ };
61
+ function createEdgeAPI(client) {
62
+ return new EdgeAPI(client);
63
+ }
64
+
65
+ export {
66
+ EdgeAPI,
67
+ createEdgeAPI
68
+ };
@@ -0,0 +1,60 @@
1
+ // src/connect.ts
2
+ var ConnectAPI = class {
3
+ client;
4
+ basePath = "/v1/integrations";
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ async list(params) {
9
+ return this.client.get(this.basePath, {
10
+ params
11
+ });
12
+ }
13
+ async get(integrationId) {
14
+ return this.client.get(`${this.basePath}/${integrationId}`);
15
+ }
16
+ async enable(request) {
17
+ return this.client.post(this.basePath, request);
18
+ }
19
+ async disable(integrationId) {
20
+ await this.client.post(`${this.basePath}/${integrationId}/disable`);
21
+ }
22
+ async configure(integrationId, config) {
23
+ return this.client.patch(`${this.basePath}/${integrationId}`, { config });
24
+ }
25
+ async testConnection(integrationId) {
26
+ return this.client.post(
27
+ `${this.basePath}/${integrationId}/test`
28
+ );
29
+ }
30
+ async listWebhooks(integrationId) {
31
+ const path = integrationId ? `${this.basePath}/${integrationId}/webhooks` : "/v1/webhooks";
32
+ return this.client.get(path);
33
+ }
34
+ async createWebhook(integrationId, request) {
35
+ return this.client.post(`${this.basePath}/${integrationId}/webhooks`, request);
36
+ }
37
+ async updateWebhook(webhookId, updates) {
38
+ return this.client.patch(`/v1/webhooks/${webhookId}`, updates);
39
+ }
40
+ async removeWebhook(webhookId) {
41
+ await this.client.delete(`/v1/webhooks/${webhookId}`);
42
+ }
43
+ async listDeliveries(webhookId, params) {
44
+ return this.client.get(
45
+ `/v1/webhooks/${webhookId}/deliveries`,
46
+ { params }
47
+ );
48
+ }
49
+ async retryDelivery(deliveryId) {
50
+ return this.client.post(`/v1/webhooks/deliveries/${deliveryId}/retry`);
51
+ }
52
+ };
53
+ function createConnectAPI(client) {
54
+ return new ConnectAPI(client);
55
+ }
56
+
57
+ export {
58
+ ConnectAPI,
59
+ createConnectAPI
60
+ };
@@ -0,0 +1,210 @@
1
+ // src/sentiment.ts
2
+ var SentimentAPI = class {
3
+ client;
4
+ basePath = "/v1/sentiment";
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ /**
9
+ * Create a sentiment analysis job
10
+ *
11
+ * Requires: sentiment:analyze permission
12
+ */
13
+ async analyze(request) {
14
+ return this.client.post(this.basePath, request);
15
+ }
16
+ /**
17
+ * Analyze text directly (synchronous for short text)
18
+ *
19
+ * Requires: sentiment:analyze permission
20
+ */
21
+ async analyzeText(text, options) {
22
+ return this.client.post(`${this.basePath}/text`, { text, ...options });
23
+ }
24
+ /**
25
+ * Batch analyze multiple items
26
+ *
27
+ * Requires: sentiment:analyze permission
28
+ */
29
+ async batchAnalyze(request) {
30
+ return this.client.post(`${this.basePath}/batch`, request);
31
+ }
32
+ /**
33
+ * Get an analysis by ID
34
+ *
35
+ * Requires: sentiment:read permission
36
+ */
37
+ async get(analysisId) {
38
+ return this.client.get(`${this.basePath}/${analysisId}`);
39
+ }
40
+ /**
41
+ * Remove an analysis
42
+ *
43
+ * Requires: sentiment:remove permission (server-side RBAC enforced)
44
+ */
45
+ async remove(analysisId) {
46
+ await this.client.delete(
47
+ `${this.basePath}/${analysisId}`,
48
+ { method: "DELETE" }
49
+ );
50
+ }
51
+ /**
52
+ * List analyses
53
+ *
54
+ * Requires: sentiment:read permission
55
+ */
56
+ async list(params) {
57
+ return this.client.get(this.basePath, {
58
+ params
59
+ });
60
+ }
61
+ /**
62
+ * Get sentiment segments
63
+ *
64
+ * Requires: sentiment:read permission
65
+ */
66
+ async getSegments(analysisId, params) {
67
+ return this.client.get(
68
+ `${this.basePath}/${analysisId}/segments`,
69
+ { params }
70
+ );
71
+ }
72
+ /**
73
+ * Get sentiment summary
74
+ *
75
+ * Requires: sentiment:read permission
76
+ */
77
+ async getSummary(analysisId) {
78
+ return this.client.get(
79
+ `${this.basePath}/${analysisId}/summary`
80
+ );
81
+ }
82
+ /**
83
+ * Get sentiment trend over time
84
+ *
85
+ * Requires: sentiment:read permission
86
+ */
87
+ async getTrend(analysisId, options) {
88
+ return this.client.get(
89
+ `${this.basePath}/${analysisId}/trend`,
90
+ { params: options }
91
+ );
92
+ }
93
+ /**
94
+ * Get key emotional moments
95
+ *
96
+ * Requires: sentiment:read permission
97
+ */
98
+ async getKeyMoments(analysisId, options) {
99
+ return this.client.get(
100
+ `${this.basePath}/${analysisId}/key-moments`,
101
+ { params: options }
102
+ );
103
+ }
104
+ /**
105
+ * Get topic sentiments
106
+ *
107
+ * Requires: sentiment:read permission
108
+ */
109
+ async getTopicSentiments(analysisId, options) {
110
+ return this.client.get(
111
+ `${this.basePath}/${analysisId}/topics`,
112
+ { params: options }
113
+ );
114
+ }
115
+ /**
116
+ * Get sentiment by speaker
117
+ *
118
+ * Requires: sentiment:read permission
119
+ */
120
+ async getSpeakerSentiment(analysisId) {
121
+ return this.client.get(`${this.basePath}/${analysisId}/speakers`);
122
+ }
123
+ /**
124
+ * Start real-time sentiment analysis
125
+ *
126
+ * Requires: sentiment:realtime permission
127
+ */
128
+ async startRealtime(streamId, options) {
129
+ return this.client.post(`${this.basePath}/realtime/start`, {
130
+ stream_id: streamId,
131
+ ...options
132
+ });
133
+ }
134
+ /**
135
+ * Stop real-time analysis
136
+ *
137
+ * Requires: sentiment:realtime permission
138
+ */
139
+ async stopRealtime(sessionId) {
140
+ return this.client.post(
141
+ `${this.basePath}/realtime/${sessionId}/stop`
142
+ );
143
+ }
144
+ /**
145
+ * Get real-time session status
146
+ *
147
+ * Requires: sentiment:read permission
148
+ */
149
+ async getRealtimeStatus(sessionId) {
150
+ return this.client.get(`${this.basePath}/realtime/${sessionId}`);
151
+ }
152
+ /**
153
+ * Compare sentiment between analyses
154
+ *
155
+ * Requires: sentiment:read permission
156
+ */
157
+ async compare(analysisIds) {
158
+ return this.client.post(`${this.basePath}/compare`, {
159
+ analysis_ids: analysisIds
160
+ });
161
+ }
162
+ /**
163
+ * Export analysis results
164
+ *
165
+ * Requires: sentiment:read permission
166
+ */
167
+ async exportAnalysis(analysisId, format) {
168
+ return this.client.post(`${this.basePath}/${analysisId}/export`, { format });
169
+ }
170
+ /**
171
+ * Wait for analysis to complete
172
+ */
173
+ async waitForReady(analysisId, options) {
174
+ const pollInterval = options?.pollInterval || 2e3;
175
+ const timeout = options?.timeout || 6e5;
176
+ const startTime = Date.now();
177
+ while (Date.now() - startTime < timeout) {
178
+ const analysis = await this.get(analysisId);
179
+ if (options?.onProgress) {
180
+ options.onProgress(analysis);
181
+ }
182
+ if (analysis.status === "ready") {
183
+ return analysis;
184
+ }
185
+ if (analysis.status === "failed") {
186
+ throw new Error(
187
+ `Sentiment analysis failed: ${analysis.error || "Unknown error"}`
188
+ );
189
+ }
190
+ await new Promise((resolve) => setTimeout(resolve, pollInterval));
191
+ }
192
+ throw new Error(`Sentiment analysis timed out after ${timeout}ms`);
193
+ }
194
+ /**
195
+ * Get supported languages
196
+ *
197
+ * Requires: sentiment:read permission
198
+ */
199
+ async getSupportedLanguages() {
200
+ return this.client.get(`${this.basePath}/languages`);
201
+ }
202
+ };
203
+ function createSentimentAPI(client) {
204
+ return new SentimentAPI(client);
205
+ }
206
+
207
+ export {
208
+ SentimentAPI,
209
+ createSentimentAPI
210
+ };