@drieam/api
Advanced tools
Comparing version 0.37.1 to 0.37.2-beta.1
@@ -1,7 +0,2 @@ | ||
import { QueryParams, FetchOptions } from '../types'; | ||
export declare const filterList: (resource: string) => (filters?: QueryParams, options?: FetchOptions) => { | ||
resource: string; | ||
options: FetchOptions; | ||
filters: QueryParams; | ||
type: string; | ||
}; | ||
import { QueryParams, OptionParams } from '../../types'; | ||
export declare const filterList: (resource: string) => (filters?: QueryParams, options?: Partial<OptionParams>) => import("../../types").BaseAction<"FILTER_LIST">; |
@@ -1,2 +0,2 @@ | ||
import { QueryParams, Attributes, FetchOptions } from '../types'; | ||
export declare const deleteEntity: (resource: string) => (attributes: Attributes, filters?: QueryParams, options?: FetchOptions) => import("../types").FetchEntityAction; | ||
import { DeleteEntityAction, Attributes, QueryParams, OptionParams } from '../../types'; | ||
export declare const deleteEntity: (resource: string) => (attributes: Attributes, filters?: QueryParams, options?: Partial<OptionParams>) => DeleteEntityAction; |
@@ -1,3 +0,3 @@ | ||
import { FetchEntityAction, QueryParams, FetchOptions } from '../types'; | ||
export declare const fetchEntity: (resource: string) => (id: string | number, filters?: QueryParams, options?: FetchOptions) => FetchEntityAction; | ||
import { FetchEntityAction, OptionParams, QueryParams } from '../../types'; | ||
export declare const fetchEntity: (resource: string) => (id: string | number, filters?: QueryParams, options?: Partial<OptionParams>) => FetchEntityAction; | ||
export declare const fetchEntitySuccess: (resource: string, response: any) => { | ||
@@ -4,0 +4,0 @@ resource: string; |
@@ -1,3 +0,3 @@ | ||
import { FetchListAction, QueryParams, FetchOptions } from '../types'; | ||
export declare const fetchList: (resource: string) => (filters?: QueryParams, options?: FetchOptions) => FetchListAction; | ||
import { QueryParams, OptionParams } from '../../types'; | ||
export declare const fetchList: (resource: string) => (filters?: QueryParams, options?: Partial<OptionParams>) => import("../../types").BaseAction<"FETCH_LIST">; | ||
export declare const fetchListSuccess: (resource: string, response: any) => { | ||
@@ -4,0 +4,0 @@ resource: string; |
@@ -1,3 +0,2 @@ | ||
import { ListState } from '../index'; | ||
import { FetchNextListAction, FetchOptions } from '../types'; | ||
export declare const fetchNextPage: (resource: string) => (listState: ListState<any>, options?: FetchOptions) => FetchNextListAction; | ||
import { ListState, FetchNextListAction, OptionParams } from '../../types'; | ||
export declare const fetchNextPage: (resource: string) => (listState: ListState<any>, options?: Partial<OptionParams>) => FetchNextListAction; |
@@ -1,2 +0,2 @@ | ||
import { QueryParams, Attributes, SaveEntityAction, FetchOptions } from '../types'; | ||
export declare const saveEntity: (resource: string) => (attributes: Attributes, filters?: QueryParams, options?: FetchOptions) => SaveEntityAction; | ||
import { QueryParams, Attributes, SaveEntityAction, OptionParams } from '../../types'; | ||
export declare const saveEntity: (resource: string) => (attributes: Attributes, filters?: QueryParams, options?: Partial<OptionParams>) => SaveEntityAction; |
@@ -7,2 +7,2 @@ export * from './actions'; | ||
export * from './routes'; | ||
export * from './types'; | ||
export * from '../types'; |
@@ -1,2 +0,3 @@ | ||
import { RouteActions } from '../routes'; | ||
export declare const deleteEntityMiddleware: (routes: RouteActions, csrfToken: string) => (_store: any) => (next: any) => (action: import("../types").FetchEntityAction) => any; | ||
import { DeleteEntityAction, RouteActions } from '../../types'; | ||
import { Dispatch, AnyAction } from 'redux'; | ||
export declare const deleteEntityMiddleware: (routes: RouteActions, csrfToken: string) => (_store: any) => (next: Dispatch<AnyAction>) => (action: DeleteEntityAction) => DeleteEntityAction | Promise<void>; |
@@ -1,3 +0,3 @@ | ||
import { RouteActions } from '../routes'; | ||
import { FetchEntityAction } from '../types'; | ||
export declare const fetchEntityMiddleware: (routes: RouteActions, _csrfToken: string) => (_store: any) => (next: any) => (action: FetchEntityAction) => any; | ||
import { FetchEntityAction, RouteActions } from '../../types'; | ||
import { Dispatch, AnyAction } from 'redux'; | ||
export declare const fetchEntityMiddleware: (routes: RouteActions, _csrfToken: string) => (_store: any) => (next: Dispatch<AnyAction>) => (action: FetchEntityAction) => FetchEntityAction | Promise<void>; |
@@ -1,3 +0,3 @@ | ||
import { RouteActions } from '../routes'; | ||
import { FetchListAction } from '../types'; | ||
export declare const fetchListMiddleware: (routes: RouteActions, _csrfToken: string) => (_store: any) => (next: any) => (action: FetchListAction) => any; | ||
import { RouteActions } from '../../types'; | ||
import { Dispatch, AnyAction } from 'redux'; | ||
export declare const fetchListMiddleware: (routes: RouteActions, _csrfToken: string) => (_store: any) => (next: Dispatch<AnyAction>) => (action: import("../../types").BaseAction<"FETCH_LIST">) => import("../../types").BaseAction<"FETCH_LIST"> | Promise<void>; |
@@ -1,3 +0,3 @@ | ||
import { RouteActions } from '../routes'; | ||
import { FetchNextListAction } from '../types'; | ||
export declare const fetchNextPageMiddleware: (routes: RouteActions, _csrfToken: string) => (_store: any) => (next: any) => (action: FetchNextListAction) => any; | ||
import { Dispatch, AnyAction } from 'redux'; | ||
import { FetchNextListAction, RouteActions } from '../../types'; | ||
export declare const fetchNextPageMiddleware: (routes: RouteActions, _csrfToken: string) => (_store: any) => (next: Dispatch<AnyAction>) => (action: FetchNextListAction) => FetchNextListAction | Promise<void>; |
@@ -6,1 +6,4 @@ export declare const queryEncode: (attributes?: any) => string; | ||
export declare const extractText: (text: string) => any; | ||
export declare const createCallback: (name: string) => (...args: any[]) => (response: any) => void; | ||
export declare const onSuccess: (...args: any[]) => (response: any) => void; | ||
export declare const onError: (...args: any[]) => (response: any) => void; |
@@ -1,2 +0,2 @@ | ||
import { RouteActions } from '../routes'; | ||
export declare const apiMiddlewares: (routes: RouteActions, csrfToken: string) => ((_store: any) => (next: any) => (action: import("..").FetchEntityAction) => any)[]; | ||
import { RouteActions } from '../../types'; | ||
export declare const apiMiddlewares: (routes: RouteActions, csrfToken: string) => (((_store: any) => (next: import("redux").Dispatch<import("redux").AnyAction>) => (action: import("../../types").FetchEntityAction) => import("../../types").FetchEntityAction | Promise<void>) | ((_store: any) => (next: import("redux").Dispatch<import("redux").AnyAction>) => (action: import("../../types").BaseAction<"FETCH_LIST">) => import("../../types").BaseAction<"FETCH_LIST"> | Promise<void>) | ((_store: any) => (next: import("redux").Dispatch<import("redux").AnyAction>) => (action: import("../../types").FetchNextListAction) => import("../../types").FetchNextListAction | Promise<void>) | ((_store: any) => (next: import("redux").Dispatch<import("redux").AnyAction>) => (action: import("../../types").SaveEntityAction) => import("../../types").SaveEntityAction | Promise<void>) | ((_store: any) => (next: import("redux").Dispatch<import("redux").AnyAction>) => (action: import("../../types").DeleteEntityAction) => import("../../types").DeleteEntityAction | Promise<void>))[]; |
@@ -1,3 +0,3 @@ | ||
import { RouteActions } from '../routes'; | ||
import { SaveEntityAction } from '../types'; | ||
export declare const saveEntityMiddleware: (routes: RouteActions, csrfToken: string) => (_store: any) => (next: any) => (action: SaveEntityAction) => any; | ||
import { Dispatch, AnyAction } from 'redux'; | ||
import { SaveEntityAction, RouteActions } from '../../types'; | ||
export declare const saveEntityMiddleware: (routes: RouteActions, csrfToken: string) => (_store: any) => (next: Dispatch<AnyAction>) => (action: SaveEntityAction) => SaveEntityAction | Promise<void>; |
@@ -1,10 +0,2 @@ | ||
export interface EntityState<T> { | ||
pending: boolean; | ||
fulfilled: boolean; | ||
rejected: boolean; | ||
settled: boolean; | ||
value: T; | ||
reason: string; | ||
status: number; | ||
} | ||
import { EntityState } from '../../types'; | ||
export declare const defaultEntityState: <T>() => EntityState<T>; | ||
@@ -11,0 +3,0 @@ export declare const entityReducer: <T>(resource: string) => (state: EntityState<T>, action: any) => EntityState<T> | { |
@@ -1,3 +0,2 @@ | ||
declare type FilterFunction = (value: any, index: number, array: any[]) => any; | ||
import { FilterFunction } from '../../types'; | ||
export declare const applyFilters: (data: any[], filters: FilterFunction[]) => any[]; | ||
export {}; |
@@ -1,14 +0,2 @@ | ||
import { QueryParams, LinkHeaders } from '../types'; | ||
export interface ListState<T> { | ||
pending: boolean; | ||
fulfilled: boolean; | ||
rejected: boolean; | ||
settled: boolean; | ||
value: T[] | null; | ||
reason: string; | ||
status: number; | ||
links: LinkHeaders; | ||
count: number; | ||
filters: QueryParams; | ||
} | ||
import { ListState } from '../../types'; | ||
export declare const defaultListState: <T>() => ListState<T>; | ||
@@ -47,3 +35,3 @@ export declare const listReducer: <T>(resource: string) => (state: ListState<T>, action: any) => { | ||
reason: string; | ||
filters: QueryParams; | ||
filters: import("../../types").QueryParams; | ||
}; |
@@ -1,14 +0,7 @@ | ||
export declare type RouteActions = { | ||
[id: string]: { | ||
path: { | ||
(options?: any): string; | ||
}; | ||
mapper: (attr: any) => any; | ||
onSuccess?: { | ||
(response: Response): void; | ||
}; | ||
onError?: { | ||
(response: Response): void; | ||
}; | ||
}; | ||
import { RouteActions } from '../types'; | ||
export declare const getRoute: (routes: RouteActions, resource: string) => { | ||
path: (options?: any) => string; | ||
mapper: (attr: any) => any; | ||
onSuccess?: (response: Response) => void; | ||
onError?: (response: Response) => void; | ||
}; |
{ | ||
"name": "@drieam/api", | ||
"version": "0.37.1", | ||
"version": "0.37.2-beta.1+9a3cf0a", | ||
"description": "Default Drieam api wrapper", | ||
@@ -21,2 +21,3 @@ "author": "Stef Schenkelaars <stef@drieam.com>", | ||
"@types/lodash.isplainobject": "^4.0.4", | ||
"@types/lodash.noop": "^3.0.4", | ||
"@types/lodash.reduce": "^4.6.4", | ||
@@ -30,2 +31,3 @@ "@types/redux-form": "^7.4.13", | ||
"lodash.isplainobject": "^4.0.6", | ||
"lodash.noop": "^3.0.1", | ||
"lodash.reduce": "^4.6.0", | ||
@@ -45,3 +47,3 @@ "parse-link-header": "^1.0.1", | ||
}, | ||
"gitHead": "0b9d7e8736b635648119641200edabe25d304e39" | ||
"gitHead": "9a3cf0a060293ccbe9e44036b069f5b9202f1965" | ||
} |
Sorry, the diff of this file is too big to display
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1725636
19348
19
1
2
+ Added@types/lodash.noop@^3.0.4
+ Addedlodash.noop@^3.0.1
+ Added@types/lodash.noop@3.0.9(transitive)
+ Addedlodash.noop@3.0.1(transitive)