@iblai/data-layer 1.34.0 → 1.35.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.
- package/dist/index.d.ts +211 -53
- package/dist/index.esm.js +352 -105
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +352 -105
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/config.d.ts +8 -0
- package/dist/src/constants.d.ts +17 -1
- package/dist/src/features/course-metadata/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/course-metadata/api-slice.d.ts +162 -108
- package/dist/src/features/retirement/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/search/types.d.ts +2 -0
- package/dist/src/features/studio-authoring/__tests__/course-key.test.d.ts +1 -0
- package/dist/src/features/studio-authoring/api-slice.d.ts +12 -4
- package/dist/src/features/studio-authoring/constants.d.ts +4 -0
- package/dist/src/features/studio-authoring/course-key.d.ts +16 -0
- package/dist/src/features/studio-authoring/types.d.ts +12 -2
- package/dist/src/features/tenant/__tests__/api-slice.test.d.ts +1 -0
- package/dist/src/features/tenant/api-slice.d.ts +66 -21
- package/dist/src/features/tenant/constants.d.ts +1 -1
- package/dist/src/features/user/__tests__/roles-mapping.test.d.ts +1 -0
- package/dist/src/features/user/__tests__/user-metadata.test.d.ts +1 -0
- package/dist/src/features/user/api-slice.d.ts +15 -13
- package/dist/src/features/user/constants.d.ts +11 -1
- package/dist/src/features/user/roles-mapping.d.ts +9 -0
- package/dist/src/features/user/types.d.ts +26 -11
- package/dist/src/features/utils.d.ts +12 -0
- package/dist/src/utils/index.d.ts +4 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/package.json
CHANGED
package/dist/src/config.d.ts
CHANGED
|
@@ -6,6 +6,14 @@ export default class Config {
|
|
|
6
6
|
static mentorIframeUrl: string;
|
|
7
7
|
static studioUrl: string;
|
|
8
8
|
static httpErrorHandlers: {};
|
|
9
|
+
/**
|
|
10
|
+
* Route `SERVICES.LMS` / `SERVICES.STUDIO` through DM's edX proxy
|
|
11
|
+
* (`{dmUrl}/v1/lms`, `{dmUrl}/v1/studio`) with the DM token instead of
|
|
12
|
+
* calling the edX hosts with the edX JWT. Needs DM 4.444.0+ with its proxy
|
|
13
|
+
* rules synced, so it is off by default and turned on per deployment via
|
|
14
|
+
* `initializeDataLayer(..., { edxProxy: true })`.
|
|
15
|
+
*/
|
|
16
|
+
static edxProxyEnabled: boolean;
|
|
9
17
|
/**
|
|
10
18
|
* Optional override for how expired auth tokens are re-minted after a 401.
|
|
11
19
|
* Resolve `true` once fresh tokens are in storage. Left unset, the data
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -25,10 +25,26 @@ export declare const TENANT_IDENTIFIERS: {
|
|
|
25
25
|
};
|
|
26
26
|
export declare enum SERVICES {
|
|
27
27
|
LEGACY_LMS = "LEGACY_LMS",
|
|
28
|
+
/**
|
|
29
|
+
* The Open edX LMS. With `Config.edxProxyEnabled` the call goes through DM's
|
|
30
|
+
* `/v1/lms/{edx_path}` proxy with the DM token (DM mints the edX JWT
|
|
31
|
+
* server-side); otherwise it goes to the LMS host with the edX JWT. The
|
|
32
|
+
* proxy admits stock edX paths only: the `/api/ibl/...` family is refused,
|
|
33
|
+
* and any course or org a path names must belong to the token's platform.
|
|
34
|
+
*/
|
|
28
35
|
LMS = "LMS",
|
|
29
36
|
DM = "DM",
|
|
30
37
|
AXD = "AXD",
|
|
31
|
-
|
|
38
|
+
/** Open edX Studio (CMS); proxied through `/v1/studio/{edx_path}` like `LMS`. */
|
|
39
|
+
STUDIO = "STUDIO",
|
|
40
|
+
/**
|
|
41
|
+
* The LMS host with the edX JWT, whatever `Config.edxProxyEnabled` says. Only
|
|
42
|
+
* for calls the proxy cannot serve: the login/token bootstrap and the
|
|
43
|
+
* `/api/ibl/...` paths DM has no replacement for yet.
|
|
44
|
+
*/
|
|
45
|
+
LMS_DIRECT = "LMS_DIRECT",
|
|
46
|
+
/** The Studio host with its session cookie, CSRF token and edX JWT; see `LMS_DIRECT`. */
|
|
47
|
+
STUDIO_DIRECT = "STUDIO_DIRECT"
|
|
32
48
|
}
|
|
33
49
|
/**
|
|
34
50
|
* Client errors a retry cannot fix.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|