@timeback/core 0.1.0

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.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Broadcast Results Factory
3
+ *
4
+ * Creates a hybrid object that is both a Record<string, BroadcastResult<T>>
5
+ * and has convenience methods for accessing results.
6
+ */
7
+ import type { BroadcastResult, BroadcastResults } from '../types/index';
8
+ /**
9
+ * Create a BroadcastResults object with convenience methods.
10
+ *
11
+ * Methods are non-enumerable so they don't appear in Object.keys/entries.
12
+ *
13
+ * @template T - The type of values in successful results
14
+ * @param results - Raw results object from broadcast operation
15
+ * @returns Enhanced results object with convenience methods
16
+ *
17
+ * @internal
18
+ */
19
+ export declare function createBroadcastResults<T>(results: Record<string, BroadcastResult<T>>): BroadcastResults<T>;
20
+ //# sourceMappingURL=broadcast-results.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broadcast-results.d.ts","sourceRoot":"","sources":["../../src/lib/broadcast-results.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEvE;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,GACzC,gBAAgB,CAAC,CAAC,CAAC,CAgDrB"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Timeback Manager
3
+ *
4
+ * Orchestration layer for managing multiple TimebackClient instances.
5
+ * Enables operations across multiple clients from a single interface.
6
+ */
7
+ import { TimebackClient } from './client';
8
+ import type { BroadcastResults, TimebackClientConfig } from './types/index';
9
+ /**
10
+ * Manages multiple TimebackClient instances.
11
+ *
12
+ * Use this when you need to:
13
+ * - Manage multiple clients with different configurations
14
+ * - Fan-out requests to multiple clients simultaneously
15
+ * - Aggregate data from multiple sources
16
+ *
17
+ * The manager tracks registered client names at the type level,
18
+ * providing autocomplete for `get()` and `has()`.
19
+ *
20
+ * @typeParam TNames - Union of registered client names (tracked automatically)
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * const manager = new TimebackManager()
25
+ * .register('alpha', { env: 'production', auth: { ... } })
26
+ * .register('beta', { env: 'production', auth: { ... } })
27
+ *
28
+ * // Autocomplete suggests 'alpha' | 'beta'
29
+ * const users = await manager.get('alpha').oneroster.users.list()
30
+ *
31
+ * // Fan-out to all clients
32
+ * const results = await manager.broadcast(client => client.oneroster.users.create(user))
33
+ * // { alpha: { ok: true, value: {...} }, beta: { ok: true, value: {...} } }
34
+ * ```
35
+ */
36
+ export declare class TimebackManager<TNames extends string = never> {
37
+ private readonly clients;
38
+ /**
39
+ * Register a new client with a given name.
40
+ *
41
+ * Returns a new manager type that includes the registered name,
42
+ * enabling autocomplete for `get()`.
43
+ *
44
+ * @param {string} name - Unique identifier for this client
45
+ * @param {TimebackClientConfig} config - Configuration for the TimebackClient
46
+ * @returns {TimebackManager<TNames | N>} - A new manager type that includes the registered name, enabling autocomplete for `get()`
47
+ * @throws {Error} If a client with this name is already registered
48
+ */
49
+ register<N extends string>(name: N, config: TimebackClientConfig): TimebackManager<TNames | N>;
50
+ /**
51
+ * Get a registered client by name.
52
+ *
53
+ * @param name - The name used when registering the client (autocomplete enabled)
54
+ * @returns The TimebackClient instance
55
+ * @throws {Error} If no client with this name is registered
56
+ *
57
+ * @example
58
+ * ```typescript
59
+ * const client = manager.get('alpha') // autocomplete suggests registered names
60
+ * const schools = await client.oneroster.schools.list()
61
+ * ```
62
+ */
63
+ get(name: TNames): TimebackClient;
64
+ /**
65
+ * Check if a client with the given name is registered.
66
+ *
67
+ * Accepts any string since it's a runtime check.
68
+ * Returns true only for registered names.
69
+ *
70
+ * @param name - The name to check
71
+ * @returns True if registered
72
+ */
73
+ has(name: string): name is TNames;
74
+ /**
75
+ * Get all registered client names.
76
+ * @returns Array of registered client names
77
+ */
78
+ get names(): string[];
79
+ /**
80
+ * Get the number of registered clients.
81
+ * @returns Number of registered clients
82
+ */
83
+ get size(): number;
84
+ /**
85
+ * Execute a function on all registered clients.
86
+ *
87
+ * Uses `Promise.allSettled` semantics — always completes, never throws.
88
+ * Each result indicates success or failure per client.
89
+ *
90
+ * All operations run in parallel.
91
+ *
92
+ * @param fn - Function to execute on each client (name is typed)
93
+ * @returns BroadcastResults with typed property access and convenience methods
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * const results = await manager.broadcast(c => c.oneroster.users.create(user))
98
+ *
99
+ * // Typed property access (autocomplete works)
100
+ * results.alpha.ok
101
+ *
102
+ * if (results.allSucceeded) {
103
+ * console.log('Synced to all platforms!')
104
+ * }
105
+ *
106
+ * results.succeeded.forEach(([name, user]) => {
107
+ * console.log(`Created on ${name}:`, user.id)
108
+ * })
109
+ * ```
110
+ */
111
+ broadcast<T>(fn: (client: TimebackClient, name: TNames) => T | Promise<T>): Promise<BroadcastResults<T, TNames>>;
112
+ /**
113
+ * Unregister and close a client.
114
+ *
115
+ * Note: This doesn't update the type — use a new manager if you need
116
+ * type-safe tracking after unregistration.
117
+ *
118
+ * @param name - The name of the client to remove
119
+ * @returns true if the client was removed, false if it didn't exist
120
+ */
121
+ unregister(name: TNames): boolean;
122
+ /**
123
+ * Close all registered clients and clear the registry.
124
+ *
125
+ * Call this during application shutdown to release resources.
126
+ */
127
+ close(): void;
128
+ }
129
+ //# sourceMappingURL=manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../src/manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGzC,OAAO,KAAK,EAAmB,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,eAAe,CAAC,MAAM,SAAS,MAAM,GAAG,KAAK;IACzD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAE5D;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,oBAAoB,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAO7F;IAED;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAShC;IAED;;;;;;;;OAQG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,MAAM,CAEhC;IAED;;;OAGG;IACH,IAAI,KAAK,IAAI,MAAM,EAAE,CAEpB;IAED;;;OAGG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACG,SAAS,CAAC,CAAC,EAChB,EAAE,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAC1D,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CA2BtC;IAED;;;;;;;;OAQG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAUhC;IAED;;;;OAIG;IACH,KAAK,IAAI,IAAI,CAMZ;CACD"}
@@ -0,0 +1,233 @@
1
+ /**
2
+ * Timeback Core Types
3
+ *
4
+ * Configuration types for the unified Timeback client,
5
+ * plus re-exports of entity types from all services.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import type { User, School, Organization } from '@timeback/core/types'
10
+ * ```
11
+ */
12
+ import type { TimebackProvider } from '@timeback/internal-client-infra';
13
+ import type { PLATFORMS } from '@timeback/internal-constants';
14
+ export * as OneRoster from '@timeback/oneroster/types';
15
+ export * as Caliper from '@timeback/caliper/types';
16
+ export * as Edubridge from '@timeback/edubridge/types';
17
+ /**
18
+ * Supported Timeback platform implementations.
19
+ * Derived from PLATFORMS constant in {@link @timeback/internal-constants.PLATFORMS}.
20
+ */
21
+ export type Platform = (typeof PLATFORMS)[number];
22
+ /**
23
+ * Timeback deployment environment.
24
+ */
25
+ export type Environment = 'staging' | 'production';
26
+ /**
27
+ * Resolved service URLs for environment mode.
28
+ * @internal
29
+ */
30
+ export interface EnvServiceUrls {
31
+ oneroster: string;
32
+ caliper: string;
33
+ edubridge: string;
34
+ authUrl: string;
35
+ }
36
+ /**
37
+ * OAuth2 client credentials for environment mode.
38
+ * Token URL is derived from the environment.
39
+ */
40
+ export interface EnvAuthCredentials {
41
+ clientId: string;
42
+ clientSecret: string;
43
+ }
44
+ /**
45
+ * OAuth2 client credentials with explicit token URL.
46
+ * Required when using baseUrl or services mode.
47
+ */
48
+ export interface ExplicitAuthCredentials {
49
+ clientId: string;
50
+ clientSecret: string;
51
+ authUrl: string;
52
+ }
53
+ /**
54
+ * Service endpoint configuration.
55
+ * Can be a simple URL string or an object with baseUrl and optional authUrl override.
56
+ */
57
+ export type ServiceEndpoint = string | {
58
+ baseUrl: string;
59
+ authUrl?: string;
60
+ };
61
+ /**
62
+ * Explicit URLs for each service.
63
+ * All fields optional — only configure services you need.
64
+ */
65
+ export interface ServiceUrls {
66
+ /** OneRoster API endpoint */
67
+ oneroster?: ServiceEndpoint;
68
+ /** Caliper API endpoint */
69
+ caliper?: ServiceEndpoint;
70
+ /** Edubridge API endpoint */
71
+ edubridge?: ServiceEndpoint;
72
+ }
73
+ /**
74
+ * Environment mode: URLs derived from platform and environment.
75
+ *
76
+ * @example
77
+ * ```typescript
78
+ * // BeyondAI platform (default)
79
+ * const client = new TimebackClient({
80
+ * env: 'staging',
81
+ * auth: { clientId: '...', clientSecret: '...' },
82
+ * })
83
+ *
84
+ * // LearnWith.AI platform
85
+ * const client = new TimebackClient({
86
+ * platform: 'LEARNWITH_AI',
87
+ * env: 'production',
88
+ * auth: { clientId: '...', clientSecret: '...' },
89
+ * })
90
+ * ```
91
+ */
92
+ export interface EnvConfig {
93
+ platform?: Platform;
94
+ env: Environment;
95
+ auth?: Partial<EnvAuthCredentials>;
96
+ timeout?: number;
97
+ }
98
+ /**
99
+ * Base URL mode: Single base URL, service paths derived automatically.
100
+ *
101
+ * @example
102
+ * ```typescript
103
+ * const client = new TimebackClient({
104
+ * baseUrl: 'https://timeback.myschool.edu',
105
+ * auth: {
106
+ * clientId: '...',
107
+ * clientSecret: '...',
108
+ * authUrl: 'https://timeback.myschool.edu/oauth/token',
109
+ * },
110
+ * })
111
+ * ```
112
+ */
113
+ export interface BaseUrlConfig {
114
+ baseUrl: string;
115
+ auth: ExplicitAuthCredentials;
116
+ timeout?: number;
117
+ }
118
+ /**
119
+ * Explicit services mode: Full control over each service URL.
120
+ *
121
+ * @example
122
+ * ```typescript
123
+ * const client = new TimebackClient({
124
+ * services: {
125
+ * oneroster: 'https://roster.example.com/v1p2',
126
+ * caliper: 'https://analytics.example.com/caliper',
127
+ * edubridge: 'https://api.example.com/edubridge',
128
+ * },
129
+ * auth: {
130
+ * clientId: '...',
131
+ * clientSecret: '...',
132
+ * authUrl: 'https://auth.example.com/oauth/token',
133
+ * },
134
+ * })
135
+ * ```
136
+ */
137
+ export interface ServicesConfig {
138
+ services: ServiceUrls;
139
+ auth: ExplicitAuthCredentials;
140
+ timeout?: number;
141
+ }
142
+ /**
143
+ * Provider mode: use a pre-built TimebackProvider.
144
+ *
145
+ * @example
146
+ * ```typescript
147
+ * import { TimebackProvider } from '@timeback/internal-client-infra'
148
+ *
149
+ * const provider = new TimebackProvider({
150
+ * platform: 'BEYOND_AI',
151
+ * env: 'staging',
152
+ * auth: { clientId: '...', clientSecret: '...' },
153
+ * })
154
+ *
155
+ * const client = new TimebackClient({ provider })
156
+ * ```
157
+ */
158
+ export interface ProviderConfig {
159
+ provider: TimebackProvider;
160
+ }
161
+ /**
162
+ * Configuration for the unified Timeback client.
163
+ *
164
+ * Supports four modes:
165
+ * - **Provider**: `{ provider: TimebackProvider }` — pre-built provider
166
+ * - **Environment**: `{ env: 'staging' | 'production', auth: {...} }`
167
+ * - **Base URL**: `{ baseUrl: '...', auth: {..., authUrl: '...' } }`
168
+ * - **Explicit services**: `{ services: {...}, auth: {..., authUrl: '...' } }`
169
+ */
170
+ export type TimebackClientConfig = ProviderConfig | EnvConfig | BaseUrlConfig | ServicesConfig;
171
+ /**
172
+ * Result of a broadcast operation for a single client.
173
+ * Similar to PromiseSettledResult but with simpler `ok` boolean.
174
+ */
175
+ export type BroadcastResult<T> = {
176
+ ok: true;
177
+ value: T;
178
+ } | {
179
+ ok: false;
180
+ error: Error;
181
+ };
182
+ /**
183
+ * Convenience methods available on broadcast results.
184
+ *
185
+ * @typeParam T - The value type returned by successful operations
186
+ * @typeParam TNames - Union of client names (for typed tuples)
187
+ */
188
+ export interface BroadcastResultMethods<T, TNames extends string = string> {
189
+ /** Get all successful results as [name, value] tuples */
190
+ readonly succeeded: Array<[TNames, T]>;
191
+ /** Get all failed results as [name, error] tuples */
192
+ readonly failed: Array<[TNames, Error]>;
193
+ /** True if all operations succeeded */
194
+ readonly allSucceeded: boolean;
195
+ /** True if any operation failed */
196
+ readonly anyFailed: boolean;
197
+ /** Get all successful values (throws if any failed) */
198
+ values(): T[];
199
+ }
200
+ /**
201
+ * Broadcast results with both direct property access and convenience methods.
202
+ *
203
+ * Access results directly by name or use helper methods:
204
+ *
205
+ * @typeParam T - The value type returned by successful operations
206
+ * @typeParam TNames - Union of client names (enables autocomplete)
207
+ *
208
+ * @example
209
+ * ```typescript
210
+ * const results = await manager.broadcast(c => c.oneroster.users.create(user))
211
+ *
212
+ * // Direct access (like a plain object):
213
+ * results.alpha.ok
214
+ * results['beta'].error
215
+ *
216
+ * // Convenience methods:
217
+ * if (results.allSucceeded) {
218
+ * console.log('All platforms synced!')
219
+ * }
220
+ *
221
+ * results.succeeded.forEach(([name, user]) => {
222
+ * console.log(`Created on ${name}:`, user.id)
223
+ * })
224
+ *
225
+ * results.failed.forEach(([name, error]) => {
226
+ * console.error(`Failed on ${name}:`, error.message)
227
+ * })
228
+ * ```
229
+ */
230
+ export type BroadcastResults<T, TNames extends string = string> = {
231
+ [K in TNames]: BroadcastResult<T>;
232
+ } & BroadcastResultMethods<T, TNames>;
233
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * All types for the Timeback unified client.
3
+ *
4
+ * @example
5
+ * ```typescript
6
+ * import type { TimebackClientConfig, Environment } from '@timeback/core/types'
7
+ * ```
8
+ */
9
+ export * from './types/index';
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,eAAe,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1,56 @@
1
+ import { createRequire } from "node:module";
2
+ var __create = Object.create;
3
+ var __getProtoOf = Object.getPrototypeOf;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __toESM = (mod, isNodeMode, target) => {
8
+ target = mod != null ? __create(__getProtoOf(mod)) : {};
9
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
+ for (let key of __getOwnPropNames(mod))
11
+ if (!__hasOwnProp.call(to, key))
12
+ __defProp(to, key, {
13
+ get: () => mod[key],
14
+ enumerable: true
15
+ });
16
+ return to;
17
+ };
18
+ var __export = (target, all) => {
19
+ for (var name in all)
20
+ __defProp(target, name, {
21
+ get: all[name],
22
+ enumerable: true,
23
+ configurable: true,
24
+ set: (newValue) => all[name] = () => newValue
25
+ });
26
+ };
27
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
28
+
29
+ // ../oneroster/dist/types.js
30
+ var exports_types = {};
31
+ __export(exports_types, {
32
+ default: () => types_default
33
+ });
34
+ var types_default = undefined;
35
+ // ../caliper/dist/types.js
36
+ var exports_types2 = {};
37
+ __export(exports_types2, {
38
+ CALIPER_DATA_VERSION: () => CALIPER_DATA_VERSION
39
+ });
40
+ var TypeScriptPackages = {
41
+ tsc: "tsc",
42
+ nativePreview: "@typescript/native-preview@7.0.0-dev.20251217.1"
43
+ };
44
+ var TYPESCRIPT_PACKAGE = TypeScriptPackages.nativePreview;
45
+ var CALIPER_DATA_VERSION = "http://purl.imsglobal.org/ctx/caliper/v1p2";
46
+ // ../edubridge/dist/types.js
47
+ var exports_types3 = {};
48
+ __export(exports_types3, {
49
+ default: () => types_default2
50
+ });
51
+ var types_default2 = undefined;
52
+ export {
53
+ exports_types as OneRoster,
54
+ exports_types3 as Edubridge,
55
+ exports_types2 as Caliper
56
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Utility Functions
3
+ *
4
+ * Re-exported utilities from sub-clients for convenience.
5
+ */
6
+ export { aggregateActivityMetrics } from '@timeback/edubridge';
7
+ export type { AggregatedMetrics, DailyActivityMap, EnrollmentFacts, SubjectMetrics, } from '@timeback/edubridge';
8
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAE9D,YAAY,EACX,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,cAAc,GACd,MAAM,qBAAqB,CAAA"}