@timeback/caliper 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.
Files changed (44) hide show
  1. package/README.md +278 -0
  2. package/dist/client.d.ts +85 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/constants.d.ts +27 -0
  5. package/dist/constants.d.ts.map +1 -0
  6. package/dist/errors.d.ts +7 -0
  7. package/dist/errors.d.ts.map +1 -0
  8. package/dist/factory.d.ts +38 -0
  9. package/dist/factory.d.ts.map +1 -0
  10. package/dist/index.d.ts +76 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +1707 -0
  13. package/dist/lib/event-factories.d.ts +67 -0
  14. package/dist/lib/event-factories.d.ts.map +1 -0
  15. package/dist/lib/index.d.ts +11 -0
  16. package/dist/lib/index.d.ts.map +1 -0
  17. package/dist/lib/pagination.d.ts +26 -0
  18. package/dist/lib/pagination.d.ts.map +1 -0
  19. package/dist/lib/resolve.d.ts +21 -0
  20. package/dist/lib/resolve.d.ts.map +1 -0
  21. package/dist/lib/transport.d.ts +32 -0
  22. package/dist/lib/transport.d.ts.map +1 -0
  23. package/dist/resources/events.d.ts +241 -0
  24. package/dist/resources/events.d.ts.map +1 -0
  25. package/dist/resources/index.d.ts +6 -0
  26. package/dist/resources/index.d.ts.map +1 -0
  27. package/dist/resources/jobs.d.ts +49 -0
  28. package/dist/resources/jobs.d.ts.map +1 -0
  29. package/dist/types/api.d.ts +101 -0
  30. package/dist/types/api.d.ts.map +1 -0
  31. package/dist/types/client.d.ts +57 -0
  32. package/dist/types/client.d.ts.map +1 -0
  33. package/dist/types/events.d.ts +203 -0
  34. package/dist/types/events.d.ts.map +1 -0
  35. package/dist/types/index.d.ts +11 -0
  36. package/dist/types/index.d.ts.map +1 -0
  37. package/dist/types/timeback.d.ts +395 -0
  38. package/dist/types/timeback.d.ts.map +1 -0
  39. package/dist/types.d.ts +7 -0
  40. package/dist/types.d.ts.map +1 -0
  41. package/dist/types.js +83 -0
  42. package/dist/utils.d.ts +10 -0
  43. package/dist/utils.d.ts.map +1 -0
  44. package/package.json +36 -0
package/dist/types.js ADDED
@@ -0,0 +1,83 @@
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 __require = /* @__PURE__ */ createRequire(import.meta.url);
19
+ // ../../internal/constants/src/endpoints.ts
20
+ var DEFAULT_PLATFORM = "BEYOND_AI";
21
+ var BEYONDAI_TOKEN_URLS = {
22
+ staging: "https://staging-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/token",
23
+ production: "https://prod-beyond-timeback-api-2-idp.auth.us-east-1.amazoncognito.com/oauth2/token"
24
+ };
25
+ var BEYONDAI_API_URLS = {
26
+ staging: "https://api.staging.alpha-1edtech.ai",
27
+ production: "https://api.alpha-1edtech.ai"
28
+ };
29
+ var BEYONDAI_CALIPER_URLS = {
30
+ staging: "https://caliper.staging.alpha-1edtech.ai",
31
+ production: "https://caliper.alpha-1edtech.ai"
32
+ };
33
+ var BEYONDAI_QTI_URLS = {
34
+ staging: "https://qti.alpha-1edtech.ai/api",
35
+ production: "https://qti.alpha-1edtech.ai/api"
36
+ };
37
+ var LEARNWITHAI_TOKEN_URLS = {
38
+ staging: "https://platform.dev.timeback.com/auth/1.0/token",
39
+ production: "https://platform.timeback.com/auth/1.0/token"
40
+ };
41
+ var LEARNWITHAI_API_URLS = {
42
+ staging: "https://platform.dev.timeback.com",
43
+ production: "https://platform.timeback.com"
44
+ };
45
+ var LEARNWITHAI_CALIPER_URLS = {
46
+ staging: "https://platform.dev.timeback.com",
47
+ production: "https://platform.timeback.com"
48
+ };
49
+ var LEARNWITHAI_QTI_URLS = {
50
+ staging: "https://platform.dev.timeback.com",
51
+ production: "https://platform.timeback.com"
52
+ };
53
+ var PLATFORM_ENDPOINTS = {
54
+ BEYOND_AI: {
55
+ token: BEYONDAI_TOKEN_URLS,
56
+ api: BEYONDAI_API_URLS,
57
+ caliper: BEYONDAI_CALIPER_URLS,
58
+ qti: BEYONDAI_QTI_URLS
59
+ },
60
+ LEARNWITH_AI: {
61
+ token: LEARNWITHAI_TOKEN_URLS,
62
+ api: LEARNWITHAI_API_URLS,
63
+ caliper: LEARNWITHAI_CALIPER_URLS,
64
+ qti: LEARNWITHAI_QTI_URLS
65
+ }
66
+ };
67
+ // ../../internal/constants/src/typescript.ts
68
+ var TypeScriptPackages = {
69
+ tsc: "tsc",
70
+ nativePreview: "@typescript/native-preview@7.0.0-dev.20251217.1"
71
+ };
72
+ var TYPESCRIPT_PACKAGE = TypeScriptPackages.nativePreview;
73
+ // src/constants.ts
74
+ var CALIPER_ENV_VARS = {
75
+ baseUrl: "CALIPER_BASE_URL",
76
+ authUrl: "CALIPER_TOKEN_URL",
77
+ clientId: "CALIPER_CLIENT_ID",
78
+ clientSecret: "CALIPER_CLIENT_SECRET"
79
+ };
80
+ var CALIPER_DATA_VERSION = "http://purl.imsglobal.org/ctx/caliper/v1p2";
81
+ export {
82
+ CALIPER_DATA_VERSION
83
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Caliper Utilities
3
+ *
4
+ * Shared utilities for the Caliper client.
5
+ */
6
+ /**
7
+ * Scoped logger for Caliper client.
8
+ */
9
+ export declare const log: import("@timeback/internal-logger").Logger;
10
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,eAAO,MAAM,GAAG,4CAAgC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@timeback/caliper",
3
+ "version": "0.1.0",
4
+ "description": "Caliper Analytics client SDK for Timeback",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.ts",
9
+ "import": "./dist/index.js"
10
+ },
11
+ "./types": {
12
+ "types": "./dist/types.d.ts",
13
+ "import": "./dist/types.js"
14
+ }
15
+ },
16
+ "main": "dist/index.js",
17
+ "types": "dist/index.d.ts",
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "scripts": {
22
+ "build": "bun build.ts",
23
+ "test": "bun test --no-env-file unit.test.ts"
24
+ },
25
+ "devDependencies": {
26
+ "@timeback/internal-client-infra": "0.0.0",
27
+ "@timeback/internal-constants": "0.0.0",
28
+ "@timeback/internal-logger": "0.0.0",
29
+ "@timeback/internal-test": "0.0.0",
30
+ "@timeback/internal-utils": "0.0.0",
31
+ "@types/bun": "latest"
32
+ },
33
+ "peerDependencies": {
34
+ "typescript": "^5"
35
+ }
36
+ }