-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
4 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,12 @@ | ||
import Resource from './Resource'; | ||
import SimpleResource from './SimpleResource'; | ||
import { | ||
SchemaOf, | ||
DeleteShape, | ||
ReadShape, | ||
MutateShape, | ||
FetchShape, | ||
isDeleteShape, | ||
RequestResource, | ||
isEntity, | ||
} from './types'; | ||
import { | ||
SchemaList, | ||
Schema, | ||
SchemaDetail, | ||
normalize, | ||
denormalize, | ||
schemas, | ||
} from './normal'; | ||
export * from './types'; | ||
export * from './normal'; | ||
|
||
export type DeleteShape< | ||
S extends schemas.Entity, | ||
Params extends Readonly<object> = Readonly<object> | ||
> = DeleteShape<S, Params>; | ||
export type MutateShape< | ||
S extends Schema, | ||
Params extends Readonly<object> = Readonly<object>, | ||
Body extends Readonly<object | string> | void = | ||
| Readonly<object | string> | ||
| undefined | ||
> = MutateShape<S, Params, Body>; | ||
export type ReadShape< | ||
S extends Schema, | ||
Params extends Readonly<object> = Readonly<object>, | ||
Body extends Readonly<object | string> | void = | ||
| Readonly<object | string> | ||
| undefined | ||
> = ReadShape<S, Params, Body>; | ||
export type FetchShape< | ||
S extends Schema, | ||
Params extends Readonly<object> = Readonly<object>, | ||
Body extends Readonly<object | string> | void = | ||
| Readonly<object | string> | ||
| undefined | ||
> = FetchShape<S, Params, Body>; | ||
export type Schema<T = any> = Schema<T>; | ||
export type SchemaOf<T> = SchemaOf<T>; | ||
export type SchemaList<T> = SchemaList<T>; | ||
export type SchemaDetail<T> = SchemaDetail<T>; | ||
export type RequestResource<RS> = RequestResource<RS>; | ||
const SuperagentResource = Resource; | ||
|
||
export { | ||
Resource, | ||
SimpleResource, | ||
SuperagentResource, | ||
isEntity, | ||
normalize, | ||
denormalize, | ||
isDeleteShape, | ||
schemas, | ||
}; |