@mentingo/luma-sdk 0.0.0-stage → 0.4.0

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.
@@ -0,0 +1,966 @@
1
+ // src/api/generated-api.ts
2
+ import axios from "axios";
3
+ var TurnStatus = /* @__PURE__ */ ((TurnStatus2) => {
4
+ TurnStatus2["Queued"] = "queued";
5
+ TurnStatus2["Running"] = "running";
6
+ TurnStatus2["WaitingAuthor"] = "waiting_author";
7
+ TurnStatus2["Completed"] = "completed";
8
+ TurnStatus2["Failed"] = "failed";
9
+ TurnStatus2["Stopped"] = "stopped";
10
+ return TurnStatus2;
11
+ })(TurnStatus || {});
12
+ var TurnPartStatus = /* @__PURE__ */ ((TurnPartStatus2) => {
13
+ TurnPartStatus2["Streaming"] = "streaming";
14
+ TurnPartStatus2["Completed"] = "completed";
15
+ TurnPartStatus2["Failed"] = "failed";
16
+ TurnPartStatus2["Stopped"] = "stopped";
17
+ TurnPartStatus2["Review"] = "review";
18
+ return TurnPartStatus2;
19
+ })(TurnPartStatus || {});
20
+ var TurnPartKind = /* @__PURE__ */ ((TurnPartKind2) => {
21
+ TurnPartKind2["Text"] = "text";
22
+ TurnPartKind2["Tool"] = "tool";
23
+ TurnPartKind2["Proposal"] = "proposal";
24
+ TurnPartKind2["Question"] = "question";
25
+ return TurnPartKind2;
26
+ })(TurnPartKind || {});
27
+ var TextToSpeechProvider = /* @__PURE__ */ ((TextToSpeechProvider2) => {
28
+ TextToSpeechProvider2["Cartesia"] = "cartesia";
29
+ TextToSpeechProvider2["Elevenlabs"] = "elevenlabs";
30
+ return TextToSpeechProvider2;
31
+ })(TextToSpeechProvider || {});
32
+ var TaskKind = /* @__PURE__ */ ((TaskKind2) => {
33
+ TaskKind2["Plan"] = "plan";
34
+ TaskKind2["Route"] = "route";
35
+ TaskKind2["Research"] = "research";
36
+ TaskKind2["DetailedPlan"] = "detailed_plan";
37
+ TaskKind2["Lesson"] = "lesson";
38
+ TaskKind2["Edit"] = "edit";
39
+ TaskKind2["Source"] = "source";
40
+ TaskKind2["Asset"] = "asset";
41
+ TaskKind2["CourseReview"] = "course_review";
42
+ return TaskKind2;
43
+ })(TaskKind || {});
44
+ var TTSProvider = /* @__PURE__ */ ((TTSProvider2) => {
45
+ TTSProvider2["Cartesia"] = "cartesia";
46
+ TTSProvider2["Elevenlabs"] = "elevenlabs";
47
+ TTSProvider2["Fish"] = "fish";
48
+ return TTSProvider2;
49
+ })(TTSProvider || {});
50
+ var ReasoningEffort = /* @__PURE__ */ ((ReasoningEffort2) => {
51
+ ReasoningEffort2["Low"] = "low";
52
+ ReasoningEffort2["Medium"] = "medium";
53
+ ReasoningEffort2["High"] = "high";
54
+ return ReasoningEffort2;
55
+ })(ReasoningEffort || {});
56
+ var AiModelProfileKind = /* @__PURE__ */ ((AiModelProfileKind2) => {
57
+ AiModelProfileKind2["Chat"] = "chat";
58
+ AiModelProfileKind2["Image"] = "image";
59
+ AiModelProfileKind2["Embedding"] = "embedding";
60
+ AiModelProfileKind2["SpeechToText"] = "speechToText";
61
+ AiModelProfileKind2["TextToSpeech"] = "textToSpeech";
62
+ return AiModelProfileKind2;
63
+ })(AiModelProfileKind || {});
64
+ var AiModelDomain = /* @__PURE__ */ ((AiModelDomain2) => {
65
+ AiModelDomain2["AiMentor"] = "aiMentor";
66
+ AiModelDomain2["AiMentorJudge"] = "aiMentorJudge";
67
+ AiModelDomain2["AiMentorConfigurationGenerator"] = "aiMentorConfigurationGenerator";
68
+ AiModelDomain2["AiJudgeConfigurationGenerator"] = "aiJudgeConfigurationGenerator";
69
+ AiModelDomain2["AiJudgeConfigurationValidator"] = "aiJudgeConfigurationValidator";
70
+ AiModelDomain2["Translations"] = "translations";
71
+ AiModelDomain2["CourseGeneration"] = "courseGeneration";
72
+ AiModelDomain2["CourseGenerationVisualAssets"] = "courseGenerationVisualAssets";
73
+ AiModelDomain2["CourseGenerationEmbeddings"] = "courseGenerationEmbeddings";
74
+ AiModelDomain2["Embeddings"] = "embeddings";
75
+ AiModelDomain2["DictationTranscription"] = "dictationTranscription";
76
+ AiModelDomain2["VoiceTranscription"] = "voiceTranscription";
77
+ AiModelDomain2["VoiceTts"] = "voiceTts";
78
+ return AiModelDomain2;
79
+ })(AiModelDomain || {});
80
+ var AiCapabilityProvider = /* @__PURE__ */ ((AiCapabilityProvider2) => {
81
+ AiCapabilityProvider2["Luma"] = "luma";
82
+ AiCapabilityProvider2["MentingoCore"] = "mentingo-core";
83
+ return AiCapabilityProvider2;
84
+ })(AiCapabilityProvider || {});
85
+ var AiCapabilityMode = /* @__PURE__ */ ((AiCapabilityMode2) => {
86
+ AiCapabilityMode2["Core"] = "core";
87
+ AiCapabilityMode2["Custom"] = "custom";
88
+ AiCapabilityMode2["Disabled"] = "disabled";
89
+ return AiCapabilityMode2;
90
+ })(AiCapabilityMode || {});
91
+ var AiCapability = /* @__PURE__ */ ((AiCapability2) => {
92
+ AiCapability2["CourseGeneration"] = "courseGeneration";
93
+ AiCapability2["CourseGenerationVisualAssets"] = "courseGenerationVisualAssets";
94
+ AiCapability2["CourseGenerationEmbeddings"] = "courseGenerationEmbeddings";
95
+ AiCapability2["AiMentorChat"] = "aiMentorChat";
96
+ AiCapability2["AiMentorJudge"] = "aiMentorJudge";
97
+ AiCapability2["AiMentorConfigurationGenerator"] = "aiMentorConfigurationGenerator";
98
+ AiCapability2["AiJudgeConfigurationGenerator"] = "aiJudgeConfigurationGenerator";
99
+ AiCapability2["AiJudgeConfigurationValidator"] = "aiJudgeConfigurationValidator";
100
+ AiCapability2["AiMentorRagEmbeddings"] = "aiMentorRagEmbeddings";
101
+ AiCapability2["TranslationGeneration"] = "translationGeneration";
102
+ AiCapability2["DictationTranscription"] = "dictationTranscription";
103
+ AiCapability2["VoiceTranscription"] = "voiceTranscription";
104
+ AiCapability2["VoiceMentor"] = "voiceMentor";
105
+ AiCapability2["VoiceTextToSpeech"] = "voiceTextToSpeech";
106
+ return AiCapability2;
107
+ })(AiCapability || {});
108
+ var HttpClient = class {
109
+ constructor({
110
+ securityWorker,
111
+ secure,
112
+ format,
113
+ ...axiosConfig
114
+ } = {}) {
115
+ this.securityData = null;
116
+ this.setSecurityData = (data) => {
117
+ this.securityData = data;
118
+ };
119
+ this.request = async ({
120
+ secure,
121
+ path,
122
+ type,
123
+ query,
124
+ format,
125
+ body,
126
+ ...params
127
+ }) => {
128
+ const secureParams = (typeof secure === "boolean" ? secure : this.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {};
129
+ const requestParams = this.mergeRequestParams(params, secureParams);
130
+ const responseFormat = format || this.format || void 0;
131
+ if (type === "multipart/form-data" /* FormData */ && body && body !== null && typeof body === "object") {
132
+ body = this.createFormData(body);
133
+ }
134
+ if (type === "text/plain" /* Text */ && body && body !== null && typeof body !== "string") {
135
+ body = JSON.stringify(body);
136
+ }
137
+ return this.instance.request({
138
+ ...requestParams,
139
+ headers: {
140
+ ...requestParams.headers || {},
141
+ ...type ? { "Content-Type": type } : {}
142
+ },
143
+ params: query,
144
+ responseType: responseFormat,
145
+ data: body,
146
+ url: path
147
+ });
148
+ };
149
+ this.instance = axios.create({
150
+ ...axiosConfig,
151
+ baseURL: axiosConfig.baseURL || ""
152
+ });
153
+ this.secure = secure;
154
+ this.format = format;
155
+ this.securityWorker = securityWorker;
156
+ }
157
+ mergeRequestParams(params1, params2) {
158
+ const method = params1.method || params2 && params2.method;
159
+ return {
160
+ ...this.instance.defaults,
161
+ ...params1,
162
+ ...params2 || {},
163
+ headers: {
164
+ ...method && this.instance.defaults.headers[method.toLowerCase()] || {},
165
+ ...params1.headers || {},
166
+ ...params2 && params2.headers || {}
167
+ }
168
+ };
169
+ }
170
+ stringifyFormItem(formItem) {
171
+ if (typeof formItem === "object" && formItem !== null) {
172
+ return JSON.stringify(formItem);
173
+ } else {
174
+ return `${formItem}`;
175
+ }
176
+ }
177
+ createFormData(input) {
178
+ if (input instanceof FormData) {
179
+ return input;
180
+ }
181
+ return Object.keys(input || {}).reduce((formData, key) => {
182
+ const property = input[key];
183
+ const propertyContent = property instanceof Array ? property : [property];
184
+ for (const formItem of propertyContent) {
185
+ const isFileType = formItem instanceof Blob || formItem instanceof File;
186
+ formData.append(
187
+ key,
188
+ isFileType ? formItem : this.stringifyFormItem(formItem)
189
+ );
190
+ }
191
+ return formData;
192
+ }, new FormData());
193
+ }
194
+ };
195
+ var API = class extends HttpClient {
196
+ constructor() {
197
+ super(...arguments);
198
+ this.api = {
199
+ /**
200
+ * @description Returns whether required API-key-scoped provider secrets are configured for course generation and voice mentor. Authorization header required: `X-API-Key: <luma_api_key>`.
201
+ *
202
+ * @tags Public - Require API Key
203
+ * @name GetConfigurationStatusApiPublicV1AiConfigurationGet
204
+ * @summary Get Public API Configuration Status
205
+ * @request GET:/api/public/v1/ai/configuration
206
+ * @secure
207
+ */
208
+ getConfigurationStatusApiPublicV1AiConfigurationGet: (params = {}) => this.request({
209
+ path: `/api/public/v1/ai/configuration`,
210
+ method: "GET",
211
+ secure: true,
212
+ format: "json",
213
+ ...params
214
+ }),
215
+ /**
216
+ * No description
217
+ *
218
+ * @tags Public - Require API Key
219
+ * @name MentorChatApiPublicV1AiMentorChatPost
220
+ * @summary Stream Mentor Chat With Custom Runtime
221
+ * @request POST:/api/public/v1/ai/mentor/chat
222
+ * @secure
223
+ */
224
+ mentorChatApiPublicV1AiMentorChatPost: (data, params = {}) => this.request({
225
+ path: `/api/public/v1/ai/mentor/chat`,
226
+ method: "POST",
227
+ body: data,
228
+ secure: true,
229
+ type: "application/json" /* Json */,
230
+ ...params
231
+ }),
232
+ /**
233
+ * No description
234
+ *
235
+ * @tags Public - Require API Key
236
+ * @name GenerateMentorChatApiPublicV1AiMentorChatGeneratePost
237
+ * @summary Generate Mentor Chat Message With Custom Runtime
238
+ * @request POST:/api/public/v1/ai/mentor/chat/generate
239
+ * @secure
240
+ */
241
+ generateMentorChatApiPublicV1AiMentorChatGeneratePost: (data, params = {}) => this.request({
242
+ path: `/api/public/v1/ai/mentor/chat/generate`,
243
+ method: "POST",
244
+ body: data,
245
+ secure: true,
246
+ type: "application/json" /* Json */,
247
+ format: "json",
248
+ ...params
249
+ }),
250
+ /**
251
+ * No description
252
+ *
253
+ * @tags Public - Require API Key
254
+ * @name MentorJudgeApiPublicV1AiMentorJudgePost
255
+ * @summary Run AI Mentor Judge With Custom Runtime
256
+ * @request POST:/api/public/v1/ai/mentor/judge
257
+ * @secure
258
+ */
259
+ mentorJudgeApiPublicV1AiMentorJudgePost: (data, params = {}) => this.request({
260
+ path: `/api/public/v1/ai/mentor/judge`,
261
+ method: "POST",
262
+ body: data,
263
+ secure: true,
264
+ type: "application/json" /* Json */,
265
+ format: "json",
266
+ ...params
267
+ }),
268
+ /**
269
+ * No description
270
+ *
271
+ * @tags Public - Require API Key
272
+ * @name GenerateMentorConfigurationApiPublicV1AiMentorConfigurationGeneratePost
273
+ * @summary Generate AI Mentor Configuration With Custom Runtime
274
+ * @request POST:/api/public/v1/ai/mentor-configuration/generate
275
+ * @secure
276
+ */
277
+ generateMentorConfigurationApiPublicV1AiMentorConfigurationGeneratePost: (data, params = {}) => this.request({
278
+ path: `/api/public/v1/ai/mentor-configuration/generate`,
279
+ method: "POST",
280
+ body: data,
281
+ secure: true,
282
+ type: "application/json" /* Json */,
283
+ format: "json",
284
+ ...params
285
+ }),
286
+ /**
287
+ * No description
288
+ *
289
+ * @tags Public - Require API Key
290
+ * @name ValidateMentorConfigurationApiPublicV1AiMentorConfigurationValidatePost
291
+ * @summary Validate AI Mentor Configuration With Custom Runtime
292
+ * @request POST:/api/public/v1/ai/mentor-configuration/validate
293
+ * @secure
294
+ */
295
+ validateMentorConfigurationApiPublicV1AiMentorConfigurationValidatePost: (data, params = {}) => this.request({
296
+ path: `/api/public/v1/ai/mentor-configuration/validate`,
297
+ method: "POST",
298
+ body: data,
299
+ secure: true,
300
+ type: "application/json" /* Json */,
301
+ format: "json",
302
+ ...params
303
+ }),
304
+ /**
305
+ * No description
306
+ *
307
+ * @tags Public - Require API Key
308
+ * @name GenerateJudgeConfigurationApiPublicV1AiJudgeConfigurationGeneratePost
309
+ * @summary Generate AI Judge Configuration With Custom Runtime
310
+ * @request POST:/api/public/v1/ai/judge-configuration/generate
311
+ * @secure
312
+ */
313
+ generateJudgeConfigurationApiPublicV1AiJudgeConfigurationGeneratePost: (data, params = {}) => this.request({
314
+ path: `/api/public/v1/ai/judge-configuration/generate`,
315
+ method: "POST",
316
+ body: data,
317
+ secure: true,
318
+ type: "application/json" /* Json */,
319
+ format: "json",
320
+ ...params
321
+ }),
322
+ /**
323
+ * No description
324
+ *
325
+ * @tags Public - Require API Key
326
+ * @name ValidateJudgeConfigurationApiPublicV1AiJudgeConfigurationValidatePost
327
+ * @summary Validate AI Judge Configuration With Custom Runtime
328
+ * @request POST:/api/public/v1/ai/judge-configuration/validate
329
+ * @secure
330
+ */
331
+ validateJudgeConfigurationApiPublicV1AiJudgeConfigurationValidatePost: (data, params = {}) => this.request({
332
+ path: `/api/public/v1/ai/judge-configuration/validate`,
333
+ method: "POST",
334
+ body: data,
335
+ secure: true,
336
+ type: "application/json" /* Json */,
337
+ format: "json",
338
+ ...params
339
+ }),
340
+ /**
341
+ * No description
342
+ *
343
+ * @tags Public - Require API Key
344
+ * @name GenerateTranslationsApiPublicV1AiTranslationsGeneratePost
345
+ * @summary Generate Translations With Custom Runtime
346
+ * @request POST:/api/public/v1/ai/translations/generate
347
+ * @secure
348
+ */
349
+ generateTranslationsApiPublicV1AiTranslationsGeneratePost: (data, params = {}) => this.request({
350
+ path: `/api/public/v1/ai/translations/generate`,
351
+ method: "POST",
352
+ body: data,
353
+ secure: true,
354
+ type: "application/json" /* Json */,
355
+ format: "json",
356
+ ...params
357
+ }),
358
+ /**
359
+ * No description
360
+ *
361
+ * @tags Public - Require API Key
362
+ * @name CreateEmbeddingsApiPublicV1AiEmbeddingsPost
363
+ * @summary Create Embeddings With Custom Runtime
364
+ * @request POST:/api/public/v1/ai/embeddings
365
+ * @secure
366
+ */
367
+ createEmbeddingsApiPublicV1AiEmbeddingsPost: (data, params = {}) => this.request({
368
+ path: `/api/public/v1/ai/embeddings`,
369
+ method: "POST",
370
+ body: data,
371
+ secure: true,
372
+ type: "application/json" /* Json */,
373
+ format: "json",
374
+ ...params
375
+ }),
376
+ /**
377
+ * No description
378
+ *
379
+ * @tags Public - Require API Key
380
+ * @name TranscribeDictationApiPublicV1AiTranscriptionsPost
381
+ * @summary Transcribe Dictation Audio With Custom Runtime
382
+ * @request POST:/api/public/v1/ai/transcriptions
383
+ * @secure
384
+ */
385
+ transcribeDictationApiPublicV1AiTranscriptionsPost: (data, params = {}) => this.request({
386
+ path: `/api/public/v1/ai/transcriptions`,
387
+ method: "POST",
388
+ body: data,
389
+ secure: true,
390
+ type: "multipart/form-data" /* FormData */,
391
+ format: "json",
392
+ ...params
393
+ }),
394
+ /**
395
+ * @description Open or restore the organization-scoped course authoring session.
396
+ *
397
+ * @tags Public - Require API Key
398
+ * @name CreateSessionApiPublicV1AuthoringSessionsPost
399
+ * @summary Create Session
400
+ * @request POST:/api/public/v1/authoring/sessions
401
+ * @secure
402
+ */
403
+ createSessionApiPublicV1AuthoringSessionsPost: (data, params = {}) => this.request({
404
+ path: `/api/public/v1/authoring/sessions`,
405
+ method: "POST",
406
+ body: data,
407
+ secure: true,
408
+ type: "application/json" /* Json */,
409
+ format: "json",
410
+ ...params
411
+ }),
412
+ /**
413
+ * @description List one server-filtered, offset-paginated page of durable course conversations in stable latest-activity order.
414
+ *
415
+ * @tags Public - Require API Key
416
+ * @name ListSessionsApiPublicV1AuthoringSessionsGet
417
+ * @summary List Sessions
418
+ * @request GET:/api/public/v1/authoring/sessions
419
+ * @secure
420
+ */
421
+ listSessionsApiPublicV1AuthoringSessionsGet: (query, params = {}) => this.request({
422
+ path: `/api/public/v1/authoring/sessions`,
423
+ method: "GET",
424
+ query,
425
+ secure: true,
426
+ format: "json",
427
+ ...params
428
+ }),
429
+ /**
430
+ * @description Return the authorized durable workspace snapshot, including task state.
431
+ *
432
+ * @tags Public - Require API Key
433
+ * @name GetSessionApiPublicV1AuthoringSessionsSessionIdGet
434
+ * @summary Get Session
435
+ * @request GET:/api/public/v1/authoring/sessions/{session_id}
436
+ * @secure
437
+ */
438
+ getSessionApiPublicV1AuthoringSessionsSessionIdGet: (sessionId, params = {}) => this.request({
439
+ path: `/api/public/v1/authoring/sessions/${sessionId}`,
440
+ method: "GET",
441
+ secure: true,
442
+ format: "json",
443
+ ...params
444
+ }),
445
+ /**
446
+ * @description Page older saved turns and their review artifacts by a stable request cursor.
447
+ *
448
+ * @tags Public - Require API Key
449
+ * @name GetOlderTurnsApiPublicV1AuthoringSessionsSessionIdTurnsGet
450
+ * @summary Get Older Turns
451
+ * @request GET:/api/public/v1/authoring/sessions/{session_id}/turns
452
+ * @secure
453
+ */
454
+ getOlderTurnsApiPublicV1AuthoringSessionsSessionIdTurnsGet: (sessionId, query, params = {}) => this.request({
455
+ path: `/api/public/v1/authoring/sessions/${sessionId}/turns`,
456
+ method: "GET",
457
+ query,
458
+ secure: true,
459
+ format: "json",
460
+ ...params
461
+ }),
462
+ /**
463
+ * @description Read an ordered page after the supplied durable cursor for client replay.
464
+ *
465
+ * @tags Public - Require API Key
466
+ * @name GetEventsApiPublicV1AuthoringSessionsSessionIdEventsGet
467
+ * @summary Get Events
468
+ * @request GET:/api/public/v1/authoring/sessions/{session_id}/events
469
+ * @secure
470
+ */
471
+ getEventsApiPublicV1AuthoringSessionsSessionIdEventsGet: (sessionId, query, params = {}) => this.request({
472
+ path: `/api/public/v1/authoring/sessions/${sessionId}/events`,
473
+ method: "GET",
474
+ query,
475
+ secure: true,
476
+ format: "json",
477
+ ...params
478
+ }),
479
+ /**
480
+ * @description Accept an idempotent authoring command and return its durable acknowledgement.
481
+ *
482
+ * @tags Public - Require API Key
483
+ * @name CommandApiPublicV1AuthoringSessionsSessionIdCommandsPost
484
+ * @summary Command
485
+ * @request POST:/api/public/v1/authoring/sessions/{session_id}/commands
486
+ * @secure
487
+ */
488
+ commandApiPublicV1AuthoringSessionsSessionIdCommandsPost: (sessionId, data, params = {}) => this.request({
489
+ path: `/api/public/v1/authoring/sessions/${sessionId}/commands`,
490
+ method: "POST",
491
+ body: data,
492
+ secure: true,
493
+ type: "application/json" /* Json */,
494
+ format: "json",
495
+ ...params
496
+ }),
497
+ /**
498
+ * @description Accept one organization-scoped selected-detail callback and resume its fenced task.
499
+ *
500
+ * @tags Public - Require API Key
501
+ * @name FulfillContextApiPublicV1AuthoringSessionsSessionIdContextRequestsContextRequestIdFulfillmentPost
502
+ * @summary Fulfill Context
503
+ * @request POST:/api/public/v1/authoring/sessions/{session_id}/context-requests/{context_request_id}/fulfillment
504
+ * @secure
505
+ */
506
+ fulfillContextApiPublicV1AuthoringSessionsSessionIdContextRequestsContextRequestIdFulfillmentPost: (sessionId, contextRequestId, data, params = {}) => this.request({
507
+ path: `/api/public/v1/authoring/sessions/${sessionId}/context-requests/${contextRequestId}/fulfillment`,
508
+ method: "POST",
509
+ body: data,
510
+ secure: true,
511
+ type: "application/json" /* Json */,
512
+ format: "json",
513
+ ...params
514
+ }),
515
+ /**
516
+ * @description Record one bounded Core-side context failure and terminate only its waiting task.
517
+ *
518
+ * @tags Public - Require API Key
519
+ * @name FailContextApiPublicV1AuthoringSessionsSessionIdContextRequestsContextRequestIdFailurePost
520
+ * @summary Fail Context
521
+ * @request POST:/api/public/v1/authoring/sessions/{session_id}/context-requests/{context_request_id}/failure
522
+ * @secure
523
+ */
524
+ failContextApiPublicV1AuthoringSessionsSessionIdContextRequestsContextRequestIdFailurePost: (sessionId, contextRequestId, data, params = {}) => this.request({
525
+ path: `/api/public/v1/authoring/sessions/${sessionId}/context-requests/${contextRequestId}/failure`,
526
+ method: "POST",
527
+ body: data,
528
+ secure: true,
529
+ type: "application/json" /* Json */,
530
+ format: "json",
531
+ ...params
532
+ }),
533
+ /**
534
+ * @description Freeze a validated selection of reviewed proposals for Core application. This does not write course content to Core.
535
+ *
536
+ * @tags Public - Require API Key
537
+ * @name PrepareExportApiPublicV1AuthoringSessionsSessionIdExportsPost
538
+ * @summary Prepare Export
539
+ * @request POST:/api/public/v1/authoring/sessions/{session_id}/exports
540
+ * @secure
541
+ */
542
+ prepareExportApiPublicV1AuthoringSessionsSessionIdExportsPost: (sessionId, data, params = {}) => this.request({
543
+ path: `/api/public/v1/authoring/sessions/${sessionId}/exports`,
544
+ method: "POST",
545
+ body: data,
546
+ secure: true,
547
+ type: "application/json" /* Json */,
548
+ format: "json",
549
+ ...params
550
+ }),
551
+ /**
552
+ * @description Read the immutable application bundle previously frozen for this session.
553
+ *
554
+ * @tags Public - Require API Key
555
+ * @name GetExportApiPublicV1AuthoringSessionsSessionIdExportsExportIdGet
556
+ * @summary Get Export
557
+ * @request GET:/api/public/v1/authoring/sessions/{session_id}/exports/{export_id}
558
+ * @secure
559
+ */
560
+ getExportApiPublicV1AuthoringSessionsSessionIdExportsExportIdGet: (sessionId, exportId, params = {}) => this.request({
561
+ path: `/api/public/v1/authoring/sessions/${sessionId}/exports/${exportId}`,
562
+ method: "GET",
563
+ secure: true,
564
+ format: "json",
565
+ ...params
566
+ }),
567
+ /**
568
+ * @description Record Core application feedback against the corresponding frozen export.
569
+ *
570
+ * @tags Public - Require API Key
571
+ * @name ReceiptApiPublicV1AuthoringSessionsSessionIdReceiptsPost
572
+ * @summary Receipt
573
+ * @request POST:/api/public/v1/authoring/sessions/{session_id}/receipts
574
+ * @secure
575
+ */
576
+ receiptApiPublicV1AuthoringSessionsSessionIdReceiptsPost: (sessionId, data, params = {}) => this.request({
577
+ path: `/api/public/v1/authoring/sessions/${sessionId}/receipts`,
578
+ method: "POST",
579
+ body: data,
580
+ secure: true,
581
+ type: "application/json" /* Json */,
582
+ format: "json",
583
+ ...params
584
+ }),
585
+ /**
586
+ * @description Stream durable events after authorization, using Redis only as a wake-up hint. The generator rechecks integration access and reads SQL to recover missed notifications. Closing this response does not cancel authoring tasks.
587
+ *
588
+ * @tags Public - Require API Key
589
+ * @name SubscribeEventsApiPublicV1AuthoringSessionsSessionIdEventsStreamGet
590
+ * @summary Subscribe Events
591
+ * @request GET:/api/public/v1/authoring/sessions/{session_id}/events/stream
592
+ * @secure
593
+ */
594
+ subscribeEventsApiPublicV1AuthoringSessionsSessionIdEventsStreamGet: (sessionId, query, params = {}) => this.request({
595
+ path: `/api/public/v1/authoring/sessions/${sessionId}/events/stream`,
596
+ method: "GET",
597
+ query,
598
+ secure: true,
599
+ ...params
600
+ }),
601
+ /**
602
+ * @description Store an authorized upload and enqueue source processing under its command identity.
603
+ *
604
+ * @tags Public - Require API Key
605
+ * @name UploadSourceApiPublicV1AuthoringSessionsSessionIdSourcesPost
606
+ * @summary Upload Source
607
+ * @request POST:/api/public/v1/authoring/sessions/{session_id}/sources
608
+ * @secure
609
+ */
610
+ uploadSourceApiPublicV1AuthoringSessionsSessionIdSourcesPost: (sessionId, data, params = {}) => this.request({
611
+ path: `/api/public/v1/authoring/sessions/${sessionId}/sources`,
612
+ method: "POST",
613
+ body: data,
614
+ secure: true,
615
+ type: "multipart/form-data" /* FormData */,
616
+ format: "json",
617
+ ...params
618
+ }),
619
+ /**
620
+ * @description Return an authorized asset revision with private, non-cacheable response headers.
621
+ *
622
+ * @tags Public - Require API Key
623
+ * @name DownloadAssetApiPublicV1AuthoringSessionsSessionIdAssetsAssetIdGet
624
+ * @summary Download Asset
625
+ * @request GET:/api/public/v1/authoring/sessions/{session_id}/assets/{asset_id}
626
+ * @secure
627
+ */
628
+ downloadAssetApiPublicV1AuthoringSessionsSessionIdAssetsAssetIdGet: (sessionId, assetId, query, params = {}) => this.request({
629
+ path: `/api/public/v1/authoring/sessions/${sessionId}/assets/${assetId}`,
630
+ method: "GET",
631
+ query,
632
+ secure: true,
633
+ ...params
634
+ }),
635
+ /**
636
+ * No description
637
+ *
638
+ * @tags Public - Require Admin API Key
639
+ * @name ListOrganizationApiKeysApiPublicV1AdminOrganizationsOrganizationIdApiKeysGet
640
+ * @summary List Organization Api Keys
641
+ * @request GET:/api/public/v1/admin/organizations/{organization_id}/api-keys
642
+ * @secure
643
+ */
644
+ listOrganizationApiKeysApiPublicV1AdminOrganizationsOrganizationIdApiKeysGet: (organizationId, params = {}) => this.request({
645
+ path: `/api/public/v1/admin/organizations/${organizationId}/api-keys`,
646
+ method: "GET",
647
+ secure: true,
648
+ format: "json",
649
+ ...params
650
+ }),
651
+ /**
652
+ * No description
653
+ *
654
+ * @tags Public - Require Admin API Key
655
+ * @name CreateOrganizationApiKeyApiPublicV1AdminOrganizationsOrganizationIdApiKeysPost
656
+ * @summary Create Organization Api Key
657
+ * @request POST:/api/public/v1/admin/organizations/{organization_id}/api-keys
658
+ * @secure
659
+ */
660
+ createOrganizationApiKeyApiPublicV1AdminOrganizationsOrganizationIdApiKeysPost: (organizationId, data, params = {}) => this.request({
661
+ path: `/api/public/v1/admin/organizations/${organizationId}/api-keys`,
662
+ method: "POST",
663
+ body: data,
664
+ secure: true,
665
+ type: "application/json" /* Json */,
666
+ format: "json",
667
+ ...params
668
+ }),
669
+ /**
670
+ * No description
671
+ *
672
+ * @tags Public - Require Admin API Key
673
+ * @name GetOrganizationApiKeyApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdGet
674
+ * @summary Get Organization Api Key
675
+ * @request GET:/api/public/v1/admin/organizations/{organization_id}/api-keys/{api_key_id}
676
+ * @secure
677
+ */
678
+ getOrganizationApiKeyApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdGet: (organizationId, apiKeyId, params = {}) => this.request({
679
+ path: `/api/public/v1/admin/organizations/${organizationId}/api-keys/${apiKeyId}`,
680
+ method: "GET",
681
+ secure: true,
682
+ format: "json",
683
+ ...params
684
+ }),
685
+ /**
686
+ * No description
687
+ *
688
+ * @tags Public - Require Admin API Key
689
+ * @name UpdateOrganizationApiKeyApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdPatch
690
+ * @summary Update Organization Api Key
691
+ * @request PATCH:/api/public/v1/admin/organizations/{organization_id}/api-keys/{api_key_id}
692
+ * @secure
693
+ */
694
+ updateOrganizationApiKeyApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdPatch: (organizationId, apiKeyId, data, params = {}) => this.request({
695
+ path: `/api/public/v1/admin/organizations/${organizationId}/api-keys/${apiKeyId}`,
696
+ method: "PATCH",
697
+ body: data,
698
+ secure: true,
699
+ type: "application/json" /* Json */,
700
+ format: "json",
701
+ ...params
702
+ }),
703
+ /**
704
+ * No description
705
+ *
706
+ * @tags Public - Require Admin API Key
707
+ * @name RevokeOrganizationApiKeyApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdDelete
708
+ * @summary Revoke Organization Api Key
709
+ * @request DELETE:/api/public/v1/admin/organizations/{organization_id}/api-keys/{api_key_id}
710
+ * @secure
711
+ */
712
+ revokeOrganizationApiKeyApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdDelete: (organizationId, apiKeyId, params = {}) => this.request({
713
+ path: `/api/public/v1/admin/organizations/${organizationId}/api-keys/${apiKeyId}`,
714
+ method: "DELETE",
715
+ secure: true,
716
+ format: "json",
717
+ ...params
718
+ }),
719
+ /**
720
+ * No description
721
+ *
722
+ * @tags Public - Require Admin API Key
723
+ * @name GetOrganizationApiKeyConfigurationApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdConfigurationGet
724
+ * @summary Get Organization Api Key Configuration
725
+ * @request GET:/api/public/v1/admin/organizations/{organization_id}/api-keys/{api_key_id}/configuration
726
+ * @secure
727
+ */
728
+ getOrganizationApiKeyConfigurationApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdConfigurationGet: (organizationId, apiKeyId, params = {}) => this.request({
729
+ path: `/api/public/v1/admin/organizations/${organizationId}/api-keys/${apiKeyId}/configuration`,
730
+ method: "GET",
731
+ secure: true,
732
+ format: "json",
733
+ ...params
734
+ }),
735
+ /**
736
+ * No description
737
+ *
738
+ * @tags Public - Require Admin API Key
739
+ * @name ListOrganizationApiKeyAssignmentsApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdAiModelAssignmentsGet
740
+ * @summary List Organization Api Key Assignments
741
+ * @request GET:/api/public/v1/admin/organizations/{organization_id}/api-keys/{api_key_id}/ai-model-assignments
742
+ * @secure
743
+ */
744
+ listOrganizationApiKeyAssignmentsApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdAiModelAssignmentsGet: (organizationId, apiKeyId, params = {}) => this.request({
745
+ path: `/api/public/v1/admin/organizations/${organizationId}/api-keys/${apiKeyId}/ai-model-assignments`,
746
+ method: "GET",
747
+ secure: true,
748
+ format: "json",
749
+ ...params
750
+ }),
751
+ /**
752
+ * No description
753
+ *
754
+ * @tags Public - Require Admin API Key
755
+ * @name UpdateOrganizationApiKeyAssignmentApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdAiModelAssignmentsDomainPatch
756
+ * @summary Update Organization Api Key Assignment
757
+ * @request PATCH:/api/public/v1/admin/organizations/{organization_id}/api-keys/{api_key_id}/ai-model-assignments/{domain}
758
+ * @secure
759
+ */
760
+ updateOrganizationApiKeyAssignmentApiPublicV1AdminOrganizationsOrganizationIdApiKeysApiKeyIdAiModelAssignmentsDomainPatch: (organizationId, apiKeyId, domain, data, params = {}) => this.request({
761
+ path: `/api/public/v1/admin/organizations/${organizationId}/api-keys/${apiKeyId}/ai-model-assignments/${domain}`,
762
+ method: "PATCH",
763
+ body: data,
764
+ secure: true,
765
+ type: "application/json" /* Json */,
766
+ format: "json",
767
+ ...params
768
+ }),
769
+ /**
770
+ * No description
771
+ *
772
+ * @tags Public - Require Admin API Key
773
+ * @name ListOrganizationAiModelProfilesApiPublicV1AdminOrganizationsOrganizationIdAiModelProfilesGet
774
+ * @summary List Organization Ai Model Profiles
775
+ * @request GET:/api/public/v1/admin/organizations/{organization_id}/ai-model-profiles
776
+ * @secure
777
+ */
778
+ listOrganizationAiModelProfilesApiPublicV1AdminOrganizationsOrganizationIdAiModelProfilesGet: (organizationId, params = {}) => this.request({
779
+ path: `/api/public/v1/admin/organizations/${organizationId}/ai-model-profiles`,
780
+ method: "GET",
781
+ secure: true,
782
+ format: "json",
783
+ ...params
784
+ })
785
+ };
786
+ }
787
+ };
788
+
789
+ // src/http/admin.constants.ts
790
+ var LUMA_AI_MODEL_DOMAINS = {
791
+ AI_MENTOR: "aiMentor" /* AiMentor */,
792
+ AI_MENTOR_CONFIGURATION_GENERATOR: "aiMentorConfigurationGenerator" /* AiMentorConfigurationGenerator */,
793
+ AI_MENTOR_JUDGE: "aiMentorJudge" /* AiMentorJudge */,
794
+ AI_JUDGE_CONFIGURATION_GENERATOR: "aiJudgeConfigurationGenerator" /* AiJudgeConfigurationGenerator */,
795
+ AI_JUDGE_CONFIGURATION_VALIDATOR: "aiJudgeConfigurationValidator" /* AiJudgeConfigurationValidator */,
796
+ TRANSLATIONS: "translations" /* Translations */,
797
+ COURSE_GENERATION: "courseGeneration" /* CourseGeneration */,
798
+ COURSE_GENERATION_VISUAL_ASSETS: "courseGenerationVisualAssets" /* CourseGenerationVisualAssets */,
799
+ COURSE_GENERATION_EMBEDDINGS: "courseGenerationEmbeddings" /* CourseGenerationEmbeddings */,
800
+ EMBEDDINGS: "embeddings" /* Embeddings */,
801
+ DICTATION_TRANSCRIPTION: "dictationTranscription" /* DictationTranscription */,
802
+ VOICE_TRANSCRIPTION: "voiceTranscription" /* VoiceTranscription */,
803
+ VOICE_TTS: "voiceTts" /* VoiceTts */
804
+ };
805
+ var LUMA_AI_MODEL_PROFILE_KINDS = {
806
+ CHAT: "chat" /* Chat */,
807
+ IMAGE: "image" /* Image */,
808
+ EMBEDDING: "embedding" /* Embedding */,
809
+ SPEECH_TO_TEXT: "speechToText" /* SpeechToText */,
810
+ TEXT_TO_SPEECH: "textToSpeech" /* TextToSpeech */
811
+ };
812
+
813
+ // src/http/authoring.types.ts
814
+ var AuthoringSubscriptionError = class extends Error {
815
+ /** Preserve the machine-readable terminal reason for consumer recovery decisions. */
816
+ constructor(code) {
817
+ super(`Authoring event subscription ended: ${code}`);
818
+ this.name = "AuthoringSubscriptionError";
819
+ this.code = code;
820
+ }
821
+ };
822
+
823
+ // src/socket/types.ts
824
+ var LUMA_SOCKET_MESSAGE_TYPES = {
825
+ AUDIO_START: "audio.start",
826
+ AUDIO_CHUNK: "audio.chunk",
827
+ AUDIO_RECONNECT: "audio.reconnect",
828
+ AUDIO_RECOVERED: "audio.recovered",
829
+ AUDIO_STOP: "audio.stop",
830
+ CLIENT_SPEECH_START: "client.speech.start",
831
+ CLIENT_SPEECH_END: "client.speech.end",
832
+ MENTOR_TEXT_DELTA: "mentor.text.delta",
833
+ MENTOR_TEXT_END: "mentor.text.end",
834
+ MENTOR_TEXT_ERROR: "mentor.text.error"
835
+ };
836
+ var LUMA_AUDIO_ACTIONS = {
837
+ VOICE_MENTOR: "VOICE_MENTOR"
838
+ };
839
+ var LUMA_AUDIO_FORMATS = {
840
+ PCM_S16LE: "pcm_s16le"
841
+ };
842
+ var LUMA_SOCKET_LISTEN_EVENTS = {
843
+ SERVER_CONNECTED: "server:connected",
844
+ PONG: "pong",
845
+ AUDIO_STARTED: "audio:start",
846
+ AUDIO_CHUNKED: "audio:chunked",
847
+ AUDIO_CHUNK_ERROR: "audio:chunk_error",
848
+ AUDIO_RECOVERED: "audio:recovered",
849
+ AUDIO_RECONNECT_ERROR: "audio:reconnect_error",
850
+ AUDIO_STOPPED: "audio:stopped",
851
+ LEARNER_TRANSCRIPTION: "learner:transcription",
852
+ AUDIO_OUTPUT_ALIGNMENT: "audio:output:alignment",
853
+ AUDIO_OUTPUT_CHUNK: "audio:output:chunk",
854
+ AUDIO_OUTPUT_INTERRUPTED: "audio:output:interrupted",
855
+ AUDIO_OUTPUT_ERROR: "audio:output:error",
856
+ AUDIO_OUTPUT_COMPLETE: "audio:output:complete"
857
+ };
858
+ var LUMA_MENTOR_STREAM_EVENT_TYPES = {
859
+ LEARNER_TRANSCRIPTION: "learner.transcription",
860
+ AUDIO_OUTPUT_ALIGNMENT: "audio.output.alignment",
861
+ AUDIO_OUTPUT_CHUNK: "audio.output.chunk",
862
+ AUDIO_OUTPUT_INTERRUPTED: "audio.output.interrupted",
863
+ AUDIO_OUTPUT_ERROR: "audio.output.error",
864
+ AUDIO_OUTPUT_COMPLETE: "audio.output.complete"
865
+ };
866
+ var LUMA_SOCKET_EMIT_EVENTS = {
867
+ START_AUDIO: "start_audio",
868
+ AUDIO_CHUNK: "audio_chunk",
869
+ AUDIO_RECONNECT: "audio_reconnect",
870
+ AUDIO_STOP: "audio_stop",
871
+ CLIENT_SPEECH_START: "client_speech_start",
872
+ CLIENT_SPEECH_END: "client_speech_end",
873
+ MENTOR_TEXT_DELTA: "mentor_text_delta",
874
+ MENTOR_TEXT_END: "mentor_text_end",
875
+ MENTOR_TEXT_ERROR: "mentor_text_error",
876
+ PING: "ping",
877
+ TRIGGER_TTS: "trigger_tts"
878
+ };
879
+ var TRANSCRIPTION_MODES = {
880
+ PAUSE_BATCH: "pause_batch",
881
+ REALTIME_STREAM: "realtime_stream"
882
+ };
883
+ var LUMA_CAPTURE_PROFILES = {
884
+ CONTINUOUS_PCM: "continuous_pcm",
885
+ VAD_SEGMENTED: "vad_segmented"
886
+ };
887
+ var AUDIO_RECOVERY_STATES = {
888
+ LISTENING: "listening",
889
+ MENTOR_ACTIVE: "mentor_active",
890
+ USER_SPEAKING: "user_speaking"
891
+ };
892
+ var AUDIO_PROVIDER_STATES = {
893
+ CONNECTED: "connected",
894
+ RESTARTED: "restarted",
895
+ NOT_APPLICABLE: "not_applicable"
896
+ };
897
+ var LEARNER_TRANSCRIPT_STATUSES = {
898
+ PARTIAL: "partial",
899
+ FINAL: "final"
900
+ };
901
+
902
+ // src/socket/constants.ts
903
+ var LUMA_VOICE_TIMING_PRECISION = {
904
+ WORD: "word",
905
+ SEGMENT: "segment",
906
+ BOUNDARY_ESTIMATE: "boundary_estimate",
907
+ UNKNOWN: "unknown"
908
+ };
909
+ var EXTERNAL_AUDIO_RECOVERY_STATE = {
910
+ CONNECTED: "connected",
911
+ RECOVERING: "recovering",
912
+ FAILED: "failed"
913
+ };
914
+ var EXTERNAL_AUDIO_OPERATION = {
915
+ CHUNK: "chunk",
916
+ SPEECH_START: "speech_start",
917
+ SPEECH_END: "speech_end"
918
+ };
919
+ var EXTERNAL_AUDIO_MAX_RECOVERY_ATTEMPTS = 8;
920
+ var EXTERNAL_AUDIO_MAX_BUFFERED_CHUNKS = 1024;
921
+ var EXTERNAL_AUDIO_CLIENT_RECONNECT_GRACE_MS = 1e4;
922
+ var EXTERNAL_AUDIO_RECOVERY_TIMEOUT_MS = 15e3;
923
+ var EXTERNAL_AUDIO_TERMINAL_RECOVERY_ERROR_CODES = [
924
+ "AUDIO_SESSION_RUN_REPLACED",
925
+ "AUDIO_SESSION_CLOSED",
926
+ "AUDIO_SESSION_RUN_MISMATCH",
927
+ "AUDIO_SESSION_RUN_ID_UNAVAILABLE"
928
+ ];
929
+
930
+ export {
931
+ TurnStatus,
932
+ TurnPartStatus,
933
+ TurnPartKind,
934
+ TextToSpeechProvider,
935
+ TaskKind,
936
+ TTSProvider,
937
+ ReasoningEffort,
938
+ AiModelProfileKind,
939
+ AiModelDomain,
940
+ AiCapabilityProvider,
941
+ AiCapabilityMode,
942
+ AiCapability,
943
+ API,
944
+ LUMA_AI_MODEL_DOMAINS,
945
+ LUMA_AI_MODEL_PROFILE_KINDS,
946
+ AuthoringSubscriptionError,
947
+ LUMA_SOCKET_MESSAGE_TYPES,
948
+ LUMA_AUDIO_ACTIONS,
949
+ LUMA_AUDIO_FORMATS,
950
+ LUMA_SOCKET_LISTEN_EVENTS,
951
+ LUMA_MENTOR_STREAM_EVENT_TYPES,
952
+ LUMA_SOCKET_EMIT_EVENTS,
953
+ TRANSCRIPTION_MODES,
954
+ LUMA_CAPTURE_PROFILES,
955
+ AUDIO_RECOVERY_STATES,
956
+ AUDIO_PROVIDER_STATES,
957
+ LEARNER_TRANSCRIPT_STATUSES,
958
+ LUMA_VOICE_TIMING_PRECISION,
959
+ EXTERNAL_AUDIO_RECOVERY_STATE,
960
+ EXTERNAL_AUDIO_OPERATION,
961
+ EXTERNAL_AUDIO_MAX_RECOVERY_ATTEMPTS,
962
+ EXTERNAL_AUDIO_MAX_BUFFERED_CHUNKS,
963
+ EXTERNAL_AUDIO_CLIENT_RECONNECT_GRACE_MS,
964
+ EXTERNAL_AUDIO_RECOVERY_TIMEOUT_MS,
965
+ EXTERNAL_AUDIO_TERMINAL_RECOVERY_ERROR_CODES
966
+ };