effect-app 0.162.3 → 0.163.0
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/CHANGELOG.md +13 -0
- package/dist/Request.d.ts +3 -3
- package/dist/client/fetch.d.ts +4 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @effect-app/prelude
|
|
2
2
|
|
|
3
|
+
## 0.163.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- m
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @effect-app/core@0.139.0
|
|
13
|
+
- @effect-app/fluent-extensions@0.133.0
|
|
14
|
+
- @effect-app/schema@0.191.0
|
|
15
|
+
|
|
3
16
|
## 0.162.3
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/Request.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const responseWithJsonBody: (response: ClientResponse) => import(
|
|
|
14
14
|
* @tsplus fluent effect/platform/Http/Client schemaJsonBody
|
|
15
15
|
* @tsplus location "effect-app/Request"
|
|
16
16
|
*/
|
|
17
|
-
export declare const schemaJsonBody: <R, To, From, A, B>(client: HttpClient.Client<A, B, ClientResponse>, schema: Schema<To, From, R>) => HttpClient.Client<R | A, HttpClientError.ResponseError | import("@effect/schema/ParseResult").ParseError
|
|
17
|
+
export declare const schemaJsonBody: <R, To, From, A, B>(client: HttpClient.Client<A, B, ClientResponse>, schema: Schema<To, From, R>) => HttpClient.Client<R | A, HttpClientError.ResponseError | B | import("@effect/schema/ParseResult").ParseError, To>;
|
|
18
18
|
/**
|
|
19
19
|
* @tsplus fluent effect/platform/Http/Client schemaJsonBodyUnsafe
|
|
20
20
|
* @tsplus location "effect-app/Request"
|
|
@@ -28,7 +28,7 @@ export declare const schemaJson: <R, From extends {
|
|
|
28
28
|
readonly status?: number;
|
|
29
29
|
readonly headers?: Headers;
|
|
30
30
|
readonly body?: unknown;
|
|
31
|
-
}, To, A, B>(client: HttpClient.Client<A, B, ClientResponse>, schema: Schema<To, From, R>) => HttpClient.Client<R | A, HttpClientError.ResponseError | import("@effect/schema/ParseResult").ParseError
|
|
31
|
+
}, To, A, B>(client: HttpClient.Client<A, B, ClientResponse>, schema: Schema<To, From, R>) => HttpClient.Client<R | A, HttpClientError.ResponseError | B | import("@effect/schema/ParseResult").ParseError, To>;
|
|
32
32
|
/**
|
|
33
33
|
* @tsplus fluent effect/platform/Http/Client schemaJsonUnsafe
|
|
34
34
|
* @tsplus location "effect-app/Request"
|
|
@@ -37,7 +37,7 @@ export declare const schemaJsonUnsafe: <R, From extends {
|
|
|
37
37
|
readonly status?: number;
|
|
38
38
|
readonly headers?: Headers;
|
|
39
39
|
readonly body?: unknown;
|
|
40
|
-
}, To, A, B>(client: HttpClient.Client<A, B, ClientResponse>, schema: Schema<To, From, R>) => HttpClient.Client<R | A, HttpClientError.ResponseError | import("@effect/schema/ParseResult").ParseError
|
|
40
|
+
}, To, A, B>(client: HttpClient.Client<A, B, ClientResponse>, schema: Schema<To, From, R>) => HttpClient.Client<R | A, HttpClientError.ResponseError | B | import("@effect/schema/ParseResult").ParseError, To>;
|
|
41
41
|
/**
|
|
42
42
|
* @tsplus getter effect/platform/Http/Client demandJson
|
|
43
43
|
* @tsplus location "effect-app/Request"
|
package/dist/client/fetch.d.ts
CHANGED
|
@@ -16,12 +16,12 @@ export declare function fetchApi(method: Method, path: string, body?: unknown):
|
|
|
16
16
|
status: number;
|
|
17
17
|
body: unknown;
|
|
18
18
|
headers: import("@effect/platform/Http/Headers").Headers;
|
|
19
|
-
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | HttpRequestError | HttpResponseError<unknown>, HttpClient.Client.Default
|
|
19
|
+
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | HttpRequestError | HttpResponseError<unknown>, ApiConfig | HttpClient.Client.Default>;
|
|
20
20
|
export declare function fetchApi2S<RequestR, RequestFrom, RequestTo, ResponseR, ResponseFrom, ResponseTo>(request: Schema<RequestTo, RequestFrom, RequestR>, response: Schema<ResponseTo, ResponseFrom, ResponseR>): (method: Method, path: Path) => (req: RequestTo) => import("effect/Effect").Effect<{
|
|
21
21
|
body: ResponseTo;
|
|
22
22
|
headers: Headers;
|
|
23
23
|
status: number;
|
|
24
|
-
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> |
|
|
24
|
+
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | import("@effect/schema/ParseResult").ParseError | HttpRequestError | ResponseError | HttpResponseError<unknown>, ApiConfig | HttpClient.Client.Default | RequestR | ResponseR>;
|
|
25
25
|
export declare function fetchApi3S<RequestA, RequestE, ResponseE = unknown, ResponseA = void>({ Request, Response }: {
|
|
26
26
|
Request: REST.RequestSchemed<RequestA, RequestE>;
|
|
27
27
|
Response: REST.ReqRes<ResponseA, ResponseE, any>;
|
|
@@ -29,11 +29,11 @@ export declare function fetchApi3S<RequestA, RequestE, ResponseE = unknown, Resp
|
|
|
29
29
|
body: ResponseA;
|
|
30
30
|
headers: Headers;
|
|
31
31
|
status: number;
|
|
32
|
-
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> |
|
|
32
|
+
}, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | import("@effect/schema/ParseResult").ParseError | HttpRequestError | ResponseError | HttpResponseError<unknown>, any>;
|
|
33
33
|
export declare function fetchApi3SE<RequestA, RequestE, ResponseE = unknown, ResponseA = void>({ Request, Response }: {
|
|
34
34
|
Request: REST.RequestSchemed<RequestA, RequestE>;
|
|
35
35
|
Response: REST.ReqRes<ResponseA, ResponseE, any>;
|
|
36
|
-
}): (req: RequestA) => import("effect/Effect").Effect<FetchResponse<ResponseE>, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> |
|
|
36
|
+
}): (req: RequestA) => import("effect/Effect").Effect<FetchResponse<ResponseE>, import("@effect/platform/Http/Body").BodyError | InvalidStateError | ValidationError | NotLoggedInError | UnauthorizedError | OptimisticConcurrencyException | NotFoundError<ItemType> | import("@effect/schema/ParseResult").ParseError | HttpRequestError | ResponseError | HttpResponseError<unknown>, any>;
|
|
37
37
|
export declare function makePathWithQuery(path: Path, pars: Record<string, string | number | boolean | readonly string[] | readonly number[] | readonly boolean[] | null>): string;
|
|
38
38
|
export declare function makePathWithBody(path: Path, pars: Record<string, string | number | boolean | readonly string[] | readonly number[] | readonly boolean[] | null>): string;
|
|
39
39
|
export declare function mapResponse<T, A>(map: (t: T) => A): (r: FetchResponse<T>) => FetchResponse<A>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "effect-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.163.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"ts-pattern": "^5.0.6",
|
|
17
17
|
"uuid": "^9.0.1",
|
|
18
18
|
"validator": "^13.11.0",
|
|
19
|
-
"@effect-app/
|
|
20
|
-
"@effect-app/
|
|
21
|
-
"@effect-app/
|
|
19
|
+
"@effect-app/schema": "0.191.0",
|
|
20
|
+
"@effect-app/core": "0.139.0",
|
|
21
|
+
"@effect-app/fluent-extensions": "0.133.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@babel/cli": "^7.23.9",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"ts-node": "^10.9.2",
|
|
31
31
|
"typescript": "npm:@effect-app/typescript@5.4.0-tsplus.20240124",
|
|
32
32
|
"vitest": "^1.2.2",
|
|
33
|
-
"@effect-app/compiler": "0.
|
|
33
|
+
"@effect-app/compiler": "0.64.0"
|
|
34
34
|
},
|
|
35
35
|
"typesVersions": {
|
|
36
36
|
"*": {
|