Skip to content

Commit

Permalink
Merge pull request #41 from contactlab/release/1.2.0
Browse files Browse the repository at this point in the history
Release/1.2.0

closes #23
closes #25
closes #38
closes #39
  • Loading branch information
StefanoMagrassi authored Oct 13, 2018
2 parents 9d04470 + 42999e8 commit ee80fcd
Show file tree
Hide file tree
Showing 6 changed files with 830 additions and 109 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<a name="1.2.0"></a>

# [1.2.0](https://github.com/contactlab/appy/compare/1.1.1...1.2.0) (2018-10-13)

### Bug Fixes

- **package:** update fp-ts to version 1.9.0 ([ab499bf](https://github.com/contactlab/appy/commit/ab499bf))
- **package:** update io-ts to version 1.3.1 ([a7fcf98](https://github.com/contactlab/appy/commit/a7fcf98))
- **typescript:** change USVString type alias to string type ([1da62d3](https://github.com/contactlab/appy/commit/1da62d3)), closes [#38](https://github.com/contactlab/appy/issues/38)

### Features

- add changelog automatically generated ([be2daac](https://github.com/contactlab/appy/commit/be2daac)), closes [#25](https://github.com/contactlab/appy/issues/25)

<a name="1.0.0-rc2"></a>

# [1.0.0-rc2](https://github.com/contactlab/appy/compare/1.0.0-rc1...1.0.0-rc2) (2018-07-12)

<a name="1.0.0-rc1"></a>

# [1.0.0-rc1](https://github.com/contactlab/appy/compare/0.3.0...1.0.0-rc1) (2018-07-04)

<a name="0.1.0"></a>

# 0.1.0 (2018-01-19)
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The module tries to be as more compliant as possible with the `fetch()` interfac

- request `method` is always explicit (no implicit "GET");
- accepted methods are definened by the `Method` union type;
- `fetch`'s input is always a `USVString` (no `Request` objects allowed);
- `fetch`'s input is always a `string` (no `Request` objects allowed);
- `Response` is mapped into a specific `AppyResponse<Mixed>` interface;
- `AppyResponse` `headers` property is always a `HeadersMap` (alias for a map of string);
- `AppyResponse` has a `body` property that is the result of parsing to JSON the string returned from `response.text()`; if it cannot be parsed as JSON, `body` value is just the string (both types of data are covered by the `Mixed` type).
Expand All @@ -74,44 +74,44 @@ The module tries to be as more compliant as possible with the `fetch()` interfac
See [here](src/request.ts) for the complete list of types.

```typescript
function request(
declare function request(
m: Method,
u: USVString,
u: string,
o?: RequestInit
): TaskEither<AppyError, AppyResponse<Mixed>>;
```

```typescript
function get(
u: USVString,
declare function get(
u: string,
o?: RequestInit
): TaskEither<AppyError, AppyResponse<Mixed>>;
```

```typescript
function post(
u: USVString,
declare function post(
u: string,
o?: RequestInit
): TaskEither<AppyError, AppyResponse<Mixed>>;
```

```typescript
function put(
u: USVString,
declare function put(
u: string,
o?: RequestInit
): TaskEither<AppyError, AppyResponse<Mixed>>;
```

```typescript
function patch(
u: USVString,
declare function patch(
u: string,
o?: RequestInit
): TaskEither<AppyError, AppyResponse<Mixed>>;
```

```typescript
function del(
u: USVString,
declare function del(
u: string,
o?: RequestInit
): TaskEither<AppyError, AppyResponse<Mixed>>;
```
Expand Down Expand Up @@ -170,20 +170,20 @@ See [here](src/api.ts) for the complete list of types.

```typescript
interface ApiMethods {
request: <A>(m: Method, u: USVString, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;
request: <A>(m: Method, u: string, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;

get: <A>(u: USVString, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;
get: <A>(u: string, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;

post: <A>(u: USVString, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;
post: <A>(u: string, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;

put: <A>(u: USVString, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;
put: <A>(u: string, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;

patch: <A>(u: USVString, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;
patch: <A>(u: string, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;

del: <A>(u: USVString, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;
del: <A>(u: string, o: ApiOptions<A>): TaskEither<ApiError, AppyResponse<A>>;
}

function api(c: ApiConfig): ApiMethods
declare function api(c: ApiConfig): ApiMethods
```

## Examples
Expand Down
Loading

0 comments on commit ee80fcd

Please sign in to comment.