Skip to content

Commit

Permalink
Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and joshamaju committed Dec 18, 2023
1 parent f0164e6 commit 6d22c08
Show file tree
Hide file tree
Showing 11 changed files with 607 additions and 6 deletions.
5 changes: 0 additions & 5 deletions .changeset/silver-donuts-explain.md

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# effect-fetch

## 1.2.1

### Patch Changes

- f0164e6: Include Error module in package exports

## 1.2.0

### Minor Changes
Expand Down
9 changes: 9 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
remote_theme: mikearnaldi/just-the-docs

# Enable or disable the site search
search_enabled: true

# Aux links for the upper right navigation
aux_links:
'effect-fetch on GitHub':
- 'https://github.com/joshamaju/effect-fetch'
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Home
nav_order: 1
---
63 changes: 63 additions & 0 deletions docs/modules/Error.ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Error.ts
nav_order: 1
parent: Modules
---

## Error overview

Added in v1.1.0

---

<h2 class="text-delta">Table of contents</h2>

- [error](#error)
- [DecodeError](#decodeerror)
- [HttpError](#httperror)
- [StatusError](#statuserror)
- [StatusErrorT](#statuserrort)

---

# error

## DecodeError

**Signature**

```ts
export declare const DecodeError: typeof DecodeError
```
Added in v1.1.0
## HttpError
**Signature**
```ts
export declare const HttpError: typeof HttpError
```
Added in v1.1.0
## StatusError
**Signature**
```ts
export declare const StatusError: typeof StatusError
```
Added in v1.1.0
## StatusErrorT
**Signature**
```ts
export declare const StatusErrorT: any
```
Added in v1.1.0
102 changes: 102 additions & 0 deletions docs/modules/Fetch.ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
title: Fetch.ts
nav_order: 2
parent: Modules
---

## Fetch overview

Added in v1.0.0

---

<h2 class="text-delta">Table of contents</h2>

- [constructors](#constructors)
- [effect](#effect)
- [fetch](#fetch)
- [fetch\_](#fetch_)
- [make](#make)
- [model](#model)
- [Fetch (interface)](#fetch-interface)
- [tag](#tag)
- [Fetch](#fetch-1)

---

# constructors

## effect

Constructs a `Fetch` layer from the specified effect that produces the given platform adapter

**Signature**

```ts
export declare const effect: <R, E>(fetch: Effect<R, E, Fetch>) => Layer<R, E, Fetch>
```
Added in v1.0.0
## fetch
**Signature**
```ts
export declare const fetch: (url: string | URL, init?: RequestInit | undefined) => Effect<Fetch, HttpError, Response>
```
Added in v1.0.0
## fetch\_
Constructs a request whose response is a `Response` wrapper with the decode methods replace with their `Effect` conterparts
**Signature**
```ts
export declare const fetch_: (
url: string | URL,
init?: RequestInit | undefined
) => Effect<Fetch, HttpError, HttpResponse>
```
Added in v1.0.0
## make
Constructs a `Fetch` layer using the given platform adapter
**Signature**
```ts
export declare const make: (fetch: Fetch) => Layer<never, never, Fetch>
```
Added in v1.0.0
# model
## Fetch (interface)
**Signature**
```ts
export interface Fetch {
(url: string | URL | HttpRequest, init?: RequestInit): Effect<never, HttpError, Response>
}
```

Added in v1.0.0

# tag

## Fetch

**Signature**

```ts
export declare const Fetch: Tag<Fetch, Fetch>
```
Added in v1.0.0
124 changes: 124 additions & 0 deletions docs/modules/Interceptor.ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
title: Interceptor.ts
nav_order: 3
parent: Modules
---

## Interceptor overview

Added in v1.0.0

---

<h2 class="text-delta">Table of contents</h2>

- [combinators](#combinators)
- [add](#add)
- [constructors](#constructors)
- [empty](#empty)
- [makeAdapter](#makeadapter)
- [makeFetch](#makefetch)
- [of](#of)
- [model](#model)
- [Context (interface)](#context-interface)
- [tag](#tag)
- [Context](#context)

---

# combinators

## add

**Signature**

```ts
export declare const add: {
<T extends internal.Interceptor<any, any>>(
interceptor: T
): <R, E>(
interceptors: internal.Interceptors<R, E>
) => T extends internal.Interceptor<infer R2, infer E2> ? internal.Interceptors<R | R2, E | E2> : never
<R, E, T extends internal.Interceptor<any, any>>(
interceptors: internal.Interceptors<R, E>,
interceptor: T
): T extends internal.Interceptor<infer R2, infer E2> ? internal.Interceptors<R | R2, E | E2> : never
}
```
Added in v1.0.0
# constructors
## empty
**Signature**
```ts
export declare const empty: () => Interceptors<never, never>
```
Added in v1.0.0
## makeAdapter
Provides the given platform adapter to the interceptor `Fetch` wrapper
**Signature**
```ts
export declare const makeAdapter: {
<R, E>(interceptors: internal.Interceptors<R, E>): (fetch: Fetch) => Effect<Exclude<R, Context>, E, Fetch>
<R, E>(fetch: Fetch, interceptors: internal.Interceptors<R, E>): Effect<Exclude<R, Context>, E, Fetch>
}
```
Added in v1.0.0
## makeFetch
Creates the intercepting wrapper around the provided platform adapter
**Signature**
```ts
export declare const makeFetch: <R, E>(
interceptors: internal.Interceptors<R, E>
) => Effect<Exclude<R, Context> | Fetch, E, Fetch>
```
Added in v1.0.0
## of
**Signature**
```ts
export declare const of: <R, E>(interceptor: internal.Interceptor<R, E>) => internal.Interceptors<R, E>
```
Added in v1.2.0
# model
## Context (interface)
**Signature**
```ts
export interface Context extends internal.Context {}
```

Added in v1.0.0

# tag

## Context

**Signature**

```ts
export declare const Context: Tag<internal.Context, internal.Context>
```
Added in v1.0.0
Loading

0 comments on commit 6d22c08

Please sign in to comment.