@rimori/client 1.1.2 → 1.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 CHANGED
@@ -857,6 +857,27 @@ interface MyPluginData extends SharedContent<any> {
857
857
  }
858
858
  ```
859
859
 
860
+ The SharedContent has this type definition:
861
+
862
+ ````
863
+ export interface SharedContent<T> {
864
+ /** The type/category of the content (e.g. 'grammar_exercises', 'flashcards', etc.) */
865
+ contentType: string;
866
+
867
+ /** The human readable title/topic of the content */
868
+ topic: string;
869
+
870
+ /** Array of keywords/tags associated with the content for search and categorization */
871
+ keywords: string[];
872
+
873
+ /** The actual content data of type T */
874
+ data: T;
875
+
876
+ /** Whether this content should only be visible to the creator. Defaults to false if not specified */
877
+ privateTopic?: boolean;
878
+ }
879
+ ```
880
+
860
881
  ## Examples
861
882
 
862
883
  ### Complete Plugin Example
@@ -60,10 +60,19 @@ export declare class SharedContentController {
60
60
  */
61
61
  updateSharedContent<T>(id: string, updates: Partial<SharedContent<T>>): Promise<BasicAssignment<T>>;
62
62
  }
63
+ /**
64
+ * Interface representing shared content in the system.
65
+ * @template T The type of data stored in the content
66
+ */
63
67
  export interface SharedContent<T> {
68
+ /** The type/category of the content (e.g. 'grammar_exercises', 'flashcards', etc.) */
64
69
  contentType: string;
70
+ /** The human readable title/topic of the content */
65
71
  topic: string;
72
+ /** Array of keywords/tags associated with the content for search and categorization */
66
73
  keywords: string[];
74
+ /** The actual content data of type T */
67
75
  data: T;
76
+ /** Whether this content should only be visible to the creator. Defaults to false if not specified */
68
77
  privateTopic?: boolean;
69
78
  }
package/dist/core.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./utils/difficultyConverter";
4
4
  export * from "./utils/PluginUtils";
5
5
  export * from "./worker/WorkerSetup";
6
6
  export * from "./utils/Language";
7
+ export { SharedContent, BasicAssignment } from "./controller/SharedContentController";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimori/client",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -223,10 +223,23 @@ export class SharedContentController {
223
223
  }
224
224
  }
225
225
 
226
+ /**
227
+ * Interface representing shared content in the system.
228
+ * @template T The type of data stored in the content
229
+ */
226
230
  export interface SharedContent<T> {
231
+ /** The type/category of the content (e.g. 'grammar_exercises', 'flashcards', etc.) */
227
232
  contentType: string;
233
+
234
+ /** The human readable title/topic of the content */
228
235
  topic: string;
236
+
237
+ /** Array of keywords/tags associated with the content for search and categorization */
229
238
  keywords: string[];
239
+
240
+ /** The actual content data of type T */
230
241
  data: T;
242
+
243
+ /** Whether this content should only be visible to the creator. Defaults to false if not specified */
231
244
  privateTopic?: boolean;
232
245
  }
package/src/core.ts CHANGED
@@ -4,4 +4,5 @@ export * from "./plugin/PluginController";
4
4
  export * from "./utils/difficultyConverter";
5
5
  export * from "./utils/PluginUtils";
6
6
  export * from "./worker/WorkerSetup";
7
- export * from "./utils/Language";
7
+ export * from "./utils/Language";
8
+ export { SharedContent, BasicAssignment } from "./controller/SharedContentController";