@rimori/client 1.1.7 → 1.1.9

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.
@@ -50,7 +50,7 @@ export declare class SharedContentController {
50
50
  * @returns The inserted shared content.
51
51
  * @throws {Error} if insertion fails.
52
52
  */
53
- createSharedContent<T>({ contentType, topic, keywords, data, privateTopic }: SharedContent<T>): Promise<BasicAssignment<T>>;
53
+ createSharedContent<T>({ contentType, topic, keywords, data, privateTopic }: Omit<SharedContent<T>, 'id'>): Promise<BasicAssignment<T>>;
54
54
  /**
55
55
  * Update existing shared content in the database.
56
56
  * @param id - The ID of the content to update.
@@ -158,7 +158,7 @@ export declare class RimoriClient {
158
158
  * @param content The content to create.
159
159
  * @returns The new shared content item.
160
160
  */
161
- create: <T = any>(content: SharedContent<T>) => Promise<BasicAssignment<T>>;
161
+ create: <T = any>(content: Omit<SharedContent<T>, "id">) => Promise<BasicAssignment<T>>;
162
162
  /**
163
163
  * Update a shared content item.
164
164
  * @param id The id of the shared content item to update.
@@ -24,7 +24,6 @@ export class StandaloneClient {
24
24
  SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBoZXB0cWRvcXNkbmFkZ29paHZyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzE2OTY2ODcsImV4cCI6MjA0NzI3MjY4N30.4GPFAXTF8685FaXISdAPNCIM-H3RGLo8GbyhQpu1mP0",
25
25
  };
26
26
  });
27
- console.log("config", config);
28
27
  StandaloneClient.instance = new StandaloneClient({ url: config.SUPABASE_URL, key: config.SUPABASE_ANON_KEY });
29
28
  }
30
29
  return StandaloneClient.instance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimori/client",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -177,7 +177,7 @@ export class SharedContentController {
177
177
  * @returns The inserted shared content.
178
178
  * @throws {Error} if insertion fails.
179
179
  */
180
- public async createSharedContent<T>({ contentType, topic, keywords, data, privateTopic }: SharedContent<T>): Promise<BasicAssignment<T>> {
180
+ public async createSharedContent<T>({ contentType, topic, keywords, data, privateTopic }: Omit<SharedContent<T>, 'id'>): Promise<BasicAssignment<T>> {
181
181
  const { data: newContent, error } = await this.supabase.from("shared_content").insert({
182
182
  private: privateTopic,
183
183
  content_type: contentType,
@@ -274,7 +274,7 @@ export class RimoriClient {
274
274
  * @param content The content to create.
275
275
  * @returns The new shared content item.
276
276
  */
277
- create: async <T = any>(content: SharedContent<T>): Promise<BasicAssignment<T>> => {
277
+ create: async <T = any>(content: Omit<SharedContent<T>, 'id'>): Promise<BasicAssignment<T>> => {
278
278
  return await this.sharedContentController.createSharedContent(content);
279
279
  },
280
280
  /**
@@ -25,7 +25,6 @@ export class StandaloneClient {
25
25
  SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InBoZXB0cWRvcXNkbmFkZ29paHZyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzE2OTY2ODcsImV4cCI6MjA0NzI3MjY4N30.4GPFAXTF8685FaXISdAPNCIM-H3RGLo8GbyhQpu1mP0",
26
26
  }
27
27
  });
28
- console.log("config", config);
29
28
  StandaloneClient.instance = new StandaloneClient({ url: config.SUPABASE_URL, key: config.SUPABASE_ANON_KEY });
30
29
  }
31
30
  return StandaloneClient.instance;