@timeback/core 0.1.2 → 0.1.3
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/client.d.ts +13 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/errors.js +12 -2
- package/dist/index.js +19226 -728
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types.js +7 -0
- package/dist/utils.js +474 -18
- package/package.json +4 -3
package/dist/client.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { CaliperClientInstance } from '@timeback/caliper';
|
|
|
2
2
|
import type { EdubridgeClientInstance } from '@timeback/edubridge';
|
|
3
3
|
import type { AuthCheckResult, TimebackProvider } from '@timeback/internal-client-infra';
|
|
4
4
|
import type { OneRosterClientInstance } from '@timeback/oneroster';
|
|
5
|
+
import type { PowerPathClientInstance } from '@timeback/powerpath';
|
|
5
6
|
import type { QtiClientInstance } from '@timeback/qti';
|
|
6
7
|
import type { TimebackClientConfig } from './types/index';
|
|
7
8
|
/**
|
|
@@ -17,6 +18,7 @@ import type { TimebackClientConfig } from './types/index';
|
|
|
17
18
|
* - **Edubridge**: Simplified enrollments and analytics
|
|
18
19
|
* - **Caliper**: Learning analytics events
|
|
19
20
|
* - **QTI**: Assessment content management
|
|
21
|
+
* - **PowerPath**: Placement tests, lesson plans, and assessments
|
|
20
22
|
*
|
|
21
23
|
* All sub-clients share a single OAuth token, reducing auth requests.
|
|
22
24
|
*
|
|
@@ -69,6 +71,7 @@ export declare class TimebackClient {
|
|
|
69
71
|
private _edubridge?;
|
|
70
72
|
private _caliper?;
|
|
71
73
|
private _qti?;
|
|
74
|
+
private _powerpath?;
|
|
72
75
|
/**
|
|
73
76
|
* Creates a new Timeback client.
|
|
74
77
|
*
|
|
@@ -117,6 +120,16 @@ export declare class TimebackClient {
|
|
|
117
120
|
* @throws {Error} If client has been closed or service not configured
|
|
118
121
|
*/
|
|
119
122
|
get qti(): QtiClientInstance;
|
|
123
|
+
/**
|
|
124
|
+
* PowerPath API client for placement tests and lesson plans.
|
|
125
|
+
*
|
|
126
|
+
* Lazily initialized on first access. Shares OAuth tokens with other
|
|
127
|
+
* sub-clients through the provider.
|
|
128
|
+
*
|
|
129
|
+
* @returns The PowerPath client instance
|
|
130
|
+
* @throws {Error} If client has been closed or service not configured
|
|
131
|
+
*/
|
|
132
|
+
get powerpath(): PowerPathClientInstance;
|
|
120
133
|
/**
|
|
121
134
|
* Verify that OAuth authentication is working.
|
|
122
135
|
*
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAEzD;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,qBAAa,cAAc;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAC3C,OAAO,CAAC,OAAO,CAAQ;IAEvB,OAAO,CAAC,UAAU,CAAC,CAAyB;IAC5C,OAAO,CAAC,UAAU,CAAC,CAAyB;IAC5C,OAAO,CAAC,QAAQ,CAAC,CAAuB;IACxC,OAAO,CAAC,IAAI,CAAC,CAAmB;IAChC,OAAO,CAAC,UAAU,CAAC,CAAyB;IAE5C;;;;;;OAMG;IACH,YAAY,MAAM,CAAC,EAAE,oBAAoB,EAUxC;IAED;;;;;;;;OAQG;IACH,IAAI,SAAS,IAAI,uBAAuB,CASvC;IAED;;;;;;;;OAQG;IACH,IAAI,SAAS,IAAI,uBAAuB,CASvC;IAED;;;;;;;;OAQG;IACH,IAAI,OAAO,IAAI,qBAAqB,CASnC;IAED;;;;;;;;OAQG;IACH,IAAI,GAAG,IAAI,iBAAiB,CAS3B;IAED;;;;;;;;OAQG;IACH,IAAI,SAAS,IAAI,uBAAuB,CASvC;IAMD;;;;;;;;OAQG;IACH,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC,CAGpC;IAED;;;;;;;OAOG;IACH,KAAK,IAAI,IAAI,CAYZ;IAED;;;OAGG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED;;;;OAIG;IACH,WAAW,IAAI,gBAAgB,CAE9B;IAED;;OAEG;IACH,OAAO,CAAC,UAAU;IAMlB;;;OAGG;IACH,OAAO,CAAC,aAAa;CAOrB"}
|
package/dist/errors.js
CHANGED
|
@@ -487,6 +487,9 @@ var BEYONDAI_PATHS = {
|
|
|
487
487
|
},
|
|
488
488
|
edubridge: {
|
|
489
489
|
base: "/edubridge"
|
|
490
|
+
},
|
|
491
|
+
powerpath: {
|
|
492
|
+
base: "/powerpath"
|
|
490
493
|
}
|
|
491
494
|
};
|
|
492
495
|
var LEARNWITHAI_PATHS = {
|
|
@@ -502,7 +505,8 @@ var LEARNWITHAI_PATHS = {
|
|
|
502
505
|
gradebook: "/gradebook/1.0",
|
|
503
506
|
resources: "/resources/1.0"
|
|
504
507
|
},
|
|
505
|
-
edubridge: null
|
|
508
|
+
edubridge: null,
|
|
509
|
+
powerpath: null
|
|
506
510
|
};
|
|
507
511
|
var PLATFORM_PATHS = {
|
|
508
512
|
BEYOND_AI: BEYONDAI_PATHS,
|
|
@@ -524,7 +528,8 @@ function resolvePathProfiles(pathProfile, customPaths) {
|
|
|
524
528
|
return {
|
|
525
529
|
caliper: customPaths?.caliper ?? basePaths.caliper,
|
|
526
530
|
oneroster: customPaths?.oneroster ?? basePaths.oneroster,
|
|
527
|
-
edubridge: customPaths?.edubridge ?? basePaths.edubridge
|
|
531
|
+
edubridge: customPaths?.edubridge ?? basePaths.edubridge,
|
|
532
|
+
powerpath: customPaths?.powerpath ?? basePaths.powerpath
|
|
528
533
|
};
|
|
529
534
|
}
|
|
530
535
|
|
|
@@ -560,6 +565,10 @@ class TimebackProvider {
|
|
|
560
565
|
baseUrl: platformEndpoints.api[env],
|
|
561
566
|
authUrl: this.authUrl
|
|
562
567
|
},
|
|
568
|
+
powerpath: {
|
|
569
|
+
baseUrl: platformEndpoints.api[env],
|
|
570
|
+
authUrl: this.authUrl
|
|
571
|
+
},
|
|
563
572
|
caliper: {
|
|
564
573
|
baseUrl: platformEndpoints.caliper[env],
|
|
565
574
|
authUrl: this.authUrl
|
|
@@ -576,6 +585,7 @@ class TimebackProvider {
|
|
|
576
585
|
this.endpoints = {
|
|
577
586
|
oneroster: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
578
587
|
edubridge: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
588
|
+
powerpath: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
579
589
|
caliper: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
580
590
|
qti: { baseUrl: config.baseUrl, authUrl: this.authUrl }
|
|
581
591
|
};
|