@distilled.cloud/typesense 1.0.0-rc.2 → 1.0.0-rc.4
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/lib/errors.js +2 -2
- package/lib/errors.js.map +1 -1
- package/lib/services/typesense.d.ts +15 -3
- package/lib/services/typesense.d.ts.map +1 -1
- package/lib/services/typesense.js +7 -6
- package/lib/services/typesense.js.map +1 -1
- package/package.json +7 -5
- package/src/errors.ts +2 -2
- package/src/services/typesense.ts +7 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/typesense",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/alchemy-run/distilled",
|
|
@@ -59,12 +59,14 @@
|
|
|
59
59
|
"typecheck:strict": "tsc -p tsconfig.strict.json"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@distilled.cloud/core": "1.0.0-rc.
|
|
63
|
-
"@effect/platform-bun": ">=4.0.0-beta.102 || >=4.0.0",
|
|
64
|
-
"effect": ">=4.0.0-beta.102 || >=4.0.0"
|
|
62
|
+
"@distilled.cloud/core": "1.0.0-rc.4"
|
|
65
63
|
},
|
|
66
64
|
"devDependencies": {
|
|
67
65
|
"@types/bun": "latest",
|
|
68
|
-
"@types/node": "latest"
|
|
66
|
+
"@types/node": "latest",
|
|
67
|
+
"@effect/platform-bun": ">=4.0.0-beta.104 || >=4.0.0"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"effect": ">=4.0.0-beta.104 || >=4.0.0"
|
|
69
71
|
}
|
|
70
72
|
}
|
package/src/errors.ts
CHANGED
|
@@ -29,7 +29,7 @@ import * as Schema from "effect/Schema";
|
|
|
29
29
|
import * as Category from "@distilled.cloud/core/category";
|
|
30
30
|
|
|
31
31
|
// Unknown Typesense error - returned when an error code is not recognized
|
|
32
|
-
export class UnknownTypesenseError extends Schema.
|
|
32
|
+
export class UnknownTypesenseError extends Schema.TaggedError<UnknownTypesenseError>()(
|
|
33
33
|
"UnknownTypesenseError",
|
|
34
34
|
{
|
|
35
35
|
code: Schema.optional(Schema.String),
|
|
@@ -39,7 +39,7 @@ export class UnknownTypesenseError extends Schema.TaggedErrorClass<UnknownTypese
|
|
|
39
39
|
).pipe(Category.withServerError) {}
|
|
40
40
|
|
|
41
41
|
// Schema parse error wrapper
|
|
42
|
-
export class TypesenseParseError extends Schema.
|
|
42
|
+
export class TypesenseParseError extends Schema.TaggedError<TypesenseParseError>()(
|
|
43
43
|
"TypesenseParseError",
|
|
44
44
|
{
|
|
45
45
|
body: Schema.Unknown,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit.
|
|
2
2
|
import * as S from "@distilled.cloud/core/schema";
|
|
3
3
|
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as C from "@distilled.cloud/core/category";
|
|
4
5
|
import * as T from "../traits.ts";
|
|
5
6
|
import {
|
|
6
7
|
TypesenseProtocol,
|
|
@@ -13,28 +14,28 @@ export type { TypesenseOpError, TypesenseOpContext };
|
|
|
13
14
|
|
|
14
15
|
export class BadRequest
|
|
15
16
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
16
|
-
/*@__PURE__*/ S.
|
|
17
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
17
18
|
code: S.Number,
|
|
18
19
|
message: S.String,
|
|
19
|
-
}),
|
|
20
|
+
}).pipe(C.withBadRequestError),
|
|
20
21
|
[{ status: 400 }],
|
|
21
22
|
) {}
|
|
22
23
|
|
|
23
24
|
export class Conflict
|
|
24
25
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
25
|
-
/*@__PURE__*/ S.
|
|
26
|
+
/*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
|
|
26
27
|
code: S.Number,
|
|
27
28
|
message: S.String,
|
|
28
|
-
}),
|
|
29
|
+
}).pipe(C.withConflictError),
|
|
29
30
|
[{ status: 409 }],
|
|
30
31
|
) {}
|
|
31
32
|
|
|
32
33
|
export class NotFound
|
|
33
34
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
34
|
-
/*@__PURE__*/ S.
|
|
35
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
35
36
|
code: S.Number,
|
|
36
37
|
message: S.String,
|
|
37
|
-
}),
|
|
38
|
+
}).pipe(C.withBadRequestError),
|
|
38
39
|
[{ status: 404 }],
|
|
39
40
|
) {}
|
|
40
41
|
|