@iblai/iblai-api 4.284.3-core → 4.285.0-core

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,23 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ import type { DirectionEnum } from './DirectionEnum';
6
+ /**
7
+ * Start a migration run. Validates the request; the view kicks the task.
8
+ *
9
+ * ``selected_components`` is the OPTIONAL-set selection; mandatory
10
+ * sets always run regardless. An empty/omitted list = full fidelity.
11
+ */
12
+ export type PlatformMigrationRunCreate = {
13
+ readonly run_id: string;
14
+ direction: DirectionEnum;
15
+ source_key?: string;
16
+ target_key?: string;
17
+ bundle_path?: string;
18
+ bundle_storage_key?: string;
19
+ selected_components?: any;
20
+ admin_user?: string;
21
+ email?: string;
22
+ };
23
+
@@ -9,7 +9,7 @@
9
9
  * * `failed` - Failed
10
10
  * * `canceled` - Canceled
11
11
  */
12
- export enum EximTaskStatusEnum {
12
+ export enum Status147Enum {
13
13
  PENDING = 'pending',
14
14
  IN_PROGRESS = 'in_progress',
15
15
  COMPLETED = 'completed',
@@ -7,6 +7,8 @@ import type { EximTask } from '../models/EximTask';
7
7
  import type { ExportTargetEnvironment } from '../models/ExportTargetEnvironment';
8
8
  import type { PatchedCourseExportEligibility } from '../models/PatchedCourseExportEligibility';
9
9
  import type { PatchedExportTargetEnvironment } from '../models/PatchedExportTargetEnvironment';
10
+ import type { PlatformMigrationRun } from '../models/PlatformMigrationRun';
11
+ import type { PlatformMigrationRunCreate } from '../models/PlatformMigrationRunCreate';
10
12
  import type { CancelablePromise } from '../core/CancelablePromise';
11
13
  import { OpenAPI } from '../core/OpenAPI';
12
14
  import { request as __request } from '../core/request';
@@ -298,6 +300,176 @@ export class EximService {
298
300
  },
299
301
  });
300
302
  }
