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