@timeback/core 0.1.4 → 0.1.6-beta.20260219190739
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 +46 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/errors.js +487 -41
- package/dist/index.js +90930 -35735
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types.js +36 -45
- package/dist/utils.js +1048 -299
- package/package.json +11 -7
package/dist/client.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { CaliperClientInstance } from '@timeback/caliper';
|
|
2
|
+
import type { CaseClientInstance } from '@timeback/case';
|
|
3
|
+
import type { ClrClientInstance } from '@timeback/clr';
|
|
2
4
|
import type { EdubridgeClientInstance } from '@timeback/edubridge';
|
|
3
5
|
import type { AuthCheckResult, TimebackProvider } from '@timeback/internal-client-infra';
|
|
4
6
|
import type { OneRosterClientInstance } from '@timeback/oneroster';
|
|
5
7
|
import type { PowerPathClientInstance } from '@timeback/powerpath';
|
|
6
8
|
import type { QtiClientInstance } from '@timeback/qti';
|
|
9
|
+
import type { WebhooksClientInstance } from '@timeback/webhooks';
|
|
7
10
|
import type { TimebackClientConfig } from './types/index';
|
|
8
11
|
/**
|
|
9
12
|
* Timeback Client
|
|
@@ -19,19 +22,23 @@ import type { TimebackClientConfig } from './types/index';
|
|
|
19
22
|
* - **Caliper**: Learning analytics events
|
|
20
23
|
* - **QTI**: Assessment content management
|
|
21
24
|
* - **PowerPath**: Placement tests, lesson plans, and assessments
|
|
25
|
+
* - **CLR**: Comprehensive Learner Record credentials
|
|
26
|
+
* - **CASE**: Competency and Academic Standards Exchange
|
|
22
27
|
*
|
|
23
28
|
* All sub-clients share a single OAuth token, reducing auth requests.
|
|
24
29
|
*
|
|
25
|
-
* @example
|
|
30
|
+
* @example
|
|
26
31
|
* ```typescript
|
|
32
|
+
* // Environment mode
|
|
27
33
|
* const timeback = new TimebackClient({
|
|
28
34
|
* env: 'staging',
|
|
29
35
|
* auth: { clientId: '...', clientSecret: '...' },
|
|
30
36
|
* })
|
|
31
37
|
* ```
|
|
32
38
|
*
|
|
33
|
-
* @example
|
|
39
|
+
* @example
|
|
34
40
|
* ```typescript
|
|
41
|
+
* // Platform selection
|
|
35
42
|
* const timeback = new TimebackClient({
|
|
36
43
|
* platform: 'LEARNWITH_AI',
|
|
37
44
|
* env: 'production',
|
|
@@ -39,8 +46,9 @@ import type { TimebackClientConfig } from './types/index';
|
|
|
39
46
|
* })
|
|
40
47
|
* ```
|
|
41
48
|
*
|
|
42
|
-
* @example
|
|
49
|
+
* @example
|
|
43
50
|
* ```typescript
|
|
51
|
+
* // Provider mode (pre-built provider)
|
|
44
52
|
* import { TimebackProvider } from '@timeback/internal-client-infra'
|
|
45
53
|
*
|
|
46
54
|
* const provider = new TimebackProvider({
|
|
@@ -52,8 +60,9 @@ import type { TimebackClientConfig } from './types/index';
|
|
|
52
60
|
* const timeback = new TimebackClient({ provider })
|
|
53
61
|
* ```
|
|
54
62
|
*
|
|
55
|
-
* @example
|
|
63
|
+
* @example
|
|
56
64
|
* ```typescript
|
|
65
|
+
* // Base URL mode (self-hosted)
|
|
57
66
|
* const timeback = new TimebackClient({
|
|
58
67
|
* baseUrl: 'https://timeback.myschool.edu',
|
|
59
68
|
* auth: {
|
|
@@ -72,6 +81,9 @@ export declare class TimebackClient {
|
|
|
72
81
|
private _caliper?;
|
|
73
82
|
private _qti?;
|
|
74
83
|
private _powerpath?;
|
|
84
|
+
private _clr?;
|
|
85
|
+
private _case?;
|
|
86
|
+
private _webhooks?;
|
|
75
87
|
/**
|
|
76
88
|
* Creates a new Timeback client.
|
|
77
89
|
*
|
|
@@ -130,6 +142,36 @@ export declare class TimebackClient {
|
|
|
130
142
|
* @throws {Error} If client has been closed or service not configured
|
|
131
143
|
*/
|
|
132
144
|
get powerpath(): PowerPathClientInstance;
|
|
145
|
+
/**
|
|
146
|
+
* CLR API client for Comprehensive Learner Record credentials.
|
|
147
|
+
*
|
|
148
|
+
* Lazily initialized on first access. Shares OAuth tokens with other
|
|
149
|
+
* sub-clients through the provider.
|
|
150
|
+
*
|
|
151
|
+
* @returns The CLR client instance
|
|
152
|
+
* @throws {Error} If client has been closed or service not configured
|
|
153
|
+
*/
|
|
154
|
+
get clr(): ClrClientInstance;
|
|
155
|
+
/**
|
|
156
|
+
* CASE API client for Competency and Academic Standards Exchange.
|
|
157
|
+
*
|
|
158
|
+
* Lazily initialized on first access. Shares OAuth tokens with other
|
|
159
|
+
* sub-clients through the provider.
|
|
160
|
+
*
|
|
161
|
+
* @returns The CASE client instance
|
|
162
|
+
* @throws {Error} If client has been closed or service not configured
|
|
163
|
+
*/
|
|
164
|
+
get case(): CaseClientInstance;
|
|
165
|
+
/**
|
|
166
|
+
* Webhooks API client for managing webhook registrations and filters.
|
|
167
|
+
*
|
|
168
|
+
* Lazily initialized on first access. Shares OAuth tokens with other
|
|
169
|
+
* sub-clients through the provider.
|
|
170
|
+
*
|
|
171
|
+
* @returns The Webhooks client instance
|
|
172
|
+
* @throws {Error} If client has been closed or service not configured
|
|
173
|
+
*/
|
|
174
|
+
get webhooks(): WebhooksClientInstance;
|
|
133
175
|
/**
|
|
134
176
|
* Verify that OAuth authentication is working.
|
|
135
177
|
*
|
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":"AAYA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,KAAK,EAAE,uBAAuB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CASvC;IAED;;;;;;;;OAQG;IACH,IAAI,GAAG,IAAI,iBAAiB,CAS3B;IAED;;;;;;;;OAQG;IACH,IAAI,IAAI,IAAI,kBAAkB,CAS7B;IAED;;;;;;;;OAQG;IACH,IAAI,QAAQ,IAAI,sBAAsB,CASrC;IAMD;;;;;;;;OAQG;IACH,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC,CAGpC;IAED;;;;;;;OAOG;IACH,KAAK,IAAI,IAAI,CAeZ;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/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAMpE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAM/B,CAAA;AAMD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CACnC,GAAG,EAAE,WAAW,EAChB,QAAQ,GAAE,QAA2B,GACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAMpE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAM/B,CAAA;AAMD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CACnC,GAAG,EAAE,WAAW,EAChB,QAAQ,GAAE,QAA2B,GACnC,cAAc,CAUhB"}
|