@distilled.cloud/typesense 1.0.0-rc.2 → 1.0.0-rc.21
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/LICENSE +201 -0
- package/README.md +33 -0
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +18 -5
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +1 -42
- package/lib/errors.d.ts +20 -16
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -24
- package/lib/index.d.ts +5 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -9
- package/lib/index.lazy.js +6 -0
- package/lib/index.lazy.js.map +1 -0
- package/lib/protocol.d.ts +10 -12
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +1 -31
- package/lib/retry.d.ts +2 -2
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -33
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +0 -2
- package/lib/services/typesense.d.ts +1319 -1574
- package/lib/services/typesense.d.ts.map +1 -1
- package/lib/services/typesense.js +112 -2916
- package/lib/services/typesense.js.map +1 -1
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/typesense.js +4 -0
- package/lib/traits.d.ts +1 -1
- package/lib/traits.d.ts.map +1 -1
- package/lib/traits.js +1 -11
- package/package.json +40 -17
- package/src/credentials.ts +32 -27
- package/src/errors.ts +19 -16
- package/src/index.ts +5 -9
- package/src/protocol.ts +28 -33
- package/src/retry.ts +6 -10
- package/src/services/typesense.ts +4377 -5048
- package/src/traits.ts +1 -1
- package/lib/credentials.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/protocol.js.map +0 -1
- package/lib/retry.js.map +0 -1
- package/lib/services/index.js.map +0 -1
- package/lib/traits.js.map +0 -1
package/lib/retry.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Typesense retry configuration.
|
|
3
|
-
*
|
|
4
|
-
* Defines the per-SDK `Retry` Context.Service tag that the generated
|
|
5
|
-
* operations wire into their config. Callers can install a blanket retry
|
|
6
|
-
* policy at the layer level and have every Typesense API call below it pick
|
|
7
|
-
* it up:
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* import * as Typesense from "@distilled.cloud/typesense";
|
|
12
|
-
*
|
|
13
|
-
* myEffect.pipe(Typesense.Retry.transient);
|
|
14
|
-
* Effect.provide(myEffect, Layer.succeed(Typesense.Retry.Retry, customPolicy));
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
import * as Context from "effect/Context";
|
|
18
|
-
import * as Effect from "effect/Effect";
|
|
19
|
-
import * as Layer from "effect/Layer";
|
|
20
|
-
import { throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
|
|
21
|
-
export { makeDefault, jittered, capped, throttlingOptions, transientOptions, throttlingFactory, transientFactory, } from "@distilled.cloud/core/retry";
|
|
22
|
-
/** Context tag for configuring retry behavior of Typesense API calls. */
|
|
23
|
-
export class Retry extends Context.Service()("TypesenseRetry") {
|
|
24
|
-
}
|
|
25
|
-
/** Provides a custom retry policy to every Typesense API call below it. */
|
|
26
|
-
export const policy = (optionsOrFactory) => Effect.provide(Layer.succeed(Retry, optionsOrFactory));
|
|
27
|
-
/** Disables all automatic retries. */
|
|
28
|
-
export const none = Effect.provide(Layer.succeed(Retry, { while: () => false }));
|
|
29
|
-
/** Apply the throttling retry policy (retries throttling errors indefinitely). */
|
|
30
|
-
export const throttling = policy(throttlingFactory);
|
|
31
|
-
/** Apply the transient retry policy (retries all transient errors indefinitely). */
|
|
32
|
-
export const transient = policy(transientFactory);
|
|
33
|
-
//# sourceMappingURL=retry.js.map
|
|
1
|
+
export { retry$Retry as Retry, retry$capped as capped, retry$jittered as jittered, retry$makeDefault as makeDefault, retry$none as none, retry$policy as policy, retry$throttling as throttling, retry$throttlingFactory as throttlingFactory, retry$throttlingOptions as throttlingOptions, retry$transient as transient, retry$transientFactory as transientFactory, retry$transientOptions as transientOptions } from "./_bundle/sdk.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../src/services/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC"}
|
package/lib/services/index.js
CHANGED