@iblai/data-layer 1.9.5 → 1.9.7

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,39 @@
1
+ import { SERVICES } from '../utils';
2
+ export declare const STUDIO_AUTHORING_ENDPOINTS: {
3
+ CREATE_COURSE: {
4
+ path: (contentType: string) => string;
5
+ service: SERVICES;
6
+ };
7
+ DELETE_COURSE: {
8
+ path: () => string;
9
+ service: SERVICES;
10
+ };
11
+ COURSE_SETTINGS: {
12
+ path: (contentType: string) => string;
13
+ service: SERVICES;
14
+ };
15
+ CREATE_XBLOCK: {
16
+ path: () => string;
17
+ service: SERVICES;
18
+ };
19
+ UPDATE_XBLOCK: {
20
+ path: (locator: string) => string;
21
+ service: SERVICES;
22
+ };
23
+ SCORM_SUBMIT: {
24
+ path: (locator: string) => string;
25
+ service: SERVICES;
26
+ };
27
+ UPLOAD_ASSET: {
28
+ path: (courseKey: string) => string;
29
+ service: SERVICES;
30
+ };
31
+ ADVANCED_SETTINGS: {
32
+ path: (courseKey: string) => string;
33
+ service: SERVICES;
34
+ };
35
+ VIDEO_UPLOAD: {
36
+ path: (courseKey: string) => string;
37
+ service: SERVICES;
38
+ };
39
+ };
@@ -0,0 +1,65 @@
1
+ /** Payload for creating a course (or library) shell in Studio. */
2
+ export interface StudioCourseCreateRequest {
3
+ org: string;
4
+ display_name: string;
5
+ [key: string]: unknown;
6
+ }
7
+ /** Response from `POST /api/ibl/manage/{contentType}/`. */
8
+ export interface StudioCourseCreateResponse {
9
+ course_key?: string;
10
+ library_key?: string;
11
+ url?: string;
12
+ [key: string]: unknown;
13
+ }
14
+ /** Full course-settings payload for `POST /api/ibl/v1/{contentType}_settings/`. */
15
+ export interface StudioCourseSettingsRequest {
16
+ org: string;
17
+ course_key: string;
18
+ [key: string]: unknown;
19
+ }
20
+ /** Payload for creating an xblock node via `POST /xblock/`. */
21
+ export interface StudioXblockCreateRequest {
22
+ parent_locator: string;
23
+ category: string;
24
+ display_name?: string;
25
+ [key: string]: unknown;
26
+ }
27
+ /** Response for xblock create/update calls. */
28
+ export interface StudioXblockResponse {
29
+ locator?: string;
30
+ id?: string;
31
+ courseKey?: string;
32
+ [key: string]: unknown;
33
+ }
34
+ /** Asset object returned by the Studio assets upload endpoint. */
35
+ export interface StudioCourseAsset {
36
+ display_name?: string;
37
+ url?: string;
38
+ id?: string;
39
+ portable_url?: string;
40
+ content_type?: string;
41
+ [key: string]: unknown;
42
+ }
43
+ /** Response from `POST /assets/{courseKey}/`. */
44
+ export interface StudioAssetUploadResponse {
45
+ asset?: StudioCourseAsset;
46
+ msg?: string;
47
+ [key: string]: unknown;
48
+ }
49
+ /** Response from `POST /api/v1/ibl/course/{courseKey}/s3-upload`. */
50
+ export interface StudioVideoUploadResponse {
51
+ file_url?: string;
52
+ name?: string;
53
+ [key: string]: unknown;
54
+ }
55
+ /**
56
+ * Shape of Studio advanced settings: each key maps to `{ value: ... }`.
57
+ * Used both as request and response of `POST /settings/advanced/{courseKey}`.
58
+ */
59
+ export interface StudioAdvancedSettings {
60
+ advanced_modules?: {
61
+ value?: string[];
62
+ [key: string]: unknown;
63
+ };
64
+ [key: string]: unknown;
65
+ }