@distilled.cloud/axiom 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/edge_ingest.d.ts +15 -3
- package/lib/services/edge_ingest.d.ts.map +1 -1
- package/lib/services/edge_ingest.js +7 -6
- package/lib/services/edge_ingest.js.map +1 -1
- package/lib/services/v2.d.ts +25 -5
- package/lib/services/v2.d.ts.map +1 -1
- package/lib/services/v2.js +11 -10
- package/lib/services/v2.js.map +1 -1
- package/package.json +7 -5
- package/src/errors.ts +2 -2
- package/src/services/edge_ingest.ts +9 -11
- package/src/services/v2.ts +13 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/axiom",
|
|
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",
|
|
@@ -78,12 +78,14 @@
|
|
|
78
78
|
"specs:update": "git -C specs/docs fetch && git -C specs/docs checkout main && git -C specs/docs pull"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@distilled.cloud/core": "1.0.0-rc.
|
|
82
|
-
"@effect/platform-bun": ">=4.0.0-beta.102 || >=4.0.0",
|
|
83
|
-
"effect": ">=4.0.0-beta.102 || >=4.0.0"
|
|
81
|
+
"@distilled.cloud/core": "1.0.0-rc.4"
|
|
84
82
|
},
|
|
85
83
|
"devDependencies": {
|
|
86
84
|
"@types/bun": "latest",
|
|
87
|
-
"@types/node": "latest"
|
|
85
|
+
"@types/node": "latest",
|
|
86
|
+
"@effect/platform-bun": ">=4.0.0-beta.104 || >=4.0.0"
|
|
87
|
+
},
|
|
88
|
+
"peerDependencies": {
|
|
89
|
+
"effect": ">=4.0.0-beta.104 || >=4.0.0"
|
|
88
90
|
}
|
|
89
91
|
}
|
package/src/errors.ts
CHANGED
|
@@ -31,7 +31,7 @@ import * as Schema from "effect/Schema";
|
|
|
31
31
|
import * as Category from "@distilled.cloud/core/category";
|
|
32
32
|
|
|
33
33
|
/** Unknown Axiom error — returned when nothing else matches the failure. */
|
|
34
|
-
export class UnknownAxiomError extends Schema.
|
|
34
|
+
export class UnknownAxiomError extends Schema.TaggedError<UnknownAxiomError>()(
|
|
35
35
|
"UnknownAxiomError",
|
|
36
36
|
{
|
|
37
37
|
code: Schema.optional(Schema.String),
|
|
@@ -41,7 +41,7 @@ export class UnknownAxiomError extends Schema.TaggedErrorClass<UnknownAxiomError
|
|
|
41
41
|
).pipe(Category.withServerError) {}
|
|
42
42
|
|
|
43
43
|
/** Schema parse error wrapper (kept for v0 surface parity). */
|
|
44
|
-
export class AxiomParseError extends Schema.
|
|
44
|
+
export class AxiomParseError extends Schema.TaggedError<AxiomParseError>()(
|
|
45
45
|
"AxiomParseError",
|
|
46
46
|
{
|
|
47
47
|
body: Schema.Unknown,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/docs restapi/versions). 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
|
AxiomProtocol,
|
|
@@ -14,31 +15,28 @@ export type { AxiomOpError, AxiomOpContext };
|
|
|
14
15
|
|
|
15
16
|
export class BadRequest
|
|
16
17
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
17
|
-
/*@__PURE__*/ S.
|
|
18
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
18
19
|
code: S.Number,
|
|
19
20
|
message: S.String,
|
|
20
|
-
}),
|
|
21
|
+
}).pipe(C.withBadRequestError),
|
|
21
22
|
[{ status: 400 }],
|
|
22
23
|
) {}
|
|
23
24
|
|
|
24
25
|
export class NotFound
|
|
25
26
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
26
|
-
/*@__PURE__*/ S.
|
|
27
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
27
28
|
code: S.Number,
|
|
28
29
|
message: S.String,
|
|
29
|
-
}),
|
|
30
|
+
}).pipe(C.withBadRequestError),
|
|
30
31
|
[{ status: 404 }],
|
|
31
32
|
) {}
|
|
32
33
|
|
|
33
34
|
export class UnprocessableEntity
|
|
34
35
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
35
|
-
/*@__PURE__*/ S.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
message: S.String,
|
|
40
|
-
},
|
|
41
|
-
),
|
|
36
|
+
/*@__PURE__*/ S.TaggedError<UnprocessableEntity>()("UnprocessableEntity", {
|
|
37
|
+
code: S.Number,
|
|
38
|
+
message: S.String,
|
|
39
|
+
}).pipe(C.withBadRequestError),
|
|
42
40
|
[{ status: 422 }],
|
|
43
41
|
) {}
|
|
44
42
|
|
package/src/services/v2.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import * as S from "@distilled.cloud/core/schema";
|
|
3
3
|
import * as Redacted from "effect/Redacted";
|
|
4
4
|
import * as API from "@distilled.cloud/core/api";
|
|
5
|
+
import * as C from "@distilled.cloud/core/category";
|
|
5
6
|
import * as T from "../traits.ts";
|
|
6
7
|
import {
|
|
7
8
|
AxiomProtocol,
|
|
@@ -15,49 +16,46 @@ export type { AxiomOpError, AxiomOpContext };
|
|
|
15
16
|
|
|
16
17
|
export class BadRequest
|
|
17
18
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
18
|
-
/*@__PURE__*/ S.
|
|
19
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
19
20
|
code: S.Number,
|
|
20
21
|
message: S.String,
|
|
21
|
-
}),
|
|
22
|
+
}).pipe(C.withBadRequestError),
|
|
22
23
|
[{ status: 400 }],
|
|
23
24
|
) {}
|
|
24
25
|
|
|
25
26
|
export class Conflict
|
|
26
27
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
27
|
-
/*@__PURE__*/ S.
|
|
28
|
+
/*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
|
|
28
29
|
code: S.Number,
|
|
29
30
|
message: S.String,
|
|
30
|
-
}),
|
|
31
|
+
}).pipe(C.withConflictError),
|
|
31
32
|
[{ status: 409 }],
|
|
32
33
|
) {}
|
|
33
34
|
|
|
34
35
|
export class Forbidden
|
|
35
36
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
36
|
-
/*@__PURE__*/ S.
|
|
37
|
+
/*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
|
|
37
38
|
code: S.Number,
|
|
38
39
|
message: S.String,
|
|
39
|
-
}),
|
|
40
|
+
}).pipe(C.withAuthError),
|
|
40
41
|
[{ status: 403 }],
|
|
41
42
|
) {}
|
|
42
43
|
|
|
43
44
|
export class NotFound
|
|
44
45
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
45
|
-
/*@__PURE__*/ S.
|
|
46
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
46
47
|
code: S.Number,
|
|
47
48
|
message: S.String,
|
|
48
|
-
}),
|
|
49
|
+
}).pipe(C.withBadRequestError),
|
|
49
50
|
[{ status: 404 }],
|
|
50
51
|
) {}
|
|
51
52
|
|
|
52
53
|
export class UnprocessableEntity
|
|
53
54
|
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
54
|
-
/*@__PURE__*/ S.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
message: S.String,
|
|
59
|
-
},
|
|
60
|
-
),
|
|
55
|
+
/*@__PURE__*/ S.TaggedError<UnprocessableEntity>()("UnprocessableEntity", {
|
|
56
|
+
code: S.Number,
|
|
57
|
+
message: S.String,
|
|
58
|
+
}).pipe(C.withBadRequestError),
|
|
61
59
|
[{ status: 422 }],
|
|
62
60
|
) {}
|
|
63
61
|
|