@timeback/core 0.1.1 → 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 +17 -4
- package/dist/index.js +82386 -6021
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types.js +12 -2
- package/dist/utils.js +14946 -83
- package/package.json +6 -5
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
|
@@ -77,9 +77,12 @@ var PLATFORM_ENDPOINTS = {
|
|
|
77
77
|
// ../../internal/constants/src/typescript.ts
|
|
78
78
|
var TypeScriptPackages = {
|
|
79
79
|
tsc: "tsc",
|
|
80
|
-
nativePreview: "@typescript/native-preview
|
|
80
|
+
nativePreview: "@typescript/native-preview"
|
|
81
|
+
};
|
|
82
|
+
var TYPESCRIPT_RUNNER = {
|
|
83
|
+
package: TypeScriptPackages.nativePreview,
|
|
84
|
+
bin: "tsgo"
|
|
81
85
|
};
|
|
82
|
-
var TYPESCRIPT_PACKAGE = TypeScriptPackages.nativePreview;
|
|
83
86
|
// ../../internal/logger/src/debug.ts
|
|
84
87
|
var patterns = null;
|
|
85
88
|
var debugAll = false;
|
|
@@ -484,6 +487,9 @@ var BEYONDAI_PATHS = {
|
|
|
484
487
|
},
|
|
485
488
|
edubridge: {
|
|
486
489
|
base: "/edubridge"
|
|
490
|
+
},
|
|
491
|
+
powerpath: {
|
|
492
|
+
base: "/powerpath"
|
|
487
493
|
}
|
|
488
494
|
};
|
|
489
495
|
var LEARNWITHAI_PATHS = {
|
|
@@ -499,7 +505,8 @@ var LEARNWITHAI_PATHS = {
|
|
|
499
505
|
gradebook: "/gradebook/1.0",
|
|
500
506
|
resources: "/resources/1.0"
|
|
501
507
|
},
|
|
502
|
-
edubridge: null
|
|
508
|
+
edubridge: null,
|
|
509
|
+
powerpath: null
|
|
503
510
|
};
|
|
504
511
|
var PLATFORM_PATHS = {
|
|
505
512
|
BEYOND_AI: BEYONDAI_PATHS,
|
|
@@ -521,7 +528,8 @@ function resolvePathProfiles(pathProfile, customPaths) {
|
|
|
521
528
|
return {
|
|
522
529
|
caliper: customPaths?.caliper ?? basePaths.caliper,
|
|
523
530
|
oneroster: customPaths?.oneroster ?? basePaths.oneroster,
|
|
524
|
-
edubridge: customPaths?.edubridge ?? basePaths.edubridge
|
|
531
|
+
edubridge: customPaths?.edubridge ?? basePaths.edubridge,
|
|
532
|
+
powerpath: customPaths?.powerpath ?? basePaths.powerpath
|
|
525
533
|
};
|
|
526
534
|
}
|
|
527
535
|
|
|
@@ -557,6 +565,10 @@ class TimebackProvider {
|
|
|
557
565
|
baseUrl: platformEndpoints.api[env],
|
|
558
566
|
authUrl: this.authUrl
|
|
559
567
|
},
|
|
568
|
+
powerpath: {
|
|
569
|
+
baseUrl: platformEndpoints.api[env],
|
|
570
|
+
authUrl: this.authUrl
|
|
571
|
+
},
|
|
560
572
|
caliper: {
|
|
561
573
|
baseUrl: platformEndpoints.caliper[env],
|
|
562
574
|
authUrl: this.authUrl
|
|
@@ -573,6 +585,7 @@ class TimebackProvider {
|
|
|
573
585
|
this.endpoints = {
|
|
574
586
|
oneroster: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
575
587
|
edubridge: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
588
|
+
powerpath: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
576
589
|
caliper: { baseUrl: config.baseUrl, authUrl: this.authUrl },
|
|
577
590
|
qti: { baseUrl: config.baseUrl, authUrl: this.authUrl }
|
|
578
591
|
};
|