@distilled.cloud/typesense 1.0.0-rc.13 → 1.0.0-rc.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.
package/README.md CHANGED
@@ -16,7 +16,7 @@ import * as FetchHttpClient from "effect/http/FetchHttpClient";
16
16
  import * as Typesense from "@distilled.cloud/typesense";
17
17
 
18
18
  const program = Effect.gen(function* () {
19
- const result = yield* Typesense.listDocument({});
19
+ const result = yield* Typesense.getCollections({});
20
20
  return result;
21
21
  });
22
22
 
@@ -16,9 +16,9 @@ declare const Credentials_base: Context.ServiceClass<Credentials, "TypesenseCred
16
16
  export declare class Credentials extends Credentials_base {
17
17
  }
18
18
  export declare const CredentialsFromEnv: Layer.Layer<Credentials, never, never>;
19
- /** Convenience layer from a plain key + base URL (kept for local tests). */
19
+ /** Convenience layer from a redacted key + base URL (kept for local tests). */
20
20
  export declare const credentials: (config: {
21
- readonly apiKey: string;
21
+ readonly apiKey: Redacted.Redacted<string>;
22
22
  readonly apiBaseUrl: string;
23
23
  }) => Layer.Layer<Credentials>;
24
24
  /** Auth headers for a resolved credentials config. */
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WAAY,SAAQ,gBAGN;CAAG;AAO9B,eAAO,MAAM,kB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e(Effe
30
30
  apiKey: Redacted.make(apiKey),
31
31
  apiBaseUrl,
32
32
  })), Effect.orDie));
33
- /** Convenience layer from a plain key + base URL (kept for local tests). */
33
+ /** Convenience layer from a redacted key + base URL (kept for local tests). */
34
34
  export const credentials = (config) => Layer.succeed(Credentials, Effect.succeed({
35
- apiKey: Redacted.make(config.apiKey),
35
+ apiKey: config.apiKey,
36
36
  apiBaseUrl: config.apiBaseUrl,
37
37
  }));
38
38
  /** Auth headers for a resolved credentials config. */
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAOvC,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAG7C,CAAC,sBAAsB,CAAC;CAAG;AAE9B,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC;IACjC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,mBAAmB,CAAC;IAChD,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,mBAAmB,CAAC;CACrD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,OAAO,CAC7C,WAAW,EACX,SAAS,CAAC,IAAI,CACZ,MAAM,CAAC,QAAQ,CACb,GAAG,EAAE,CACH,IAAI,WAAW,CAAC;IACd,OAAO,EACL,4EAA4E;CAC/E,CAAC,CACL,EACD,MAAM,CAAC,GAAG,C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AA8B,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEvF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;AAIxC,qBAAa,qBAAsB,SAAQ,0BAOX;CAAG;;;;;;;;;AAGnC,qBAAa,mBAAoB,SAAQ,wBAMV;CAAG;AAElC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;;;AAGxC,qBAAa,qBAAsB,SAAQ,0BAOX;CAAG;;;;;;;;;AAGnC,qBAAa,mBAAoB,SAAQ,wBAMV;CAAG;AAElC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,YAAY,CAAC"}
package/lib/errors.js CHANGED
@@ -6,8 +6,8 @@
6
6
  * distilled repo's typesense error surface.
7
7
  */
8
8
  export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, Locked, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
9
- import * as Schema from "effect/Schema";
10
9
  import * as Category from "@distilled.cloud/core/category";
10
+ import * as Schema from "effect/Schema";
11
11
  // Unknown Typesense error - returned when an error code is not recognized
