effect-app 1.0.9 → 1.0.10
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 +7 -0
- package/dist/Request.d.ts +2 -2
- package/dist/client/errors.d.ts +3 -3
- package/dist/client/fetch.d.ts +4 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/Request.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const responseWithJsonBody: (response: ClientResponse) => Effect.
|
|
|
13
13
|
/**
|
|
14
14
|
* @tsplus fluent effect/platform/Http/Client schemaJsonBody
|
|
15
15
|
*/
|
|
16
|
-
export declare const schemaJsonBody: <RS, To, From, E, R>(client: HttpClient.Client<ClientResponse, E, R>, schema: Schema<To, From, RS>) => HttpClient.Client<To, HttpClientError.ResponseError |
|
|
16
|
+
export declare const schemaJsonBody: <RS, To, From, E, R>(client: HttpClient.Client<ClientResponse, E, R>, schema: Schema<To, From, RS>) => HttpClient.Client<To, HttpClientError.ResponseError | S.ParseResult.ParseError | E, RS | R>;
|
|
17
17
|
/**
|
|
18
18
|
* @tsplus fluent effect/platform/Http/Client schemaJsonBodyUnsafe
|
|
19
19
|
*/
|
|
@@ -30,7 +30,7 @@ export declare const responseWithSchemaBody: <To, From extends {
|
|
|
30
30
|
headers: Headers;
|
|
31
31
|
status: number;
|
|
32
32
|
remoteAddress: Option.Option<string>;
|
|
33
|
-
}, HttpClientError.ResponseError |
|
|
33
|
+
}, HttpClientError.ResponseError | S.ParseResult.ParseError | E, RS | R>;
|
|
34
34
|
/** @tsplus getter effect/platform/Http/Client demandJson */
|
|
35
35
|
export declare const demandJson: <E, R>(client: HttpClient.Client<ClientResponse, E, R>) => HttpClient.Client<ClientResponse, HttpClientError.ResponseError | E, R>;
|
|
36
36
|
//# sourceMappingURL=Request.d.ts.map
|
package/dist/client/errors.d.ts
CHANGED
|
@@ -6,15 +6,15 @@ declare const NotFoundError_base: import("@effect/schema/Schema").Class<NotFound
|
|
|
6
6
|
id: typeof S.Unknown;
|
|
7
7
|
}, {
|
|
8
8
|
readonly _tag: "NotFoundError";
|
|
9
|
-
readonly id: unknown;
|
|
10
9
|
readonly type: string;
|
|
10
|
+
readonly id: unknown;
|
|
11
11
|
}, {
|
|
12
12
|
readonly _tag: "NotFoundError";
|
|
13
|
-
readonly id: unknown;
|
|
14
13
|
readonly type: string;
|
|
15
|
-
}, never, {
|
|
16
14
|
readonly id: unknown;
|
|
15
|
+
}, never, {
|
|
17
16
|
readonly type: string;
|
|
17
|
+
readonly id: unknown;
|
|
18
18
|
}, {}, Cause.YieldableError>;
|
|
19
19
|
export declare class NotFoundError<ItemType = string> extends NotFoundError_base {
|
|
20
20
|
get message(): string;
|
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
|
-
} | FetchResponse<unknown>,
|
|
19
|
+
} | FetchResponse<unknown>, HttpRequestError | InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | ValidationError | ServiceUnavailableError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError, HttpClient.Client.Default | ApiConfig>;
|
|
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) => Effect.Effect<{
|
|
21
21
|
body: ResponseTo;
|
|
22
22
|
headers: Headers;
|
|
23
23
|
status: number;
|
|
24
|
-
},
|
|
24
|
+
}, HttpRequestError | ResError | InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | ValidationError | ServiceUnavailableError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError | S.ParseResult.ParseError, HttpClient.Client.Default | ApiConfig | 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
|
-
},
|
|
32
|
+
}, HttpRequestError | ResError | InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | ValidationError | ServiceUnavailableError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError | S.ParseResult.ParseError, 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) => Effect.Effect<FetchResponse<ResponseE>,
|
|
36
|
+
}): (req: RequestA) => Effect.Effect<FetchResponse<ResponseE>, HttpRequestError | ResError | InvalidStateError | OptimisticConcurrencyException | NotFoundError<ItemType> | NotLoggedInError | import("./errors.js").LoginError | UnauthorizedError | ValidationError | ServiceUnavailableError | HttpResponseError<unknown> | import("@effect/platform/Http/Body").BodyError | S.ParseResult.ParseError, 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": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"uuid": "^9.0.1",
|
|
14
14
|
"validator": "^13.11.0",
|
|
15
15
|
"@effect-app/core": "1.0.5",
|
|
16
|
-
"@effect-app/schema": "1.0.
|
|
16
|
+
"@effect-app/schema": "1.0.9"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@babel/cli": "^7.24.1",
|