303
+ /**
304
+ * Start and poll tenant-data migration runs (the platform_migration lane).
305
+ *
306
+ * ``POST`` starts a run and returns its ``run_id`` (kicking the Celery task);
307
+ * ``GET`` list/detail surface status + progress + report. Detail lookup is by
308
+ * the public ``run_id`` UUID, not the surrogate PK. Gated by the
309
+ * feature flag — start is rejected with 503 on non-AI deployments.
310
+ * @returns PlatformMigrationRun
311
+ * @throws ApiError
312
+ */
313
+ public static eximManagePlatformMigrationsList({
314
+ direction,
315
+ ordering,
316
+ sourceKey,
317
+ status,
318
+ targetKey,
319
+ }: {
320
+ /**
321
+ * * `export` - Export
322
+ * * `import` - Import
323
+ */
324
+ direction?: 'export' | 'import',
325
+ /**
326
+ * Which field to use when ordering the results.
327
+ */
328
+ ordering?: string,
329
+ sourceKey?: string,
330
+ /**
331
+ * * `pending` - Pending
332
+ * * `in_progress` - In Progress
333
+ * * `completed` - Completed
334
+ * * `failed` - Failed
335
+ * * `canceled` - Canceled
336
+ */
337
+ status?: 'canceled' | 'completed' | 'failed' | 'in_progress' | 'pending',
338
+ targetKey?: string,
339
+ }): CancelablePromise<Array<PlatformMigrationRun>> {
340
+ return __request(OpenAPI, {
341
+ method: 'GET',
342
+ url: '/api/exim/manage/platform-migrations/',
343
+ query: {
344
+ 'direction': direction,
345
+ 'ordering': ordering,
346
+ 'source_key': sourceKey,
347
+ 'status': status,
348
+ 'target_key': targetKey,
349
+ },
350
+ });
351
+ }
352
+ /**
353
+ * Start and poll tenant-data migration runs (the platform_migration lane).
354
+ *
355
+ * ``POST`` starts a run and returns its ``run_id`` (kicking the Celery task);
356
+ * ``GET`` list/detail surface status + progress + report. Detail lookup is by
357
+ * the public ``run_id`` UUID, not the surrogate PK. Gated by the
358
+ * feature flag — start is rejected with 503 on non-AI deployments.
359
+ * @returns PlatformMigrationRunCreate
360
+ * @throws ApiError
361
+ */
362
+ public static eximManagePlatformMigrationsCreate({
363
+ requestBody,
364
+ }: {
365
+ requestBody: PlatformMigrationRunCreate,
366
+ }): CancelablePromise<PlatformMigrationRunCreate> {
367
+ return __request(OpenAPI, {
368
+ method: 'POST',
369
+ url: '/api/exim/manage/platform-migrations/',
370
+ body: requestBody,
371
+ mediaType: 'application/json',
372
+ });
373
+ }
374
+ /**
375
+ * Start and poll tenant-data migration runs (the platform_migration lane).
376
+ *
377
+ * ``POST`` starts a run and returns its ``run_id`` (kicking the Celery task);
378
+ * ``GET`` list/detail surface status + progress + report. Detail lookup is by
379
+ * the public ``run_id`` UUID, not the surrogate PK. Gated by the
380
+ * feature flag — start is rejected with 503 on non-AI deployments.
381
+ * @returns PlatformMigrationRun
382
+ * @throws ApiError
383
+ */
384
+ public static eximManagePlatformMigrationsRetrieve({
385
+ runId,
386
+ }: {
387
+ runId: string,
388
+ }): CancelablePromise<PlatformMigrationRun> {
389
+ return __request(OpenAPI, {
390
+ method: 'GET',
391
+ url: '/api/exim/manage/platform-migrations/{run_id}/',
392
+ path: {
393
+ 'run_id': runId,
394
+ },
395
+ });
396
+ }
397
+ /**
398
+ * Cancel a still-pending run. No-op for any other status.
399
+ *
400
+ * Conditional UPDATE so we don't race the worker: if it has already flipped
401
+ * the row to ``in_progress`` the UPDATE matches zero rows and we return 409.
402
+ * A run already executing is not interrupted mid-phase.
403
+ * @returns PlatformMigrationRun
404
+ * @throws ApiError
405
+ */
406
+ public static eximManagePlatformMigrationsCancelCreate({
407
+ runId,
408
+ requestBody,
409
+ }: {
410
+ runId: string,
411
+ requestBody?: PlatformMigrationRun,
412
+ }): CancelablePromise<PlatformMigrationRun> {
413
+ return __request(OpenAPI, {
414
+ method: 'POST',
415
+ url: '/api/exim/manage/platform-migrations/{run_id}/cancel/',
416
+ path: {
417
+ 'run_id': runId,
418
+ },
419
+ body: requestBody,
420
+ mediaType: 'application/json',
421
+ });
422
+ }
423
+ /**
424
+ * Stream a completed export's bundle as a single ``.zip``.
425
+ *
426
+ * Token-gated (IsDMAdmin) REST mirror of the admin "Download .zip" link, so
427
+ * a programmatic caller can pull the bundle down to move it to another
428
+ * deployment. Only a completed EXPORT with a bundle still on disk is
429
+ * downloadable; imports and not-yet-finished runs have nothing to stream.
430
+ * @returns PlatformMigrationRun
431
+ * @throws ApiError
432
+ */
433
+ public static eximManagePlatformMigrationsDownloadRetrieve({
434
+ runId,
435
+ }: {
436
+ runId: string,
437
+ }): CancelablePromise<PlatformMigrationRun> {
438
+ return __request(OpenAPI, {
439
+ method: 'GET',
440
+ url: '/api/exim/manage/platform-migrations/{run_id}/download/',
441
+ path: {
442
+ 'run_id': runId,
443
+ },
444
+ });
445
+ }
446
+ /**
447
+ * Upload a bundle ``.zip`` and start an import run from it (API parity).
448
+ *
449
+ * The programmatic mirror of the admin "Import from uploaded ZIP" page, so a
450
+ * caller that pulled a bundle off one deployment can push it to another over
451
+ * the API alone. Multipart fields: ``bundle_file`` (the zip, required),
452
+ * ``target_key`` (required), optional ``selected_components`` (repeatable),
453
+ * ``admin_user``, ``email``.
454
+ *
455
+ * On an S3 deployment the validated bundle is stored to S3 and the import
456
+ * runs from there (any node can execute it); otherwise it stays on local
457
+ * disk like the admin flow.
458
+ * @returns PlatformMigrationRun
459
+ * @throws ApiError
460
+ */
461
+ public static eximManagePlatformMigrationsImportUploadCreate({
462
+ formData,
463
+ }: {
464
+ formData?: PlatformMigrationRun,
465
+ }): CancelablePromise<PlatformMigrationRun> {
466
+ return __request(OpenAPI, {
467
+ method: 'POST',
468
+ url: '/api/exim/manage/platform-migrations/import-upload/',
469
+ formData: formData,
470
+ mediaType: 'multipart/form-data',
471
+ });
472
+ }
301
473
  /**
302
474
  * Admin-only read-only access to EximTask records.
303
475
  *