tsense 0.0.6 → 0.0.7

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
@@ -40,6 +40,8 @@ const UsersCollection = new TSense({
40
40
  validateOnUpsert: true,
41
41
  });
42
42
 
43
+ type User = typeof UsersCollection.infer;
44
+
43
45
  await UsersCollection.create();
44
46
 
45
47
  await UsersCollection.upsert([
package/dist/tsense.d.ts CHANGED
@@ -6,6 +6,7 @@ export declare class TSense<T extends Type> {
6
6
  private enableNested;
7
7
  private baseURL;
8
8
  private headers;
9
+ infer: T["infer"];
9
10
  constructor(options: TsenseOptions<T>);
10
11
  private inferType;
11
12
  private extractFields;
package/dist/tsense.js CHANGED
@@ -25,6 +25,7 @@ export class TSense {
25
25
  this.options = options;
26
26
  this.fields = [];
27
27
  this.enableNested = false;
28
+ this.infer = undefined;
28
29
  const { connection } = options;
29
30
  this.baseURL = `${connection.protocol}://${connection.host}:${connection.port}`;
30
31
  this.headers = { "X-TYPESENSE-API-KEY": connection.apiKey };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsense",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "private": false,
5
5
  "description": "Opinionated, fully typed typesense client",
6
6
  "keywords": [