@timeback/qti 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 CHANGED
@@ -9,8 +9,9 @@
9
9
  * Provides access to QTI endpoints including assessment items, tests,
10
10
  * stimuli, validation, and lesson feedback.
11
11
  *
12
- * @example Environment mode (Timeback APIs)
12
+ * @example
13
13
  * ```typescript
14
+ * // Environment mode (Timeback APIs)
14
15
  * const client = new QtiClient({
15
16
  * env: 'staging', // or 'production'
16
17
  * auth: {
@@ -20,8 +21,9 @@
20
21
  * })
21
22
  * ```
22
23
  *
23
- * @example Provider mode (shared tokens)
24
+ * @example
24
25
  * ```typescript
26
+ * // Provider mode (shared tokens)
25
27
  * import { TimebackProvider } from '@timeback/internal-client-infra'
26
28
  *
27
29
  * const provider = new TimebackProvider({
@@ -33,8 +35,9 @@
33
35
  * const client = new QtiClient({ provider })
34
36
  * ```
35
37
  *
36
- * @example Explicit mode (custom API)
38
+ * @example
37
39
  * ```typescript
40
+ * // Explicit mode (custom API)
38
41
  * const client = new QtiClient({
39
42
  * baseUrl: 'https://qti.example.com/api',
40
43
  * auth: {
@@ -45,8 +48,9 @@
45
48
  * })
46
49
  * ```
47
50
  *
48
- * @example Environment variables fallback
51
+ * @example
49
52
  * ```typescript
53
+ * // Environment variables fallback
50
54
  * // Set QTI_BASE_URL, QTI_TOKEN_URL,
51
55
  * // QTI_CLIENT_ID, QTI_CLIENT_SECRET
52
56
  * const client = new QtiClient()
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAAoB,CAAA;AAE1C,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAAoB,CAAA;AAE1C,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA"}
@@ -6,12 +6,17 @@
6
6
  import type { ClientUrlMaps, Platform } from '@timeback/internal-client-infra';
7
7
  /**
8
8
  * Environment variable names for fallback config.
9
+ *
10
+ * Supports fallback chains - tries each env var in order until one is defined:
11
+ * - `TIMEBACK_API_*` (canonical/preferred)
12
+ * - `TIMEBACK_*` (unified Timeback shorthand)
13
+ * - `QTI_*` (service-specific legacy)
9
14
  */
10
15
  export declare const QTI_ENV_VARS: {
11
- readonly baseUrl: "QTI_BASE_URL";
12
- readonly clientId: "QTI_CLIENT_ID";
13
- readonly clientSecret: "QTI_CLIENT_SECRET";
14
- readonly authUrl: "QTI_TOKEN_URL";
16
+ readonly baseUrl: readonly ["TIMEBACK_API_BASE_URL", "TIMEBACK_BASE_URL", "QTI_BASE_URL"];
17
+ readonly clientId: readonly ["TIMEBACK_API_CLIENT_ID", "TIMEBACK_CLIENT_ID", "QTI_CLIENT_ID"];
18
+ readonly clientSecret: readonly ["TIMEBACK_API_CLIENT_SECRET", "TIMEBACK_CLIENT_SECRET", "QTI_CLIENT_SECRET"];
19
+ readonly authUrl: readonly ["TIMEBACK_API_AUTH_URL", "TIMEBACK_AUTH_URL", "QTI_TOKEN_URL"];
15
20
  };
16
21
  /**
17
22
  * Get URL maps for a specific platform.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAM9E;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;CAKf,CAAA;AAMV;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,QAA2B,GAAG,aAAa,CAM1F"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAM9E;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;;;;;CAKf,CAAA;AAMV;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,QAA2B,GAAG,aAAa,CAM1F"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * QTI Error Classes
3
+ *
4
+ * Re-exports common errors from `@timeback/internal-client-infra`.
5
+ * QTI uses the IMS Global error format (same as OneRoster).
6
+ */
7
+ import { ApiError, ForbiddenError, InputValidationError, NotFoundError, UnauthorizedError, ValidationError } from '@timeback/internal-client-infra';
8
+ export { ApiError as QtiError, ForbiddenError, InputValidationError, NotFoundError, UnauthorizedError, ValidationError, };
9
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACN,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,MAAM,iCAAiC,CAAA;AAExC,OAAO,EACN,QAAQ,IAAI,QAAQ,EACpB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,eAAe,GACf,CAAA"}