@vectorstores/supabase 0.1.3 → 0.1.5

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/dist/index.cjs CHANGED
@@ -118,6 +118,13 @@ class SupabaseVectorStore extends core.BaseVectorStore {
118
118
  }
119
119
  return {};
120
120
  }
121
+ async exists(refDocId) {
122
+ const { count } = await this.supabaseClient.from(this.table).select("*", {
123
+ count: "exact",
124
+ head: true
125
+ }).eq("metadata->>ref_doc_id", refDocId);
126
+ return (count ?? 0) > 0;
127
+ }
121
128
  }
122
129
 
123
130
  exports.SupabaseVectorStore = SupabaseVectorStore;
package/dist/index.d.cts CHANGED
@@ -53,6 +53,7 @@ declare class SupabaseVectorStore extends BaseVectorStore {
53
53
  * @private
54
54
  */
55
55
  private toSupabaseFilter;
56
+ exists(refDocId: string): Promise<boolean>;
56
57
  }
57
58
 
58
59
  export { SupabaseVectorStore };
package/dist/index.d.ts CHANGED
@@ -53,6 +53,7 @@ declare class SupabaseVectorStore extends BaseVectorStore {
53
53
  * @private
54
54
  */
55
55
  private toSupabaseFilter;
56
+ exists(refDocId: string): Promise<boolean>;
56
57
  }
57
58
 
58
59
  export { SupabaseVectorStore };
@@ -53,6 +53,7 @@ declare class SupabaseVectorStore extends BaseVectorStore {
53
53
  * @private
54
54
  */
55
55
  private toSupabaseFilter;
56
+ exists(refDocId: string): Promise<boolean>;
56
57
  }
57
58
 
58
59
  export { SupabaseVectorStore };
@@ -116,6 +116,13 @@ class SupabaseVectorStore extends BaseVectorStore {
116
116
  }
117
117
  return {};
118
118
  }
119
+ async exists(refDocId) {
120
+ const { count } = await this.supabaseClient.from(this.table).select("*", {
121
+ count: "exact",
122
+ head: true
123
+ }).eq("metadata->>ref_doc_id", refDocId);
124
+ return (count ?? 0) > 0;
125
+ }
119
126
  }
120
127
 
121
128
  export { SupabaseVectorStore };
package/dist/index.js CHANGED
@@ -116,6 +116,13 @@ class SupabaseVectorStore extends BaseVectorStore {
116
116
  }
117
117
  return {};
118
118
  }
119
+ async exists(refDocId) {
120
+ const { count } = await this.supabaseClient.from(this.table).select("*", {
121
+ count: "exact",
122
+ head: true
123
+ }).eq("metadata->>ref_doc_id", refDocId);
124
+ return (count ?? 0) > 0;
125
+ }
119
126
  }
120
127
 
121
128
  export { SupabaseVectorStore };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vectorstores/supabase",
3
3
  "description": "Supabase Storage for vectorstores",
4
- "version": "0.1.3",
4
+ "version": "0.1.5",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "vitest": "2.1.0",
38
- "@vectorstores/core": "0.1.3",
38
+ "@vectorstores/core": "0.1.5",
39
39
  "@vectorstores/env": "0.1.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@vectorstores/core": "0.1.3",
42
+ "@vectorstores/core": "0.1.5",
43
43
  "@vectorstores/env": "0.1.0"
44
44
  },
45
45
  "dependencies": {