@project-sunbird/sunbird-questionset-editor-web-component-react 0.1.13 → 0.1.14

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.
@@ -39,6 +39,9 @@ export interface IContext {
39
39
  /** Telemetry host/endpoint, as in the old contract. */
40
40
  host?: string;
41
41
  endpoint?: string;
42
+ /** Telemetry gateway URL prefix (real telemetry-sdk default: '/action').
43
+ * Distinct from IConfig.apiSlug, which prefixes regular API calls. */
44
+ apislug?: string;
42
45
  timeDiff?: number;
43
46
  defaultLicense?: string;
44
47
  /** Allows reviewer edits in orgreview/sourcingreview (old contract). */
@@ -1,4 +1,12 @@
1
1
  export declare function notifySuccess(message: string): void;
2
- export declare function notifyError(message: string): void;
2
+ /**
3
+ * `error` is the raw error/response that produced `message` (an axios error
4
+ * from `src/api/client.ts`, when there is one) — threaded through to
5
+ * telemetry's ERROR `stacktrace` so silent API failures carry real diagnostic
6
+ * detail (old editor parity: `apiErrorHandling`'s `{response, request}`).
7
+ * Optional: some call sites have no underlying error (e.g. a client-side
8
+ * validation notice).
9
+ */
10
+ export declare function notifyError(message: string, error?: unknown): void;
3
11
  /** Prefer the server's errmsg (surfaced by the api client) over a generic fallback. */
4
12
  export declare function apiErrorMessage(e: unknown, fallback: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -9,6 +9,22 @@ export declare function setTelemetryPageId(id: string): void;
9
9
  export declare function telemetryStart(): void;
10
10
  export declare function telemetryEnd(): void;
11
11
  export declare function telemetryImpression(pageid?: string): void;
12
- export declare function telemetryInteract(id: string, pageid?: string): void;
13
- export declare function telemetryError(err: string, errtype?: string): void;
12
+ /**
13
+ * Old editor parity (telemetry.service.ts's getTelemetryInteractEdata):
14
+ * `subtype`/`extra` carry real signal (e.g. which option was marked
15
+ * correct) — included only when provided, omitted otherwise (matches old's
16
+ * `_.omitBy(..., _.isUndefined)`).
17
+ */
18
+ export declare function telemetryInteract(id: string, options?: {
19
+ pageid?: string;
20
+ subtype?: string;
21
+ extra?: Record<string, unknown>;
22
+ }): void;
23
+ /**
24
+ * Log a player/editor-level error. `detail` carries real diagnostic context
25
+ * (old editor parity: apiErrorHandling's `{response, request}`) — pass the
26
+ * raw error/response info when available; omitted for messages with no
27
+ * underlying error object (e.g. a client-side validation notice).
28
+ */
29
+ export declare function telemetryError(err: string, errtype?: string, detail?: unknown): void;
14
30
  export declare function flushTelemetry(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@project-sunbird/sunbird-questionset-editor-web-component-react",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "React-based QuML QuestionSet Editor — usable as a React component or as a <sb-questionset-editor> web component in any framework.",
5
5
  "keywords": [
6
6
  "sunbird",
@@ -49,7 +49,7 @@
49
49
  "dependencies": {
50
50
  "@dnd-kit/core": "^6.1.0",
51
51
  "@project-sunbird/ckeditor-build-classic": "^4.1.3",
52
- "@project-sunbird/sunbird-quml-player-web-component-react": "0.1.13",
52
+ "@project-sunbird/sunbird-quml-player-web-component-react": "0.1.18",
53
53
  "@tanstack/react-query": "^5.51.0",
54
54
  "axios": "^1.7.2",
55
55
  "dompurify": "^3.4.11",