@timeback/caliper 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/README.md +4 -0
- package/dist/constants.d.ts +9 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.js +655 -146
- package/dist/lib/event-factories.d.ts.map +1 -1
- package/dist/types.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,6 +34,8 @@ const result = await caliper.events.sendActivity('https://myapp.example.com/sens
|
|
|
34
34
|
subject: 'Math',
|
|
35
35
|
app: { name: 'My Learning App' },
|
|
36
36
|
},
|
|
37
|
+
attempt: 1,
|
|
38
|
+
generatedExtensions: { pctCompleteApp: 67 },
|
|
37
39
|
metrics: [
|
|
38
40
|
{ type: 'totalQuestions', value: 10 },
|
|
39
41
|
{ type: 'correctQuestions', value: 8 },
|
|
@@ -138,6 +140,8 @@ const activityEvent = createActivityEvent({
|
|
|
138
140
|
actor: { ... },
|
|
139
141
|
object: { ... },
|
|
140
142
|
metrics: [{ type: 'correctQuestions', value: 8 }],
|
|
143
|
+
attempt: 2,
|
|
144
|
+
generatedExtensions: { pctCompleteApp: 67 },
|
|
141
145
|
})
|
|
142
146
|
|
|
143
147
|
const timeSpentEvent = createTimeSpentEvent({
|
package/dist/constants.d.ts
CHANGED
|
@@ -6,12 +6,17 @@
|
|
|
6
6
|
import type { ClientUrlMaps, Platform } from '@timeback/internal-client-infra';
|
|
7
7
|
/**
|
|
8
8
|
* Environment variable names for Caliper configuration.
|
|
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
|
+
* - `CALIPER_*` (service-specific legacy)
|
|
9
14
|
*/
|
|
10
15
|
export declare const CALIPER_ENV_VARS: {
|
|
11
|
-
readonly baseUrl: "CALIPER_BASE_URL";
|
|
12
|
-
readonly authUrl: "CALIPER_TOKEN_URL";
|
|
13
|
-
readonly clientId: "CALIPER_CLIENT_ID";
|
|
14
|
-
readonly clientSecret: "CALIPER_CLIENT_SECRET";
|
|
16
|
+
readonly baseUrl: readonly ["TIMEBACK_API_BASE_URL", "TIMEBACK_BASE_URL", "CALIPER_BASE_URL"];
|
|
17
|
+
readonly authUrl: readonly ["TIMEBACK_API_AUTH_URL", "TIMEBACK_AUTH_URL", "CALIPER_TOKEN_URL"];
|
|
18
|
+
readonly clientId: readonly ["TIMEBACK_API_CLIENT_ID", "TIMEBACK_CLIENT_ID", "CALIPER_CLIENT_ID"];
|
|
19
|
+
readonly clientSecret: readonly ["TIMEBACK_API_CLIENT_SECRET", "TIMEBACK_CLIENT_SECRET", "CALIPER_CLIENT_SECRET"];
|
|
15
20
|
};
|
|
16
21
|
/**
|
|
17
22
|
* Caliper JSON-LD context version.
|
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,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAE9E
|
|
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;AAE9E;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,oBAAoB,+CAA+C,CAAA;AAEhF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,GAAE,QAA2B,GAAG,aAAa,CAM1F"}
|