@timeback/oneroster 0.1.4 → 0.1.6

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 all OneRoster v1.2 resources including users, classes,
10
10
  * enrollments, courses, grades, and assessments.
11
11
  *
12
- * @example Environment mode (Timeback APIs)
12
+ * @example
13
13
  * ```typescript
14
+ * // Environment mode (Timeback APIs)
14
15
  * const client = new OneRosterClient({
15
16
  * env: 'staging', // or 'production'
16
17
  * auth: {
@@ -20,8 +21,9 @@
20
21
  * })
21
22
  * ```
22
23
  *
23
- * @example Platform selection
24
+ * @example
24
25
  * ```typescript
26
+ * // Platform selection
25
27
  * const client = new OneRosterClient({
26
28
  * platform: 'LEARNWITH_AI', // or 'BEYOND_AI' (default)
27
29
  * env: 'production',
@@ -32,8 +34,9 @@
32
34
  * })
33
35
  * ```
34
36
  *
35
- * @example Provider mode (pre-built provider)
37
+ * @example
36
38
  * ```typescript
39
+ * // Provider mode (pre-built provider)
37
40
  * import { TimebackProvider } from '@timeback/internal-client-infra'
38
41
  *
39
42
  * const provider = new TimebackProvider({
@@ -45,8 +48,9 @@
45
48
  * const client = new OneRosterClient({ provider })
46
49
  * ```
47
50
  *
48
- * @example Explicit mode (custom OneRoster API)
51
+ * @example
49
52
  * ```typescript
53
+ * // Explicit mode (custom OneRoster API)
50
54
  * const client = new OneRosterClient({
51
55
  * baseUrl: 'https://api.example.com',
52
56
  * auth: {
@@ -57,15 +61,17 @@
57
61
  * })
58
62
  * ```
59
63
  *
60
- * @example Environment variables fallback
64
+ * @example
61
65
  * ```typescript
66
+ * // Environment variables fallback
62
67
  * // Set ONEROSTER_BASE_URL, ONEROSTER_TOKEN_URL,
63
68
  * // ONEROSTER_CLIENT_ID, ONEROSTER_CLIENT_SECRET
64
69
  * const client = new OneRosterClient()
65
70
  * ```
66
71
  *
67
- * @example Nested resources
72
+ * @example
68
73
  * ```typescript
74
+ * // Nested resources
69
75
  * const classes = await client.schools.for('school-id').classes()
70
76
  * const students = await client.classes.for('class-id').students()
71
77
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0B,CAAA;AAEtD;;;;;;;;;;;GAWG;AACH,YAAY,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoFG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0B,CAAA;AAEtD;;;;;;;;;;;GAWG;AACH,YAAY,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=client.type-test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.type-test.d.ts","sourceRoot":"","sources":["../src/client.type-test.ts"],"names":[],"mappings":"AAmDA,OAAO,EAAE,CAAA"}
@@ -6,12 +6,17 @@
6
6
  import type { ClientUrlMaps, Platform } from '@timeback/internal-client-infra';
7
7
  /**
8
8
  * Environment variable names for OneRoster configuration fallback.
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
+ * - `ONEROSTER_*` (service-specific legacy)
9
14
  */
10
15
  export declare const ONEROSTER_ENV_VARS: {
11
- readonly baseUrl: "ONEROSTER_BASE_URL";
12
- readonly clientId: "ONEROSTER_CLIENT_ID";
13
- readonly clientSecret: "ONEROSTER_CLIENT_SECRET";
14
- readonly authUrl: "ONEROSTER_TOKEN_URL";
16
+ readonly baseUrl: readonly ["TIMEBACK_API_BASE_URL", "TIMEBACK_BASE_URL", "ONEROSTER_BASE_URL"];
17
+ readonly clientId: readonly ["TIMEBACK_API_CLIENT_ID", "TIMEBACK_CLIENT_ID", "ONEROSTER_CLIENT_ID"];
18
+ readonly clientSecret: readonly ["TIMEBACK_API_CLIENT_SECRET", "TIMEBACK_CLIENT_SECRET", "ONEROSTER_CLIENT_SECRET"];
19
+ readonly authUrl: readonly ["TIMEBACK_API_AUTH_URL", "TIMEBACK_AUTH_URL", "ONEROSTER_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,kBAAkB;;;;;CAKrB,CAAA;AAMV;;;;;GAKG;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,kBAAkB;;;;;CAKrB,CAAA;AAMV;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,QAA2B,GAAG,aAAa,CAM1F"}