-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
5a01c8f
commit 708a94f
Showing
11 changed files
with
108 additions
and
90 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 +1,4 @@ | ||
export { Store } from './store'; | ||
export { Model } from './model'; | ||
export { Query } from './query'; | ||
export * from './types'; | ||
export { Store } from './store'; | ||
export { Model } from './model'; | ||
export { Query } from './query'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,21 +1,27 @@ | ||
import { Store } from './store'; | ||
import { IJsonApiIdentifier, IJsonApiRelationships, IJsonApiResource, TKeyValueObject } from './jsonApi'; | ||
export declare class Model implements IJsonApiResource { | ||
protected store: Store; | ||
type: string; | ||
id: string; | ||
attributes: TKeyValueObject; | ||
relationships: IJsonApiRelationships; | ||
meta: TKeyValueObject; | ||
links: TKeyValueObject; | ||
[field: string]: any; | ||
constructor(data: IJsonApiResource, store: Store); | ||
/** | ||
* Make a resource identifier object for this model. | ||
*/ | ||
identifier(): IJsonApiIdentifier; | ||
/** | ||
* Merge new JSON:API resource data into the model. | ||
*/ | ||
merge(data: IJsonApiResource): void; | ||
} | ||
import { Store } from './store'; | ||
import { JsonApiIdentifier, JsonApiRelationships, JsonApiResource, KeyValueObject } from './types'; | ||
export declare type TCastAttributes = { | ||
[key: string]: FunctionConstructor; | ||
}; | ||
export declare class Model implements JsonApiResource { | ||
protected store: Store; | ||
type: string; | ||
id: string; | ||
attributes: KeyValueObject; | ||
relationships: JsonApiRelationships; | ||
meta: KeyValueObject; | ||
links: KeyValueObject; | ||
protected casts: TCastAttributes; | ||
[field: string]: any; | ||
constructor(data: JsonApiResource, store: Store); | ||
getAttribute(name: string): any; | ||
getRelationship(name: string): any; | ||
/** | ||
* Make a resource identifier object for this model. | ||
*/ | ||
identifier(): JsonApiIdentifier; | ||
/** | ||
* Merge new JSON:API resource data into the model. | ||
*/ | ||
merge(data: JsonApiResource): void; | ||
} |
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,6 +1,11 @@ | ||
export declare class Query { | ||
readonly query: any; | ||
constructor(query?: any); | ||
push(key: object | string, value?: any): this; | ||
toString(): string; | ||
} | ||
export declare class Query { | ||
readonly query: any; | ||
constructor(query?: any); | ||
append(key: string, value: any): this; | ||
append(values: object): this; | ||
set(key: string, value: any): this; | ||
set(values: object): this; | ||
delete(key: string): this; | ||
delete(keys: string[]): this; | ||
toString(): string; | ||
} |
Oops, something went wrong.