12
12
  export class UnknownTypesenseError extends Schema.TaggedError()("UnknownTypesenseError", {
13
13
  code: Schema.optional(Schema.String),
package/lib/errors.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAE3D,0EAA0E;AAC1E,MAAM,OAAO,qBAAsB,SAAQ,MAAM,CAAC,WAAW,EAAyB,CACpF,uBAAuB,EACvB;IACE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC,OAAO;CACrB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;CAAG;AAEnC,6BAA6B;AAC7B,MAAM,OAAO,mBAAoB,SAAQ,MAAM,CAAC,WAAW,EAAuB,CAChF,qBAAqB,EACrB;IACE,IAAI,EAAE,MAAM,CAAC,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC,OAAO;CACtB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAE3D,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,0EAA0E;AAC1E,MAAM,OAAO,qBAAsB,SAAQ,MAAM,CAAC,WAAW,EAAyB,CACpF,uBAAuB,EACvB;IACE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC,OAAO;CACrB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;CAAG;AAEnC,6BAA6B;AAC7B,MAAM,OAAO,mBAAoB,SAAQ,MAAM,CAAC,WAAW,EAAuB,CAChF,qBAAqB,EACrB;IACE,IAAI,EAAE,MAAM,CAAC,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC,OAAO;CACtB,CACF,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG"}
package/lib/index.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  export * from "./credentials.ts";
9
9
  export * from "./errors.ts";
10
10
  export * as T from "./traits.ts";
11
- export { TypesenseProtocol, type TypesenseOpError, type TypesenseOpContext, } from "./protocol.ts";
11
+ export { TypesenseProtocol, type TypesenseOpError, type TypesenseOpContext } from "./protocol.ts";
12
12
  export * as Retry from "./retry.ts";
13
13
  export * as Services from "./services/index.ts";
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
package/lib/index.js CHANGED
@@ -8,7 +8,7 @@
8
8
  export * from "./credentials.js";
9
9
  export * from "./errors.js";
10
10
  export * as T from "./traits.js";
11
- export { TypesenseProtocol, } from "./protocol.js";
11
+ export { TypesenseProtocol } from "./protocol.js";
12
12
  export * as Retry from "./retry.js";
13
13
  export * as Services from "./services/index.js";
14
14
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,iBAAiB,GAGlB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAkD,MAAM,eAAe,CAAC;AAClG,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
package/lib/protocol.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import type * as Layer from "effect/Layer";
2
- import type * as HttpClient from "effect/http/HttpClient";
3
- import type * as HttpClientError from "effect/http/HttpClientError";
4
1
  import type * as API from "@distilled.cloud/core/api";
5
2
  import type { ConfigError } from "@distilled.cloud/core/errors";
3
+ import type * as HttpClient from "effect/http/HttpClient";
4
+ import type * as HttpClientError from "effect/http/HttpClientError";
5
+ import type * as Layer from "effect/Layer";
6
6
  import { Credentials } from "./credentials.ts";
7
7
  import { type DefaultErrors } from "./errors.ts";
8
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAe,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EACL,KAAK,aAAa,EAGnB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,WAAW,GACX,eAAe,CAAC,eAAe,CAAC;AAEpC,4EAA4E;AAC5E,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAErE,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAepD,CAAC"}
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAgBhE,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAe,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,KAAK,aAAa,EAA8C,MAAM,aAAa,CAAC;AAE7F;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC,eAAe,CAAC;AAE7F,4EAA4E;AAC5E,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAErE,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAatD,CAAC"}
package/lib/protocol.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
1
2
  /**
2
3
  * TypesenseProtocol — the shared bearer/header-auth REST factory from core,
3
4
  * instantiated with Typesense's specifics:
@@ -12,9 +13,8 @@
12
13
  * the shared HTTP status map, then UnknownTypesenseError.
13
14
  */
14
15
  import * as Effect from "effect/Effect";
15
- import { makeRestProtocol } from "@distilled.cloud/core/protocol-rest";
16
16
  import { Credentials, formatHeaders } from "./credentials.js";
17
- import { UnknownTypesenseError, TypesenseParseError, } from "./errors.js";
17
+ import { UnknownTypesenseError, TypesenseParseError } from "./errors.js";
18
18
  export const TypesenseProtocol = makeRestProtocol({
19
19
  // Resolved on the calling fiber, per request — the Credentials service
20
20
  // holds an effect, so lazily-resolved keys Just Work.
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,EAAe,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAEL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAgBrB,MAAM,CAAC,MAAM,iBAAiB,GAC5B,gBAAgB,CAAS;IACvB,uEAAuE;IACvE,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,WAAW,CAAC;QACnC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC;IACxB,CAAC,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU;IACpC,OAAO,EAAE,aAAa;IACtB,uEAAuE;IACvE,qCAAqC;IACrC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAClC,IAAI,qBAAqB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC9C,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,mBAAmB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;CAC1E,CAAC,CAAC"}
1
+ {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAe,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAsB,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAa7F,MAAM,CAAC,MAAM,iBAAiB,GAA8B,gBAAgB,CAAS;IACnF,uEAAuE;IACvE,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,WAAW,CAAC;QACnC,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC;IACxB,CAAC,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU;IACpC,OAAO,EAAE,aAAa;IACtB,uEAAuE;IACvE,qCAAqC;IACrC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,qBAAqB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACjF,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,mBAAmB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;CAC1E,CAAC,CAAC"}
package/lib/retry.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type Policy } from "@distilled.cloud/core/retry";
1
2
  /**
2
3
  * Typesense retry configuration.
3
4
  *
@@ -16,7 +17,6 @@
16
17
  */
17
18
  import * as Context from "effect/Context";
18
19
  import * as Effect from "effect/Effect";
19
- import { type Policy } from "@distilled.cloud/core/retry";
20
20
  export { type Options, type Factory, type Policy, makeDefault, jittered, capped, throttlingOptions, transientOptions, throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
21
21
  declare const Retry_base: Context.ServiceClass<Retry, "TypesenseRetry", Policy>;
22
22
  /** Context tag for configuring retry behavior of Typesense API calls. */
@@ -1 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;;AAErC,yEAAyE;AACzE,qBAAa,KAAM,SAAQ,UAAkD;CAAG;AAEhF,2EAA2E;AAC3E,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,sCAAsC;AACtC,eAAO,MAAM,IAAI,mFAEhB,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,UAAU,mFAA4B,CAAC;AAEpD,oFAAoF;AACpF,eAAO,MAAM,SAAS,mFAA2B,CAAC"}
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAuC,MAAM,6BAA6B,CAAC;AAC/F;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;;AAErC,yEAAyE;AACzE,qBAAa,KAAM,SAAQ,UAAkD;CAAG;AAEhF,2EAA2E;AAC3E,eAAO,MAAM,MAAM,qBAAsB,MAAM,sFACS,CAAC;AAEzD,sCAAsC;AACtC,eAAO,MAAM,IAAI,mFAA+D,CAAC;AAEjF,kFAAkF;AAClF,eAAO,MAAM,UAAU,mFAA4B,CAAC;AAEpD,oFAAoF;AACpF,eAAO,MAAM,SAAS,mFAA2B,CAAC"}
package/lib/retry.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { throttlingFactory, transientFactory } from "@distilled.cloud/core/retry";
1
2
  /**
2
3
  * Typesense retry configuration.
3
4
  *
@@ -17,7 +18,6 @@
17
18
  import * as Context from "effect/Context";
18
19
  import * as Effect from "effect/Effect";
19
20
  import * as Layer from "effect/Layer";
20
- import { throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
21
21
  export { makeDefault, jittered, capped, throttlingOptions, transientOptions, throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
22
22
  /** Context tag for configuring retry behavior of Typesense API calls. */
23
23
  export class Retry extends Context.Service()("TypesenseRetry") {
package/lib/retry.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"retry.js","sourceRoot":"","sources":["../src/retry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAEL,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,yEAAyE;A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AAK,CAAC,OAAO,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzD,sCAAsC;AACtC,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AAEjF,kFAAkF;AAClF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEpD,oFAAoF;AACpF,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import * as S from "@distilled.cloud/core/schema";
2
1
  import * as API from "@distilled.cloud/core/api";
2
+ import * as S from "@distilled.cloud/core/schema";
3
3
  import { type TypesenseOpError, type TypesenseOpContext } from "../protocol.ts";
4
4
  export type { TypesenseOpError, TypesenseOpContext };
5
5
  declare const BadRequest_base: S.Class<BadRequest, S.TaggedStruct<"BadRequest", {
@@ -784,6 +784,8 @@ export interface SearchParameters {
784
784
  max_extra_suffix?: number;
785
785
  /** Filter conditions for refining your open api validator search results. Separate multiple conditions with &&. */
786
786
  filter_by?: string;
787
+ /** Applies the filtering operation incrementally / lazily. Set this to true when you are potentially filtering on large values but the tokens in the query are expected to match very few documents. Default: false */
788
+ enable_lazy_filter?: boolean;
787
789
  /** Controls the number of similar words that Typesense considers during fuzzy search on filter_by values. Useful for controlling prefix matches like company_name:Acm*. */
788
790
  max_filter_by_candidates?: number;
789
791
  /** A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc` */
@@ -794,6 +796,8 @@ export interface SearchParameters {
794
796
  max_facet_values?: number;
795
797
  /** Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe". */
796
798
  facet_query?: string;
799
+ /** Controls the fuzziness of the facet query filter. Default: 2. */
800
+ facet_query_num_typos?: number;
797
801
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
798
802
  num_typos?: string;
799
803
  /** Results from this specific page number would be fetched. */
@@ -810,6 +814,8 @@ export interface SearchParameters {
810
814
  group_limit?: number;
811
815
  /** Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. Default: true */
812
816
  group_missing_values?: boolean;
817
+ /** Overrides the behavior of group_by queries where found value is an approximation. When group_max_candidates is passed, found will be accurate up until its value. */
818
+ group_max_candidates?: number;
813
819
  /** List of fields from the document to include in the search result */
814
820
  include_fields?: string;
815
821
  /** List of fields from the document to exclude in the search result */
@@ -843,6 +849,8 @@ export interface SearchParameters {
843
849
  enable_synonyms?: boolean;
844
850
  /** Allow synonym resolution on word prefixes in the query. Default: false */
845
851
  synonym_prefix?: boolean;
852
+ /** When set to true, search results that matched via synonyms will be demoted in ranking, appearing below results that have a direct match. Default: false */
853
+ demote_synonym_match?: boolean;
846
854
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
847
855
  synonym_num_typos?: number;
848
856
  /** A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. */
@@ -853,6 +861,8 @@ export interface SearchParameters {
853
861
  curation_tags?: string;
854
862
  /** A list of custom fields that must be highlighted even if you don't query for them */
855
863
  highlight_fields?: string;
864
+ /** When true, computes both text match and vector distance scores for all matches in hybrid search. Documents found only through keyword search will get a vector distance score, and documents found only through vector search will get a text match score. */
865
+ rerank_hybrid_matches?: boolean;
856
866
  /** Treat space as typo: search for q=basket ball if q=basketball is not found or vice-versa. Splitting/joining of tokens will only be attempted if the original query produces no results. To always trigger this behavior, set value to `always``. To disable, set value to `off`. Default is `fallback`. */
857
867
  split_join_tokens?: string;
858
868
  /** You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. Set this parameter to true to do the same */
@@ -875,6 +885,8 @@ export interface SearchParameters {
875
885
  exhaustive_search?: boolean;
876
886
  /** Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter. */
877
887
  search_cutoff_ms?: number;
888
+ /** Maximum number of hits that can be fetched from the collection. page * per_page should be less than this number for the search request to return results. */
889
+ limit_hits?: number;
878
890
  /** Enable server side caching of search query results. By default, caching is disabled. */
879
891
  use_cache?: boolean;
880
892
  /** The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60. */
@@ -895,6 +907,12 @@ export interface SearchParameters {
895
907
  stopwords?: string;
896
908
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
897
909
  facet_return_parent?: string;
910
+ /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
911
+ facet_sample_percent?: number;
912
+ /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
913
+ facet_sample_threshold?: number;
914
+ /** Controls how steeply facet_sample_percent falls as the collection grows. facet_sample_threshold should be non-zero for facet_sample_slope to be effective. Default: 0. */
915
+ facet_sample_slope?: number;
898
916
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
899
917
  voice_query?: string;
900
918
  /** Enable conversational search. */
@@ -924,6 +942,10 @@ export interface MultiSearchCollectionParameters {
924
942
  max_extra_suffix?: number;
925
943
  /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
926
944
  filter_by?: string;
945
+ /** Applies the filtering operation incrementally / lazily. Set this to true when you are potentially filtering on large values but the tokens in the query are expected to match very few documents. Default: false */
946
+ enable_lazy_filter?: boolean;
947
+ /** Controls the number of similar words that Typesense considers during fuzzy search on filter_by values. Useful for controlling prefix matches like company_name:Acm*. */
948
+ max_filter_by_candidates?: number;
927
949
  /** A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc` */
928
950
  sort_by?: string;
929
951
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
@@ -932,6 +954,8 @@ export interface MultiSearchCollectionParameters {
932
954
  max_facet_values?: number;
933
955
  /** Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe". */
934
956
  facet_query?: string;
957
+ /** Controls the fuzziness of the facet query filter. Default: 2. */
958
+ facet_query_num_typos?: number;
935
959
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
936
960
  num_typos?: string;
937
961
  /** Results from this specific page number would be fetched. */
@@ -948,6 +972,8 @@ export interface MultiSearchCollectionParameters {
948
972
  group_limit?: number;
949
973
  /** Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. Default: true */
950
974
  group_missing_values?: boolean;
975
+ /** Overrides the behavior of group_by queries where found value is an approximation. When group_max_candidates is passed, found will be accurate up until its value. */
976
+ group_max_candidates?: number;
951
977
  /** List of fields from the document to include in the search result */
952
978
  include_fields?: string;
953
979
  /** List of fields from the document to exclude in the search result */
@@ -977,6 +1003,8 @@ export interface MultiSearchCollectionParameters {
977
1003
  enable_analytics?: boolean;
978
1004
  /** Allow synonym resolution on word prefixes in the query. Default: false */
979
1005
  synonym_prefix?: boolean;
1006
+ /** When set to true, search results that matched via synonyms will be demoted in ranking, appearing below results that have a direct match. Default: false */
1007
+ demote_synonym_match?: boolean;
980
1008
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
981
1009
  synonym_num_typos?: number;
982
1010
  /** A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. */
@@ -987,6 +1015,8 @@ export interface MultiSearchCollectionParameters {
987
1015
  curation_tags?: string;
988
1016
  /** A list of custom fields that must be highlighted even if you don't query for them */
989
1017
  highlight_fields?: string;
1018
+ /** When true, computes both text match and vector distance scores for all matches in hybrid search. Documents found only through keyword search will get a vector distance score, and documents found only through vector search will get a text match score. */
1019
+ rerank_hybrid_matches?: boolean;
990
1020
  /** You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. Set this parameter to true to do the same */
991
1021
  pre_segmented_query?: boolean;
992
1022
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
@@ -1005,6 +1035,8 @@ export interface MultiSearchCollectionParameters {
1005
1035
  exhaustive_search?: boolean;
1006
1036
  /** Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter. */
1007
1037
  search_cutoff_ms?: number;
1038
+ /** Maximum number of hits that can be fetched from the collection. page * per_page should be less than this number for the search request to return results. */
1039
+ limit_hits?: number;
1008
1040
  /** Enable server side caching of search query results. By default, caching is disabled. */
1009
1041
  use_cache?: boolean;
1010
1042
  /** The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60. */
@@ -1025,6 +1057,12 @@ export interface MultiSearchCollectionParameters {
1025
1057
  stopwords?: string;
1026
1058
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
1027
1059
  facet_return_parent?: string;
1060
+ /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
1061
+ facet_sample_percent?: number;
1062
+ /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
1063
+ facet_sample_threshold?: number;
1064
+ /** Controls how steeply facet_sample_percent falls as the collection grows. facet_sample_threshold should be non-zero for facet_sample_slope to be effective. Default: 0. */
1065
+ facet_sample_slope?: number;
1028
1066
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
1029
1067
  voice_query?: string;
1030
1068
  /** Enable conversational search. */
@@ -1039,8 +1077,6 @@ export interface MultiSearchCollectionParameters {
1039
1077
  collection?: string;
1040
1078
  /** A separate search API key for each search within a multi_search request */
1041
1079
  x_typesense_api_key?: string;
1042
- /** When true, computes both text match and vector distance scores for all matches in hybrid search. Documents found only through keyword search will get a vector distance score, and documents found only through vector search will get a text match score. */
1043
- rerank_hybrid_matches?: boolean;
1044
1080
  }
1045
1081
  export declare const MultiSearchCollectionParameters: S.Schema<MultiSearchCollectionParameters>;
1046
1082
  export type MultiSearchSearchesParameterSearchesList = Array<MultiSearchCollectionParameters>;
@@ -1765,7 +1801,7 @@ export declare const ImportStemmingDictionaryRequest: S.Schema<ImportStemmingDic
1765
1801
  export interface ImportStemmingDictionaryResponse {
1766
1802
  }
1767
1803
  export declare const ImportStemmingDictionaryResponse: S.Schema<ImportStemmingDictionaryResponse>;
1768
- export interface ListDocumentRequest {
1804
+ export interface IndexDocumentRequest {
1769
1805
  /** The name of the collection to add the document to */
1770
1806
  collectionName: string;
1771
1807
  /** Additional action to perform */
@@ -1773,9 +1809,9 @@ export interface ListDocumentRequest {
1773
1809
  /** Dealing with Dirty Data */
1774
1810
  dirty_values?: DirtyValues | (string & {});
1775
1811
  }
1776
- export declare const ListDocumentRequest: S.Schema<ListDocumentRequest>;
1777
- export type ListDocumentResponse = unknown;
1778
- export declare const ListDocumentResponse: S.Schema<ListDocumentResponse>;
1812
+ export declare const IndexDocumentRequest: S.Schema<IndexDocumentRequest>;
1813
+ export type IndexDocumentResponse = unknown;
1814
+ export declare const IndexDocumentResponse: S.Schema<IndexDocumentResponse>;
1779
1815
  export interface ListStemmingDictionariesRequest {
1780
1816
  }
1781
1817
  export declare const ListStemmingDictionariesRequest: S.Schema<ListStemmingDictionariesRequest>;
@@ -1986,6 +2022,10 @@ export interface MultiSearchParameters {
1986
2022
  max_extra_suffix?: number;
1987
2023
  /** Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. */
1988
2024
  filter_by?: string;
2025
+ /** Applies the filtering operation incrementally / lazily. Set this to true when you are potentially filtering on large values but the tokens in the query are expected to match very few documents. Default: false */
2026
+ enable_lazy_filter?: boolean;
2027
+ /** Controls the number of similar words that Typesense considers during fuzzy search on filter_by values. Useful for controlling prefix matches like company_name:Acm*. */
2028
+ max_filter_by_candidates?: number;
1989
2029
  /** A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc` */
1990
2030
  sort_by?: string;
1991
2031
  /** A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. */
@@ -1994,6 +2034,8 @@ export interface MultiSearchParameters {
1994
2034
  max_facet_values?: number;
1995
2035
  /** Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe". */
1996
2036
  facet_query?: string;
2037
+ /** Controls the fuzziness of the facet query filter. Default: 2. */
2038
+ facet_query_num_typos?: number;
1997
2039
  /** The number of typographical errors (1 or 2) that would be tolerated. Default: 2 */
1998
2040
  num_typos?: string;
1999
2041
  /** Results from this specific page number would be fetched. */
@@ -2010,6 +2052,8 @@ export interface MultiSearchParameters {
2010
2052
  group_limit?: number;
2011
2053
  /** Setting this parameter to true will place all documents that have a null value in the group_by field, into a single group. Setting this parameter to false, will cause each document with a null value in the group_by field to not be grouped with other documents. Default: true */
2012
2054
  group_missing_values?: boolean;
2055
+ /** Overrides the behavior of group_by queries where found value is an approximation. When group_max_candidates is passed, found will be accurate up until its value. */
2056
+ group_max_candidates?: number;
2013
2057
  /** List of fields from the document to include in the search result */
2014
2058
  include_fields?: string;
2015
2059
  /** List of fields from the document to exclude in the search result */
@@ -2039,6 +2083,8 @@ export interface MultiSearchParameters {
2039
2083
  enable_analytics?: boolean;
2040
2084
  /** Allow synonym resolution on word prefixes in the query. Default: false */
2041
2085
  synonym_prefix?: boolean;
2086
+ /** When set to true, search results that matched via synonyms will be demoted in ranking, appearing below results that have a direct match. Default: false */
2087
+ demote_synonym_match?: boolean;
2042
2088
  /** Allow synonym resolution on typo-corrected words in the query. Default: 0 */
2043
2089
  synonym_num_typos?: number;
2044
2090
  /** A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. You could also use the Curation feature to override search results based on rules. Curations are applied first, followed by `pinned_hits` and finally `hidden_hits`. */
@@ -2049,6 +2095,8 @@ export interface MultiSearchParameters {
2049
2095
  curation_tags?: string;
2050
2096
  /** A list of custom fields that must be highlighted even if you don't query for them */
2051
2097
  highlight_fields?: string;
2098
+ /** When true, computes both text match and vector distance scores for all matches in hybrid search. Documents found only through keyword search will get a vector distance score, and documents found only through vector search will get a text match score. */
2099
+ rerank_hybrid_matches?: boolean;
2052
2100
  /** You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. Set this parameter to true to do the same */
2053
2101
  pre_segmented_query?: boolean;
2054
2102
  /** Search using a bunch of search parameters by setting this parameter to the name of the existing Preset. */
@@ -2067,6 +2115,8 @@ export interface MultiSearchParameters {
2067
2115
  exhaustive_search?: boolean;
2068
2116
  /** Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter. */
2069
2117
  search_cutoff_ms?: number;
2118
+ /** Maximum number of hits that can be fetched from the collection. page * per_page should be less than this number for the search request to return results. */
2119
+ limit_hits?: number;
2070
2120
  /** Enable server side caching of search query results. By default, caching is disabled. */
2071
2121
  use_cache?: boolean;
2072
2122
  /** The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60. */
@@ -2087,6 +2137,12 @@ export interface MultiSearchParameters {
2087
2137
  stopwords?: string;
2088
2138
  /** Comma separated string of nested facet fields whose parent object should be returned in facet response. */
2089
2139
  facet_return_parent?: string;
2140
+ /** Percentage of hits that will be used to estimate facet counts. Default: 100. */
2141
+ facet_sample_percent?: number;
2142
+ /** Minimum number of hits above which the facet counts are sampled. Default: 0. */
2143
+ facet_sample_threshold?: number;
2144
+ /** Controls how steeply facet_sample_percent falls as the collection grows. facet_sample_threshold should be non-zero for facet_sample_slope to be effective. Default: 0. */
2145
+ facet_sample_slope?: number;
2090
2146
  /** The base64 encoded audio file in 16 khz 16-bit WAV format. */
2091
2147
  voice_query?: string;
2092
2148
  /** Enable conversational search. */
@@ -2766,9 +2822,9 @@ export declare const importDocuments: API.OperationMethod<ImportDocumentsRequest
2766
2822
  export type ImportStemmingDictionaryError = BadRequest | TypesenseOpError;
2767
2823
  /** Import a stemming dictionary Upload a JSONL file containing word mappings to create or update a stemming dictionary. */
2768
2824
  export declare const importStemmingDictionary: API.OperationMethod<ImportStemmingDictionaryRequest, ImportStemmingDictionaryResponse, ImportStemmingDictionaryError, TypesenseOpContext>;
2769
- export type ListDocumentError = NotFound | TypesenseOpError;
2825
+ export type IndexDocumentError = NotFound | TypesenseOpError;
2770
2826
  /** Index a document A document to be indexed in a given collection must conform to the schema of the collection. */
2771
- export declare const listDocument: API.OperationMethod<ListDocumentRequest, ListDocumentResponse, ListDocumentError, TypesenseOpContext>;
2827
+ export declare const indexDocument: API.OperationMethod<IndexDocumentRequest, IndexDocumentResponse, IndexDocumentError, TypesenseOpContext>;
2772
2828
  export type ListStemmingDictionariesError = TypesenseOpError;
2773
2829
  /** List all stemming dictionaries Retrieve a list of all available stemming dictionaries. */
2774
2830
  export declare const listStemmingDictionaries: API.OperationMethod<ListStemmingDictionariesRequest, ListStemmingDictionariesResponse, ListStemmingDictionariesError, TypesenseOpContext>;